CN104217037A - Method and device for displaying web page in mobile terminal - Google Patents

Method and device for displaying web page in mobile terminal Download PDF

Info

Publication number
CN104217037A
CN104217037A CN201410525792.4A CN201410525792A CN104217037A CN 104217037 A CN104217037 A CN 104217037A CN 201410525792 A CN201410525792 A CN 201410525792A CN 104217037 A CN104217037 A CN 104217037A
Authority
CN
China
Prior art keywords
label
typesetting
attribute
affects
css
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410525792.4A
Other languages
Chinese (zh)
Other versions
CN104217037B (en
Inventor
孙涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201410525792.4A priority Critical patent/CN104217037B/en
Priority claimed from CN201210120620.XA external-priority patent/CN102663126B/en
Publication of CN104217037A publication Critical patent/CN104217037A/en
Application granted granted Critical
Publication of CN104217037B publication Critical patent/CN104217037B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method and a device for displaying a web page in a mobile terminal. The method for displaying the web page in the mobile terminal includes that receiving a request for visiting the web page through the mobile terminal, and acquiring resource corresponding to the web page from a web page server according to the request; analyzing page elements in the page resource, judging whether a label corresponding to the current page element influences type setting when analyzing, if the label influences the type setting, processing the label which influences the type setting; structuring nodes of a render tree according to processed labels, judging whether there is a cascading style sheet CSS attribute which influences the type setting, if so, removing the CSS attribute which influences the type setting, and drawing the web page content according to the structured render tree and displaying. The method and device for displaying the web page in the mobile terminal are capable of keeping some due screen effects in a certain degree so as to guarantee the web page display vitality.

Description

A kind of in mobile terminal method and the device of display web page
Technical field
The present invention relates to field of computer technology, particularly relate to a kind of in mobile terminal method and the device of display web page.
Background technology
Along with scientific and technological develop rapidly, mobile terminal (as mobile phone etc.) has had powerful processing power, mobile terminal becomes an integrated information processing platform from simple call instrument, especially utilizes mobile terminal browsing page, has become the important channel of people's obtaining information.
At first, for can be on mobile terminal browsing page, used special agreement-WAP (Wireless Application Protocol, WAP (wireless application protocol)), webpage making person need to be exclusively used in the webpage of browsing on mobile terminal according to this agreement making, and (this webpage is generally used WML (Wireless Markup Language) language to make, therefore, generally can be referred to as WML webpage).But, along with the continuous lifting of user's request and the development of technology, at present also can on mobile terminal, browse common HTML (Hypertext Markup Language, HTML (Hypertext Markup Language)) webpage, be also the webpage of making based on html language generally using in the Internet.Yet, this html web page is all generally to have equipment (such as desktop computer, notebook computer etc.) compared with large display screen and design for traditional, and for mobile terminal (as mobile phone etc.), because the size of its display screen is smaller, therefore, want the normal html web page that shows in mobile terminal, generally also need in advance html web page to be processed, be converted into the form of similar WML webpage.Html web page is being converted in the process of WML webpage, first need page elements to carry out narrow row's adaptation processing, also be, need to again to the page elements in html web page, carry out typesetting according to the screen width of mobile terminal, the page elements number showing in every a line is tailed off, thereby while making to show in less display screen, font can be too not little, meanwhile, avoid occurring the phenomenon of the scroll bar in horizontal direction, be convenient to browsing of user.Yet prior art is being carried out the page in narrow row's process, for fear of occurring that content overflows mobile phone screen or screen and stay the phenomenons such as white, overlapping demonstration, generally original CSS pattern for some page elements designs in html web page can be removed.But will cause like this web displaying not lively, some due picture effects disappear.
Summary of the invention
The invention provides a kind of in mobile terminal the method and apparatus of display web page, can retain to a certain extent some due picture effects, guarantee the vividness of web displaying.
The invention provides following scheme:
A method for display web page in mobile terminal, comprising:
Receive by the request of mobile terminal accessing webpage, according to described request, to web page server, obtain the resource that described webpage is corresponding;
The page elements comprising in described web page resources is resolved, in resolving, judge whether the label that current page element is corresponding affects typesetting, if there is the label that affects typesetting, the described label that affects typesetting is processed;
According to the label configurations after processing, play up the node of tree, judge whether to exist the CSS (cascading style sheet) CSS attribute that affects typesetting, if there is the CSS (cascading style sheet) CSS attribute that affects typesetting, remove the CSS attribute that affects typesetting, according to the tree of playing up of structure, web page contents is drawn and shown afterwards.
Wherein, described the described label that affects typesetting processed and comprised:
The label that affects typesetting is removed, to when playing up the node of tree according to the label configurations after processing, the page elements that this label is corresponding is processed as plain text.
Wherein, described the label that affects typesetting removed and comprised:
If described current page elements of resolving is common scrolling element, subscript element or subscript element, the label of this page elements is removed.
Wherein, described the described label that affects typesetting processed and comprised:
Current page element is removed, so that when playing up the node of tree according to the label configurations after processing, node corresponding to this page elements of regeneration not.
Wherein, described current page element removed and comprised:
If described current page elements of resolving is common scrolling element, the element that comprises object, embeds element, subscript element or the subscript element of the page, this page elements removed.
Wherein, described the described label that affects typesetting processed and comprised:
By affecting the CSS property value defining in the label of typesetting, modify;
The described node of playing up tree according to the label configurations after processing comprises:
Utilizing amended CSS property value is that the CSS attribute of playing up the node that in tree, this page elements is corresponding carries out assignment.
Wherein, describedly by affecting the CSS property value defining in the label of typesetting, modify and comprise:
When described current page elements of resolving is table element, the CSS value of the inline element of table element and table element is modified, so that described table element can enter a new line automatically;
Or,
When described current page elements of resolving is list input control, drop-down menu/list, textview field or inline frame element, and while exist representing the absolute figure of its width, described absolute figure is revised as to relative value;
Or,
When described current page elements of resolving is pictorial element, relatively the width value of this pictorial element and the screen width value of mobile terminal, if described width value is greater than the screen width value of mobile terminal, according to the ratio between described width value and the screen width of mobile terminal, width value described in scaled down; If described width value is less than the screen width value of mobile terminal, but be greater than mobile terminal screen width value 1/2nd, the position attribution value of this pictorial element is revised as to demonstration placed in the middle;
Or,
If described current page elements of resolving is hyperlink element, and comprises img label and text in described hyperlink element, for described img label, add border property value;
Or,
If described current page elements of resolving, for a minute p-block element p, adds border property value for described minute p-block element p.
Wherein, describedly by playing up the CSS attribute that affects typesetting comprising in tree node, remove and comprise:
The absolute attribute of the width height that described current page elements of resolving is comprised, location attribute, Background attribute and/or the attribute relevant to text display remove;
And/or,
Frame in element BOX Model and fill area attribute are removed.
Wherein, if the Background of described current page elements of resolving is removed, also comprise:
Revise the color attribute value of the text comprising in described page elements, to guarantee the identification of described text after removing Background.
Wherein, the color attribute value of the text comprising in the described page elements of described modification, comprising:
If textcolor is white in page elements, it is web page text default color that described textcolor is set;
Or,
If in web page element, textcolor is not white, and described element background colour is opaque, it is the color that described element background colour has preset value of chromatism that textcolor is set;
Or,
If textcolor is not white in web page element, and described element background colour is transparent, textcolor is set and there is the color of preset value of chromatism for the background colour of the main element of webpage therewith.
A device for display web page in mobile terminal, comprising:
Resource acquisition unit, for receiving by the request of mobile terminal accessing webpage, obtains to web page server the resource that described webpage is corresponding according to described request;
Tag processes unit, for the page elements that described web page resources is comprised, resolve, in resolving, judge whether the label that current page element is corresponding affects typesetting, if there is the label that affects typesetting, the described label that affects typesetting processed;
Play up tree tectonic element, for playing up the node of tree according to the label configurations after processing, judge whether to exist the CSS (cascading style sheet) CSS attribute that affects typesetting, if there is the CSS (cascading style sheet) CSS attribute that affects typesetting, remove the CSS attribute that affects typesetting, according to the tree of playing up of structure, web page contents is drawn and shown afterwards.
Wherein, described tag processes unit comprises:
Label removes subelement, for the label that affects typesetting is removed, to when playing up the node of tree according to the label configurations after processing, the page elements that this label is corresponding is processed as plain text.
Wherein, described label remove subelement specifically for: if described current page elements of resolving is common scrolling element, subscript element or subscript element, the label of this page elements is removed.
Wherein, described tag processes unit comprises:
Element removes subelement, for current page element is removed, so that when playing up the node of tree according to the label configurations after processing, and node corresponding to this page elements of regeneration not.
Wherein, described element remove subelement specifically for: if described current page elements of resolving is common scrolling element, the element that comprises object, element, subscript element or the subscript element that embeds the page, this page elements is removed.
Wherein, described tag processes unit comprises:
Property value is revised subelement, for the CSS property value that the label that affects typesetting is defined, modifies;
Described play up tree tectonic element also for:
Utilizing amended CSS property value is that the CSS attribute of playing up the node that in tree, this page elements is corresponding carries out assignment.
Wherein, described property value modification subelement comprises:
First revises subelement, for when described current page elements of resolving is table element, the CSS value of the inline element of table element and table element is modified, so that described table element can enter a new line automatically;
Or,
Second revises subelement, for working as described current page elements of resolving, be list input control, drop-down menu/list, textview field or inline frame element, and while there is the absolute figure that represents its width, described absolute figure is revised as to relative value;
Or,
The 3rd revises subelement, for when described current page elements of resolving is pictorial element, relatively the width value of this pictorial element and the screen width value of mobile terminal, if described width value is greater than the screen width value of mobile terminal, according to the ratio between described width value and the screen width of mobile terminal, width value described in scaled down; If described width value is less than the screen width value of mobile terminal, but be greater than mobile terminal screen width value 1/2nd, the position attribution value of this pictorial element is revised as to demonstration placed in the middle;
Or,
The 4th revises subelement, if be hyperlink element for described current page elements of resolving, and comprises img label and text in described hyperlink element, for described img label, adds border property value;
Or,
The 5th revises subelement, if be a minute p-block element p for described current page elements of resolving, for described minute p-block element p, adds border property value.
Wherein, described in, playing up tree tectonic element comprises:
The first attribute removes subelement, for absolute attribute, location attribute, Background attribute and/or the attribute relevant to text display of width height that described current page elements of resolving is comprised, removes;
And/or,
The second attribute removes subelement, for the frame of element BOX Model and fill area attribute are removed.
Wherein, also comprise:
Textcolor is revised unit, if for the Background of described current page elements of resolving is removed, revise the color attribute value of the text comprising in described page elements, to guarantee the identification of described text after removing Background.
Wherein, described textcolor modification unit comprises:
The first color is revised subelement, if be white for textcolor in page elements, it is web page text default color that described textcolor is set;
Or,
The second color is revised subelement, if be not white for textcolor in web page element, and described element background colour is opaque, and it is the color that described element background colour has preset value of chromatism that textcolor is set;
Or,
The 3rd color is revised subelement, if be not white for textcolor in web page element, and described element background colour is transparent, textcolor is set and has the color of preset value of chromatism for the background colour of the main element of webpage therewith.
According to specific embodiment provided by the invention, the present invention has reached following technique effect: if label corresponding to current page element affects typesetting, on affecting the label of typesetting, process, to eliminate the impact of described label on typesetting, by can avoid the impact on typesetting of page elements that label is corresponding to the processing of label; According to the label configurations after processing, play up the node of tree, and, if there is the CSS (cascading style sheet) CSS attribute that affects typesetting, the described CSS attribute that affects typesetting is removed, so that the tree of playing up according to structure is drawn web page contents and shows in mobile terminal, the CSS attribute that affects typesetting is removed, can avoid the setting of CSS attribute and make the display effect of page elements affect typesetting.Wherein the processing of label is comprised to the modification to CSS attribute corresponding to label, for example, the absolute attribute of its width is revised as to relative attribute, therefore make webpage typesetting to carry out adaptive different client according to client screen size.Simultaneously, in the embodiment of the present invention, just the label C SS attribute that affects typesetting is processed, and remove and affect the CSS of typesetting attribute, and need not will remove for the designed all CSS patterns of page elements, therefore, can retain to a certain extent some due picture effects, guarantee the vividness of web displaying.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the process flow diagram of the method that provides of the embodiment of the present invention;
Fig. 2 is the schematic diagram of the first device that provides of the embodiment of the present invention;
Fig. 3 is the second schematic diagram installing that the embodiment of the present invention provides;
Fig. 4 is the 3rd schematic diagram installing that the embodiment of the present invention provides;
Fig. 5 is the 4th schematic diagram installing that the embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, the every other embodiment that those of ordinary skills obtain, belongs to the scope of protection of the invention.
S101: receive by the request of mobile terminal accessing webpage, obtain to web page server the resource that described webpage is corresponding according to described request;
First it should be noted that, current web browser is probably divided into two types: the direct embedding browser of client and C/S (client/agent server) architecture browser.Wherein, the former directly passes through browser access webpage, is also, browser, after receiving user and accessing the request of certain webpage, directly sends to web page server by this request, obtains after the web data that web page server returns, in this locality, resolve and play up, finally show, the latter is divided into client and service end two parts by browser, wherein client is moved on user terminal, service end is moved on remote server, client is after receiving the request of user's accessed web page, first request is sent to the service end of oneself, then by service end accessed web page server, after getting the web data that web page server returns, in service end, resolve and play up calculating, then by proprietary protocol, the result of calculating is sent to client, by client, according to result of calculation, be presented on user terminal, be equivalent to all mutual be all to complete under the assistance of service end.The embodiment of the present invention goes for above-mentioned any situation.
Web page server is receiving mobile terminal, as mobile phone, PAD (Personal Digital Assistant, personal assistant) etc., when the http of the accessed web page sending asks, can return to described web page resources, but existing webpage typesetting and demonstration great majority are all for traditional PC (personal computer, PC) display screen, therefore, during by mobile terminal accessing webpage, need to carry out narrow row's adaptation to described web page contents, otherwise in the time of can making web page contents show, occur that content of text overflows screen or other not adaptive situation in mobile terminal.Mobile terminal, when sending accessed web page request, can comprise its resolution information in solicited message, therefore, can pass through resolution request message, according to the resolution information of mobile terminal, carries out corresponding narrow row's adaptation.In addition, for mobile phone browser, can be also the resolution information that server end is preserved various trumpeter's machine in advance, now, only need obtain the model of mobile phone, according to resolution information corresponding to various trumpeter's machine, carry out corresponding narrow row's adaptation.
S102: the page elements comprising in to described web page resources is resolved, and generate in the corresponding resolving of playing up tree node, judge whether the label that current page element is corresponding affects typesetting, if there is the label that affects typesetting, the described label that affects typesetting is processed, to eliminate the impact of described label on typesetting;
For the ease of understanding this step, first simply introduce CSS (Cascading Style Sheet, CSS (cascading style sheet) list).CSS is a kind of computerese that is used for showing the file styles such as HTML (Hypertext Markup Language, HTML (Hypertext Markup Language)) or XML, can be used for carrying out the design of web page style.For example, when wanting to make to link word and not clicking, be blue, after mouse moves up, become redness and have underscore, a kind of style that Here it is.The realization of this kind of style can by the CSS attribute to respective element arrange realize.
The display effect of utilizing at present CSS to control html page has following several mode:
1) mode in row, can directly realize the applicable style=" " of html tag.
2) embedded mode, exactly CSS code is write between < head > </head >, and declare with < style > </style >.
3) on-link mode (OLM) only need add a link between < head > </head >, and the herf property value of this link is set to outside CSS filename.This mode has realized the thorough separated of html file and CSS file, makes making in early stage and later maintenance all very convenient.If keep page style unified, as long as these public CSS files are preserved into separately to a file, other the page just can call respectively the CSS file needing, and as needs change web page style, only need to revise public CSS file and just can realize.
4) lead-in mode, lead-in mode is more similar with link shape, adopts improt mode to import CSS style sheet, when HTML initialization, can be directed in html file, becomes a part for file.
Owing to realizing the control of CSS to html page display effect by on-link mode (OLM), easy to operate, be also convenient to administer and maintain simultaneously, therefore, page display effect is all controlled by on-link mode (OLM) in current most websites.
In addition, for the ease of understanding, more simply introduce the groundwork flow process of render engine.The groundwork flow process of render engine is: build Dom tree, structure Render tree, layout Render tree, draw Render tree.Render engine gets after html page resource, starts to resolve html page content, and label is wherein converted into Dom tree node, and builds Dom tree.Then it starts to resolve the style information in CSS file and style label, and the style information that these get and the observability instruction in html page will be used to build Render tree.Render tree is the further description to Dom tree, and the visual elements in element display sequence forms, and it is the visable representation of document, and building this tree is to draw document content for the order with correct.Rendering objects is corresponding with Dom element, but this corresponding relation is not necessarily man-to-man, and sightless Dom element can not be inserted into and play up tree, for example head element.In addition, the element that display attribute is none can not occur in playing up tree yet.Process html and body label and structure is played up to the root of tree, this root rendering objects correspondence is called the element of containing block by css standard---the top element that has comprised other all elements.Its size is exactly viewport---the viewing area of browser window, Firefox claims that it is viewPortFrame, webkit is called RenderView, and this is exactly document rendering objects pointed, and in tree, other part is all created the Dom node as an insertion.
In playing up tree, each node (rendering objects) has its corresponding pattern, therefore creates and plays up the visual attributes that tree need to calculate each rendering objects, and this can obtain by calculating the Style Attributes of each element.Pattern comprises the style sheet in various sources, the visual attribute in inline style element and html (for example bgcolor), and visual attribute is converted into css Style Attributes.Style sheet derives from browser stylesheet, and page author and user provide style sheet---some pattern is that browser client provides the (pattern that browser allows user's definition to like, for example, in Firefox, can realize by place style sheet under Firefox Profile catalogue.
The embodiment of the present invention is exactly to generate and to play up the tree stage at render engine, and by revising the CSS attribute of page elements, the pattern of having realized the page elements calculating can fit in the effect on the mobile terminal screen of different size.The attribute of concrete modification page elements is to carry out for the class RenderStyle in webkit.Because each member is the various patterns of corresponding CSS in this type of.Be elaborated below.
At browser renders engine, build and play up the tree stage, will obtain the CSS style information of page elements.But, the CSS style information now obtaining can not directly overlap uses mobile terminal, because existing webpage is mainly for PC display screen, therefore the CSS pattern of some page elements wherein be not suitable for mobile terminal and show, so, after getting the CSS style information of page elements, if label corresponding to current page element affects typesetting, need to process affecting the label of typesetting, to eliminate the impact of described label on typesetting.Wherein, the described label that affects typesetting comprises form and relevant subtab (comprising head of form, form body, table row), list input control, drop-down menu/list, textview field, image, hyperlink, subregion, common scrolling, comprise object, embed element, subscript, subscript, inline frame etc.Specifically when these labels are processed, can carry out different processing for different situations, for example, wherein processing mode can be: for some special labels, when affecting the label of typesetting and process, can also adopt the mode of directly this label that affects typesetting being removed, that is to say, retain current page elements, but by being that the label that this element is set removes originally, make this element no longer be shown as the pattern that original label sets.The mode of specifically removing can be, by the disply setup of attribute of this label, is none.For example:
(1) common scrolling (marquee)
Marquee label is used for controlling font and rolls.Because part cell-phone customer terminal is not supported the rolling function of marquee, or the effect of supporting is not so good, in order not affect typesetting effect, can, by processing the display properties of this label, remove this label.After removing label, when showing in webpage, the content in label will no longer include the effect of rolling.
(2) subscript (sub), subscript (sup)
Sub is used for defining subscript text, is included in text in label and by half of normal text height, shows below baseline.Sup is used for defining subscript text, is included in text in label and by half of normal text height, shows more than baseline.These two footmark elements can cause whole typesetting irregular, and element layout is chaotic, so if there is above label in the page, label can be removed.Remove after label, the content in footmark label can show according to the pattern of plain text, with plain text in same baseline, font information is consistent.
In addition, on affecting that the label of typesetting processes, can also be that current page element corresponding to label removed.For example, if the page elements of resolving current is aforementioned common scrolling element, subscript element or subscript element, directly this page elements is removed.That is to say, in playing up tree, no longer have the node that this page elements is corresponding, and then also just can not draw again and show this page elements in webpage, obviously, also just can eliminate the impact of this page elements on typesetting.
Certainly, during specific implementation, except above-mentioned common scrolling element, subscript element or subscript element can directly remove, the page elements that comprises object (object), embedding (embed) also can directly remove.Wherein, object and embed embedding element are all for add multimedia file in the page, as audio frequency, video, flash etc.Object label is for the IE browser of windows platform, and embed is for the Netscape Navigator browser under windows and macintosh platform and the IE browser under macintosh platform.Generally in order to ensure most of browsers, can normally show flash, need to be placed in object label embed label is nested.Support the browser of activex control will ignore the embed label in object label.The IE browser of Netscape and use plug-in unit will only read embed label and can not identify object label.For example, <object classid=" clsid:F08DF954-8592-11D1-B16A-00C0F0283628 " id=" Slider1 " width=" 100 " height=" 50 " ></object>, wherein, classid is for defining the ID value of the class of embedded web page, this attribute can be used to specify the position of the object comprising in browser, normally a java class.But the mobile phone browser of most is not supported flash animation, if comprise two above-mentioned elements in the page, in order not affect typesetting effect, can remove this page elements.After this page elements is removed, in webpage, the elements such as concrete video, audio frequency, flash will no longer be shown.
In addition, on the processing of label, can also be to modify affecting the CSS property value defining in the label of typesetting, that is to say, retain current page elements and label thereof, but need to in label for the property value of this element definition is modified, so that this label no longer affects typesetting.For example, can carry out respectively the modification of property value for the label of following dvielement during specific implementation:
(1) form (table) and corresponding inline element (th, td, tr)
Web page maker often can make page general layout in good order with form; in a form, conventionally have multiple row multirow; and line width normally adapts to PC display screen; therefore for mobile terminal display screen curtain; just there will be table row to be wider than the situation of screen width; because list cell cannot enter a new line automatically, and then make part table content overflow screen.Therefore, when if the page elements of resolving current is table element, can to the CSS (cascading style sheet) attribute of the inline element of table element and table element, revise accordingly by CSS selector switch, table content can be entered a new line automatically, thereby adapt to the screen of different size size.
(2) list input control (input), drop-down menu/list (select), textview field (textarea) or inline frame (iframe)
List input control (Input) represents a kind of input object of Form list, and it is divided into text input frame with the difference of Type type again, Password Input frame, single choice/check box, submission/replacement button etc.Drop-down menu/list (Select) element can create single choice or multiselect menu.Textview field (textarea) is the text input control that defines multirow, can hold the text of unlimited amount in text area.Iframe element can create the inline frame (inner frame at once) that comprises another one document.
If the page elements of resolving current is above-described one or more element, and the width attribute of element is while being absolute figure, width is revised as to relative width, and its property value is 100%, makes its content can take mobile phone screen width.Because absolute value width may bring screen to stay white or folding row problem, to typesetting, impact.For example, the in the situation that of acquiescence, the width of iframe is 300px, when mobile terminal screen width is greater than 300px, just there will be screen right side significantly blank, therefore, can be relative width by the width attribute modification of iframe, and property value is 100%.Now in iframe, content of text can take screen all the time.
(3) image (img)
Img element is used for inserting a width picture in webpage, the width attribute of this element, is to be used to specify picture to insert the width showing after webpage, and this width may have influence on typesetting, therefore, if also need to modify when current page elements of resolving is pictorial element.Concrete, can first get the width value of pictorial element, the screen width value of itself and mobile terminal is contrasted, when width value is greater than the screen width of mobile terminal, width value is carried out to the convergent-divergent with screen size equal proportion, concrete operations can, for setstyle (Length (Auto)), can normally show according to screen size.If picture width does not exceed screen width, but surpass 1/2nd of screen width, its position attribution value can be revised as to demonstration placed in the middle, can on mobile terminal screen, show between two parties.
(4) hyperlink (a)
In a label, can insert img label, the picture now inserting in img label just becomes image hyperlink, clicks any part of picture and can open this hyperlink.For fear of this picture other texts when showing overlaid corresponding with label, for described img label adds border property value (margin), for fear of two adjacent hyperlink, connect together simultaneously, can border attribute be set for a label.This writes a Chinese character in simplified form the width that attribute can arrange all outer back gauges of element margin, or the width of each upper outside back gauge in limit is set.
(5) subregion (div)
DIV element is that the element of structure and background is provided for the content for bulk in html document (block-level).The start-tag of DIV and all the elements between end-tag are all used for forming this piece, and wherein the characteristic of institute's containing element is controlled by the attribute of DIV label, or by controlling with this piece of fstyleformat.scrolltrackization.If the page elements of resolving current is for a minute p-block element p, overlapping for fear of the frame between father and son and fraternal subregion, can margin attribute be set for each div element.
It should be noted that, the webpage that will access for mobile terminal, not necessarily can comprise all above-mentioned said labels that affects typesetting, likely only comprises one or more.Therefore,, in the concrete process of implementing, can, according to the actual conditions of the different pages, the one or more above-mentioned label that affects typesetting occurring in the page be processed.
S103: play up the node of tree according to the label configurations after processing, and, if judge whether to exist the CSS (cascading style sheet) CSS attribute that affects typesetting, if there is the CSS (cascading style sheet) CSS attribute that affects typesetting, remove the described CSS attribute that affects typesetting is removed, to web page contents drawn in mobile terminal and shown according to the tree of playing up of structure afterwards.
When render engine is played up tree in generation, for each node, need to calculate its corresponding pattern, also need the CSS Style Attributes value of obtaining to be applied to corresponding node.Because the CSS attribute of some page elements also can have influence on typesetting, therefore at this, calculate in the process of pattern, these corresponding attributes need to be removed, do not apply it on corresponding node, to eliminate the impact of this attribute on typesetting.Wherein, these attributes that affect typesetting can comprise: wide high absolute value attribute, the frame in element BOX Model to fill area attribute, the attribute of Background, the attribute relevant with text display are set.In the present embodiment the processing of these attributes is specially:
(1) wide high absolute attribute
For the given wide high attribute of absolute value (width, min-width, max-width, height, min-height, max-height, size), can make content of pages when adaptive mobile phone screen, occur phenomenon disproportionate or that overflow mobile phone screen.For example, in former webpage, in the CSS attribute of some element, width value is given absolute value, suppose that its width property value is width:320px, because it is given, it is absolute value, therefore, for any browser, being all understood as width after parsing is 320px, is less than so the display of 320px for screen width, just there will be content to overflow the phenomenon of screen.Therefore in order not affect typesetting, the relevant absolute value attribute of above-described wide height need be filtered out.
(2) border (margin) in element BOX Model and filling (padding) attribute
CSS can regard all web page elements as a rectangle frame, and these frames are comprised of content, filling, frame (border) and the border of element.Filling is the content of element and the space between frame.Border is the interval between an element and another element.The border of element and fill area attribute can cause webpage Chinese version content folding row and screen to leave over blank problem, therefore these attributes need to be filtered out.
(3) location attribute
Attribute (the position relevant to the position of element, center, align, left, right, bottom, top, text-align), can make page elements occur with the suitable process of mobile phone screen the phenomenon that position display is incorrect or overflow mobile phone screen, to typesetting, cause very large problem, therefore these attributes need to be filtered out.
(4) Background attribute
Background (background-image) attribute is that element arranges background image.The background of element has occupied the overall dimension of element, comprises inset spacing and frame, but does not comprise outer back gauge.Acquiescently, background image is positioned at the upper left corner of element, and repeats in the horizontal and vertical directions.
In to the process of mobile phone screen adaptation, owing to cannot processing the cutting of overall background figure and the repetition of little Background, therefore background-image attribute is filtered out.Owing to having removed Background, therefore can cause the text that color is identical with background colour to show, thus can also reset the color attribute value of text, to guarantee the identification of described text after removing Background.During concrete enforcement, can be: if textcolor is white in page elements, it is web page text default color that textcolor is set; If in web page element, textcolor is not white, and element background colour is opaque, it is to have the color of certain value of chromatism with element background colour that textcolor is set; If textcolor is not white in web page element, and the background colour of element is transparent, textcolor is set and there is the color of certain value of chromatism for the background colour of the main element of webpage (body element) therewith.Wherein, concrete value of chromatism can wait and set in advance based on experience value.
(5) attribute relevant to text display
Whether text (word-wrap) attribute that automatically enters a new line is used for controlling when current line surpasses the border of specified containers and disconnects and changing one's profession, default value is for allowing content to back down the Vessel Boundary of appointment, if selection property value is break-word, content will enter a new line in border.Text-indent attribute is used for controlling first trip word indentation in text block.These attributes relevant to text display all can cause the folding of webpage Chinese word capable and leave over blank problem, therefore need to filter out these attributes.
Specifically when removing the attribute that affects typesetting, can carry out as follows: all properties of current page element is carried out to poll, while being polled to the attribute that certain need to remove, directly carry out carriage return operation, and no longer for this attribute is given any property value, be so just equivalent to remove this attribute.
After label corresponding to page elements processed, owing to having removed the CSS attribute that affects the label of typesetting and page elements or reset label, the CSS attribute that affects typesetting of page elements is filtered simultaneously, therefore play up and layout after, the web page contents that mobile terminal is asked just can normally be presented on its screen, and there will not be not adaptive situation.
In addition, for the html page can normally be shown on mobile phone, prior art also has following implementation: by WAP transcoding server, html page is converted to WAP form, by the cell-phone customer terminal that possesses complete WAP analytic ability, complete typesetting and screen drawing, but make like this JAVASCRIPT of the former page be filtered, on the former page, rely on browser engine and resolve the afunction that could support after JAVASCRIPT.And in the embodiment of the present invention, be that the element property in former html page is carried out to corresponding adaptation processing, without former html page is simplified.Therefore, the JAVASCRIPT of former webpage can all retain, and without doing filtration treatment, thereby can guarantee that the institute of JAVASCRIPT produces effect and can show at mobile terminal screen.
The method of display web page in mobile terminal providing with the embodiment of the present invention is corresponding, the embodiment of the present invention also provide a kind of in mobile terminal the device of display web page, referring to Fig. 2, this device can comprise:
Resource acquisition unit 201, for receiving by the request of mobile terminal accessing webpage, obtains to web page server the resource that described webpage is corresponding according to described request;
Tag processes unit 202, for resolving at the page elements that described web page resources is comprised, in resolving, judge whether the label that current page element is corresponding affects typesetting, if there is the label that affects typesetting, the described label that affects typesetting is processed, to eliminate the impact of described label on typesetting;
Play up tree tectonic element 203, for playing up the node of tree according to the label configurations after processing, judge whether to exist the CSS (cascading style sheet) CSS attribute that affects typesetting, if there is the CSS (cascading style sheet) CSS attribute that affects typesetting, remove the CSS attribute that affects typesetting, according to the tree of playing up of structure, in mobile terminal, web page contents drawn and shown afterwards.
During specific implementation, for some special labels, referring to Fig. 3, tag processes unit 202 can comprise:
Label removes subelement 2021, for the label that affects typesetting is removed, to when playing up the node of tree according to the label configurations after processing, the page elements that this label is corresponding is processed as plain text.
Wherein, label remove subelement specifically for: if described current page elements of resolving is common scrolling element, subscript element or subscript element, the label of this page elements is removed.
Or referring to Fig. 4, tag processes unit 202 also can comprise:
Element removes subelement 2022, for current page element is removed, so that when playing up the node of tree according to the label configurations after processing, and node corresponding to this page elements of regeneration not.
Wherein, element removes subelement specifically can be for: if described current page elements of resolving be common scrolling element, the element that comprises object, embed element, subscript element or the subscript element of the page, this page elements is removed.
Moreover referring to Fig. 5, tag processes unit 202 can also comprise:
Property value is revised subelement 2023, for the CSS property value that the label that affects typesetting is defined, modifies;
Accordingly, playing up tree tectonic element 203 can also be for:
Utilizing amended CSS property value is that the CSS attribute of playing up the node that in tree, this page elements is corresponding carries out assignment.
Wherein, described property value modification subelement specifically can comprise:
First revises subelement, for when described current page elements of resolving is table element, the CSS value of the inline element of table element and table element is modified, so that described table element can enter a new line automatically;
Or,
Second revises subelement, for working as described current page elements of resolving, be list input control, drop-down menu/list, textview field or inline frame element, and while there is the absolute figure that represents its width, described absolute figure is revised as to relative value;
Or,
The 3rd revises subelement, for when described current page elements of resolving is pictorial element, relatively the width value of this pictorial element and the screen width value of mobile terminal, if described width value is greater than the screen width value of mobile terminal, according to the ratio between described width value and the screen width of mobile terminal, width value described in scaled down; If described width value is less than the screen width value of mobile terminal, but be greater than mobile terminal screen width value 1/2nd, the position attribution value of this pictorial element is revised as to demonstration placed in the middle;
Or,
The 4th revises subelement, if be hyperlink element for described current page elements of resolving, and comprises img label and text in described hyperlink element, for described img label, adds border property value;
Or,
The 5th revises subelement, if be a minute p-block element p for described current page elements of resolving, for described minute p-block element p, adds border property value.
In actual applications, playing up tree tectonic element 203 can comprise:
The first attribute removes subelement, for absolute attribute, location attribute, Background attribute and/or the attribute relevant to text display of width height that described current page elements of resolving is comprised, removes;
And/or,
The second attribute removes subelement, for the frame of element BOX Model and fill area attribute are removed.
Wherein, can identification for what guarantee text, this device can also comprise:
Textcolor is revised unit, if for the Background of described current page elements of resolving is removed, revise the color attribute value of the text comprising in described page elements, to guarantee the identification of described text after removing Background.
Wherein, textcolor modification unit specifically can comprise:
The first color is revised subelement, if be white for textcolor in page elements, it is web page text default color that described textcolor is set;
Or,
The second color is revised subelement, if be not white for textcolor in web page element, and described element background colour is opaque, and it is the color that described element background colour has preset value of chromatism that textcolor is set;
Or,
The 3rd color is revised subelement, if be not white for textcolor in web page element, and described element background colour is transparent, textcolor is set and has the color of preset value of chromatism for the background colour of the main element of webpage therewith.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add essential general hardware platform by software and realizes.Understanding based on such, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be personal computer, server, or the network equipment etc.) carry out the method described in some part of each embodiment of the present invention or embodiment.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually referring to, each embodiment stresses is the difference with other embodiment.Especially, for device or system embodiment, because it is substantially similar in appearance to embodiment of the method, so describe fairly simplely, relevant part is referring to the part explanation of embodiment of the method.Apparatus and system embodiment described above is only schematic, the wherein said unit as separating component explanation can or can not be also physically to separate, the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in a plurality of network element.Can select according to the actual needs some or all of module wherein to realize the object of the present embodiment scheme.Those of ordinary skills, in the situation that not paying creative work, are appreciated that and implement.
Above to provided by the present invention in mobile terminal method and the device of display web page, be described in detail, applied specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications.In sum, this description should not be construed as limitation of the present invention.
According to embodiments of the invention, disclose:
A1, a kind of in mobile terminal the method for display web page, it is characterized in that, comprising:
Receive by the request of mobile terminal accessing webpage, according to described request, to web page server, obtain the resource that described webpage is corresponding;
The page elements comprising in described web page resources is resolved, in resolving, judge whether the label that current page element is corresponding affects typesetting, if there is the label that affects typesetting, the described label that affects typesetting is processed;
According to the label configurations after processing, play up the node of tree, judge whether to exist the CSS (cascading style sheet) CSS attribute that affects typesetting, if there is the CSS (cascading style sheet) CSS attribute that affects typesetting, remove the CSS attribute that affects typesetting, according to the tree of playing up of structure, web page contents is drawn and shown afterwards.
A2, according to the method described in claim A1, it is characterized in that, described the described label that affects typesetting processed and comprised:
The label that affects typesetting is removed, to when playing up the node of tree according to the label configurations after processing, the page elements that this label is corresponding is processed as plain text.
A3, according to the method described in claim A2, it is characterized in that, described the label that affects typesetting removed and comprised:
If described current page elements of resolving is common scrolling element, subscript element or subscript element, the label of this page elements is removed.
A4, according to the method described in claim A1, it is characterized in that, described the described label that affects typesetting processed and comprised:
Current page element is removed, so that when playing up the node of tree according to the label configurations after processing, node corresponding to this page elements of regeneration not.
A5, according to the method described in claim A4, it is characterized in that, described current page element removed and comprised:
If described current page elements of resolving is common scrolling element, the element that comprises object, embeds element, subscript element or the subscript element of the page, this page elements removed.
A6, method according to claim 1, is characterized in that, described the described label that affects typesetting is processed and comprised:
By affecting the CSS property value defining in the label of typesetting, modify;
The described node of playing up tree according to the label configurations after processing comprises:
Utilizing amended CSS property value is that the CSS attribute of playing up the node that in tree, this page elements is corresponding carries out assignment.
A7, according to the method described in claim A6, it is characterized in that, describedly by affecting the CSS property value defining in the label of typesetting, modify and comprise:
When described current page elements of resolving is table element, the CSS value of the inline element of table element and table element is modified, so that described table element can enter a new line automatically;
Or,
When described current page elements of resolving is list input control, drop-down menu/list, textview field or inline frame element, and while exist representing the absolute figure of its width, described absolute figure is revised as to relative value;
Or,
When described current page elements of resolving is pictorial element, relatively the width value of this pictorial element and the screen width value of mobile terminal, if described width value is greater than the screen width value of mobile terminal, according to the ratio between described width value and the screen width of mobile terminal, width value described in scaled down; If described width value is less than the screen width value of mobile terminal, but be greater than mobile terminal screen width value 1/2nd, the position attribution value of this pictorial element is revised as to demonstration placed in the middle;
Or,
If described current page elements of resolving is hyperlink element, and comprises img label and text in described hyperlink element, for described img label, add border property value;
Or,
If described current page elements of resolving, for a minute p-block element p, adds border property value for described minute p-block element p.
A8, according to the method described in claim A1, describedly by playing up the CSS attribute that affects typesetting comprising in tree node, remove and comprise:
The absolute attribute of the width height that described current page elements of resolving is comprised, location attribute, Background attribute and/or the attribute relevant to text display remove;
And/or,
Frame in element BOX Model and fill area attribute are removed.
A9, according to the method described in claim A8, it is characterized in that, if the Background of described current page elements of resolving is removed, also comprise:
Revise the color attribute value of the text comprising in described page elements, to guarantee the identification of described text after removing Background.
A10, according to the method described in claim A9, it is characterized in that, the color attribute value of the text comprising in the described page elements of described modification, comprising:
If textcolor is white in page elements, it is web page text default color that described textcolor is set;
Or,
If in web page element, textcolor is not white, and described element background colour is opaque, it is the color that described element background colour has preset value of chromatism that textcolor is set;
Or,
If textcolor is not white in web page element, and described element background colour is transparent, textcolor is set and there is the color of preset value of chromatism for the background colour of the main element of webpage therewith.
B11, a kind of in mobile terminal the device of display web page, it is characterized in that, comprising:
Resource acquisition unit, for receiving by the request of mobile terminal accessing webpage, obtains to web page server the resource that described webpage is corresponding according to described request;
Tag processes unit, for the page elements that described web page resources is comprised, resolve, in resolving, judge whether the label that current page element is corresponding affects typesetting, if there is the label that affects typesetting, the described label that affects typesetting processed;
Play up tree tectonic element, for playing up the node of tree according to the label configurations after processing, judge whether to exist the CSS (cascading style sheet) CSS attribute that affects typesetting, if there is the CSS (cascading style sheet) CSS attribute that affects typesetting, remove the CSS attribute that affects typesetting, according to the tree of playing up of structure, web page contents is drawn and shown afterwards.
B12, according to the device described in claim B11, it is characterized in that, described tag processes unit comprises:
Label removes subelement, for the label that affects typesetting is removed, to when playing up the node of tree according to the label configurations after processing, the page elements that this label is corresponding is processed as plain text.
B13, according to the device described in claim B12, it is characterized in that, described label remove subelement specifically for: if described current page elements of resolving is common scrolling element, subscript element or subscript element, the label of this page elements is removed.
B14, according to the device described in claim B11, it is characterized in that, described tag processes unit comprises:
Element removes subelement, for current page element is removed, so that when playing up the node of tree according to the label configurations after processing, and node corresponding to this page elements of regeneration not.
B15, according to the device described in claim B14, it is characterized in that, described element remove subelement specifically for: if described current page elements of resolving is common scrolling element, the element that comprises object, element, subscript element or the subscript element that embeds the page, this page elements is removed.
B16, according to the device described in claim B11, it is characterized in that, described tag processes unit comprises:
Property value is revised subelement, for the CSS property value that the label that affects typesetting is defined, modifies;
Described play up tree tectonic element also for:
Utilizing amended CSS property value is that the CSS attribute of playing up the node that in tree, this page elements is corresponding carries out assignment.
B17, according to the device described in claim B16, it is characterized in that, described property value is revised subelement and is comprised:
First revises subelement, for when described current page elements of resolving is table element, the CSS value of the inline element of table element and table element is modified, so that described table element can enter a new line automatically;
Or,
Second revises subelement, for working as described current page elements of resolving, be list input control, drop-down menu/list, textview field or inline frame element, and while there is the absolute figure that represents its width, described absolute figure is revised as to relative value;
Or,
The 3rd revises subelement, for when described current page elements of resolving is pictorial element, relatively the width value of this pictorial element and the screen width value of mobile terminal, if described width value is greater than the screen width value of mobile terminal, according to the ratio between described width value and the screen width of mobile terminal, width value described in scaled down; If described width value is less than the screen width value of mobile terminal, but be greater than mobile terminal screen width value 1/2nd, the position attribution value of this pictorial element is revised as to demonstration placed in the middle;
Or,
The 4th revises subelement, if be hyperlink element for described current page elements of resolving, and comprises img label and text in described hyperlink element, for described img label, adds border property value;
Or,
The 5th revises subelement, if be a minute p-block element p for described current page elements of resolving, for described minute p-block element p, adds border property value.
B18, according to the device described in claim B11, described in play up tree tectonic element comprise:
The first attribute removes subelement, for absolute attribute, location attribute, Background attribute and/or the attribute relevant to text display of width height that described current page elements of resolving is comprised, removes;
And/or,
The second attribute removes subelement, for the frame of element BOX Model and fill area attribute are removed.
B19, according to the device described in claim B18, it is characterized in that, also comprise:
Textcolor is revised unit, if for the Background of described current page elements of resolving is removed, revise the color attribute value of the text comprising in described page elements, to guarantee the identification of described text after removing Background.
B20, according to the device described in claim B19, it is characterized in that, described textcolor is revised unit and is comprised:
The first color is revised subelement, if be white for textcolor in page elements, it is web page text default color that described textcolor is set;
Or,
The second color is revised subelement, if be not white for textcolor in web page element, and described element background colour is opaque, and it is the color that described element background colour has preset value of chromatism that textcolor is set;
Or,
The 3rd color is revised subelement, if be not white for textcolor in web page element, and described element background colour is transparent, textcolor is set and has the color of preset value of chromatism for the background colour of the main element of webpage therewith.

Claims (10)

1. a method for display web page in mobile terminal, is characterized in that, comprising:
Receive by the request of mobile terminal accessing webpage, according to described request, to web page server, obtain the resource that described webpage is corresponding;
The page elements comprising in described web page resources is resolved, in resolving, judge whether the label that current page element is corresponding affects typesetting, if there is the label that affects typesetting, the described label that affects typesetting is processed;
According to the label configurations after processing, play up the node of tree, judge whether to exist the CSS (cascading style sheet) CSS attribute that affects typesetting, if there is the CSS (cascading style sheet) CSS attribute that affects typesetting, remove the CSS attribute that affects typesetting, according to the tree of playing up of structure, web page contents is drawn and shown afterwards.
2. method according to claim 1, is characterized in that, described the described label that affects typesetting is processed and comprised:
The label that affects typesetting is removed, to when playing up the node of tree according to the label configurations after processing, the page elements that this label is corresponding is processed as plain text.
3. method according to claim 2, is characterized in that, described the label that affects typesetting is removed and comprised:
If described current page elements of resolving is common scrolling element, subscript element or subscript element, the label of this page elements is removed.
4. method according to claim 1, is characterized in that, described the described label that affects typesetting is processed and comprised:
Current page element is removed, so that when playing up the node of tree according to the label configurations after processing, node corresponding to this page elements of regeneration not.
5. method according to claim 4, is characterized in that, described current page element is removed and comprised:
If described current page elements of resolving is common scrolling element, the element that comprises object, embeds element, subscript element or the subscript element of the page, this page elements removed.
6. method according to claim 1, is characterized in that, described the described label that affects typesetting is processed and comprised:
By affecting the CSS property value defining in the label of typesetting, modify;
The described node of playing up tree according to the label configurations after processing comprises:
Utilizing amended CSS property value is that the CSS attribute of playing up the node that in tree, this page elements is corresponding carries out assignment.
7. method according to claim 6, is characterized in that, describedly by affecting the CSS property value defining in the label of typesetting, modifies and comprises:
When described current page elements of resolving is table element, the CSS value of the inline element of table element and table element is modified, so that described table element can enter a new line automatically;
Or,
When described current page elements of resolving is list input control, drop-down menu/list, textview field or inline frame element, and while exist representing the absolute figure of its width, described absolute figure is revised as to relative value;
Or,
When described current page elements of resolving is pictorial element, relatively the width value of this pictorial element and the screen width value of mobile terminal, if described width value is greater than the screen width value of mobile terminal, according to the ratio between described width value and the screen width of mobile terminal, width value described in scaled down; If described width value is less than the screen width value of mobile terminal, but be greater than mobile terminal screen width value 1/2nd, the position attribution value of this pictorial element is revised as to demonstration placed in the middle;
Or,
If described current page elements of resolving is hyperlink element, and comprises img label and text in described hyperlink element, for described img label, add border property value;
Or,
If described current page elements of resolving, for a minute p-block element p, adds border property value for described minute p-block element p.
8. method according to claim 1, describedly by playing up the CSS attribute that affects typesetting comprising in tree node, remove and comprise:
The absolute attribute of the width height that described current page elements of resolving is comprised, location attribute, Background attribute and/or the attribute relevant to text display remove;
And/or,
Frame in element BOX Model and fill area attribute are removed.
9. method according to claim 8, is characterized in that, if the Background of described current page elements of resolving is removed, also comprises:
Revise the color attribute value of the text comprising in described page elements, to guarantee the identification of described text after removing Background.
10. a device for display web page in mobile terminal, is characterized in that, comprising:
Resource acquisition unit, for receiving by the request of mobile terminal accessing webpage, obtains to web page server the resource that described webpage is corresponding according to described request;
Tag processes unit, for the page elements that described web page resources is comprised, resolve, in resolving, judge whether the label that current page element is corresponding affects typesetting, if there is the label that affects typesetting, the described label that affects typesetting processed;
Play up tree tectonic element, for playing up the node of tree according to the label configurations after processing, judge whether to exist the CSS (cascading style sheet) CSS attribute that affects typesetting, if there is the CSS (cascading style sheet) CSS attribute that affects typesetting, remove the CSS attribute that affects typesetting, according to the tree of playing up of structure, web page contents is drawn and shown afterwards.
CN201410525792.4A 2012-04-23 2012-04-23 A kind of method and device for showing webpage in the terminal Expired - Fee Related CN104217037B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410525792.4A CN104217037B (en) 2012-04-23 2012-04-23 A kind of method and device for showing webpage in the terminal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210120620.XA CN102663126B (en) 2012-04-23 2012-04-23 Method and device for displaying webpage in mobile terminal
CN201410525792.4A CN104217037B (en) 2012-04-23 2012-04-23 A kind of method and device for showing webpage in the terminal

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201210120620.XA Division CN102663126B (en) 2012-04-23 2012-04-23 Method and device for displaying webpage in mobile terminal

Publications (2)

Publication Number Publication Date
CN104217037A true CN104217037A (en) 2014-12-17
CN104217037B CN104217037B (en) 2018-03-23

Family

ID=52098526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410525792.4A Expired - Fee Related CN104217037B (en) 2012-04-23 2012-04-23 A kind of method and device for showing webpage in the terminal

Country Status (1)

Country Link
CN (1) CN104217037B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106055575A (en) * 2016-05-19 2016-10-26 天脉聚源(北京)传媒科技有限公司 Method and device for optimized loading of website page
CN106294504A (en) * 2015-06-09 2017-01-04 阿里巴巴集团控股有限公司 The display packing of a kind of Web page icon and device
CN106503212A (en) * 2016-10-27 2017-03-15 中企动力科技股份有限公司 A kind of method to set up of web page element pattern and device
CN106686037A (en) * 2015-11-09 2017-05-17 广州市动景计算机科技有限公司 Page detecting method, device, equipment and system
CN106874271A (en) * 2015-12-10 2017-06-20 上海新工式网络科技有限公司 A kind of method and system that PC webpages are converted to mobile terminal webpage
CN107247691A (en) * 2017-05-24 2017-10-13 腾讯科技(深圳)有限公司 A kind of display methods of text message, device, mobile terminal and storage medium
CN107632970A (en) * 2017-09-29 2018-01-26 彩讯科技股份有限公司 A kind of Mail Contents code-transferring method and device
CN108280101A (en) * 2017-01-25 2018-07-13 广州市动景计算机科技有限公司 user terminal and web page picture resource loading device and method
CN109977331A (en) * 2019-03-04 2019-07-05 东软集团股份有限公司 Control the method and device that page resource executes
CN110309044A (en) * 2018-03-20 2019-10-08 福建天泉教育科技有限公司 Pattern changed test method and terminal in a kind of Web system
CN110413566A (en) * 2019-07-04 2019-11-05 广州视源电子科技股份有限公司 Courseware stores and processs method, apparatus, intelligent interaction plate and storage medium
CN112507257A (en) * 2020-12-07 2021-03-16 北京达佳互联信息技术有限公司 Webpage display method, device, equipment and storage medium
CN112784202A (en) * 2021-02-03 2021-05-11 中国电子科技集团公司第二十八研究所 Method for improving definition of webpage screenshot based on WEB technology
CN114817804A (en) * 2022-03-31 2022-07-29 北京达佳互联信息技术有限公司 Webpage generation method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6556217B1 (en) * 2000-06-01 2003-04-29 Nokia Corporation System and method for content adaptation and pagination based on terminal capabilities
CN102065106A (en) * 2009-11-16 2011-05-18 中国电信股份有限公司 Web flow collator, and method and system for accessing Web page by using terminal
CN102184249A (en) * 2011-05-23 2011-09-14 广州市动景计算机科技有限公司 Webpage layout method and device based on mobile terminal
CN102184231A (en) * 2011-05-12 2011-09-14 广州市动景计算机科技有限公司 Method and device for acquiring page resources
CN102325188A (en) * 2011-09-16 2012-01-18 北京新媒传信科技有限公司 Method for realizing webpage browsing on a mobile terminal and system thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6556217B1 (en) * 2000-06-01 2003-04-29 Nokia Corporation System and method for content adaptation and pagination based on terminal capabilities
CN102065106A (en) * 2009-11-16 2011-05-18 中国电信股份有限公司 Web flow collator, and method and system for accessing Web page by using terminal
CN102184231A (en) * 2011-05-12 2011-09-14 广州市动景计算机科技有限公司 Method and device for acquiring page resources
CN102184249A (en) * 2011-05-23 2011-09-14 广州市动景计算机科技有限公司 Webpage layout method and device based on mobile terminal
CN102325188A (en) * 2011-09-16 2012-01-18 北京新媒传信科技有限公司 Method for realizing webpage browsing on a mobile terminal and system thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨灵芝: "《基于Cocoon框架的网页自适应转换模型研究》", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294504A (en) * 2015-06-09 2017-01-04 阿里巴巴集团控股有限公司 The display packing of a kind of Web page icon and device
CN106686037A (en) * 2015-11-09 2017-05-17 广州市动景计算机科技有限公司 Page detecting method, device, equipment and system
CN106686037B (en) * 2015-11-09 2020-10-16 阿里巴巴(中国)有限公司 Page detection method, device, equipment and system
CN106874271A (en) * 2015-12-10 2017-06-20 上海新工式网络科技有限公司 A kind of method and system that PC webpages are converted to mobile terminal webpage
CN106055575A (en) * 2016-05-19 2016-10-26 天脉聚源(北京)传媒科技有限公司 Method and device for optimized loading of website page
CN106503212A (en) * 2016-10-27 2017-03-15 中企动力科技股份有限公司 A kind of method to set up of web page element pattern and device
CN108280101A (en) * 2017-01-25 2018-07-13 广州市动景计算机科技有限公司 user terminal and web page picture resource loading device and method
CN107247691B (en) * 2017-05-24 2021-10-08 腾讯科技(深圳)有限公司 Text information display method and device, mobile terminal and storage medium
CN107247691A (en) * 2017-05-24 2017-10-13 腾讯科技(深圳)有限公司 A kind of display methods of text message, device, mobile terminal and storage medium
CN107632970A (en) * 2017-09-29 2018-01-26 彩讯科技股份有限公司 A kind of Mail Contents code-transferring method and device
CN110309044A (en) * 2018-03-20 2019-10-08 福建天泉教育科技有限公司 Pattern changed test method and terminal in a kind of Web system
CN110309044B (en) * 2018-03-20 2022-10-21 福建天泉教育科技有限公司 Method and terminal for testing style change in Web system
CN109977331A (en) * 2019-03-04 2019-07-05 东软集团股份有限公司 Control the method and device that page resource executes
CN110413566A (en) * 2019-07-04 2019-11-05 广州视源电子科技股份有限公司 Courseware stores and processs method, apparatus, intelligent interaction plate and storage medium
CN112507257A (en) * 2020-12-07 2021-03-16 北京达佳互联信息技术有限公司 Webpage display method, device, equipment and storage medium
CN112507257B (en) * 2020-12-07 2024-03-26 北京达佳互联信息技术有限公司 Webpage display method, device, equipment and storage medium
CN112784202A (en) * 2021-02-03 2021-05-11 中国电子科技集团公司第二十八研究所 Method for improving definition of webpage screenshot based on WEB technology
CN112784202B (en) * 2021-02-03 2022-10-04 中国电子科技集团公司第二十八研究所 Method for improving definition of webpage screenshot based on WEB technology
CN114817804A (en) * 2022-03-31 2022-07-29 北京达佳互联信息技术有限公司 Webpage generation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN104217037B (en) 2018-03-23

Similar Documents

Publication Publication Date Title
CN102663126B (en) Method and device for displaying webpage in mobile terminal
CN104217037A (en) Method and device for displaying web page in mobile terminal
CN105373567B (en) Page generation method and client
US9111007B2 (en) Adaptive rendering of a webpage on an electronic display device
CN103365855A (en) Method and server for generating web pages
CN104820589A (en) Method and device for dynamically adapting webpage
CN102902545A (en) Decomposing markup language elements for animation
US20170031889A1 (en) Creating a communication editable in a browser independent of platform and operating system
Ratha et al. HTML5 in web development: a new approach
CN106874387B (en) Method for displaying real-time information in self-adaptive HTML (Hypertext markup language) scrolling mode
Rahman Jump Start Bootstrap: Get Up to Speed with Bootstrap in a Weekend
CN115268904A (en) User interface design file generation method, device, equipment and medium
CN104714802A (en) Method and device for displaying additional information of HTML element
Moreto Bootstrap 4 By Example
CN102841890B (en) A kind of data processing method for document structure and device
Wyke-Smith Stylin'with CSS: a designer's guide
Kyrnin Sams Teach Yourself HTML5 Mobile Application Development in 24 Hours
KR101397178B1 (en) System for supporting a customizing of program module
CN106682009A (en) EPUB (electronic publication) browser page generating method and device and cellphone
Mohamed et al. Responsive web design inFluid grid concept literature survey
CN114115880A (en) Method for sucking top of page table operation column under screens of different sizes
Washington Modern Practices for Responsive Web Design and Web Accessibility
Kyrnin Bootstrap in 24 Hours, Sams Teach Yourself
JP2016024643A (en) Conversion method of hypertext document to vertical writing and conversion program of hypertext document to vertical writing
Powers Adobe Dreamweaver CS5. 5 Studio Techniques: Designing and Developing for Mobile with jQuery, HTML5, and CSS3

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180323

Termination date: 20210423

CF01 Termination of patent right due to non-payment of annual fee