CN105979392A - Webpage display method and browser - Google Patents
Webpage display method and browser Download PDFInfo
- Publication number
- CN105979392A CN105979392A CN201510583385.3A CN201510583385A CN105979392A CN 105979392 A CN105979392 A CN 105979392A CN 201510583385 A CN201510583385 A CN 201510583385A CN 105979392 A CN105979392 A CN 105979392A
- Authority
- CN
- China
- Prior art keywords
- browser
- night
- css
- web page
- attribute information
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/478—Supplemental services, e.g. displaying phone caller identification, shopping application
- H04N21/4782—Web browsing, e.g. WebTV
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/8166—Monomedia components thereof involving executable data, e.g. software
- H04N21/8173—End-user applications, e.g. Web browser, game
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention provides a webpage display method and a browser. The method is applied to an intelligent television terminal. The method comprises: it is determined that the intelligent television terminal accesses a browser night mode, the attribute information in a cascading style sheet (CSS) corresponding to the current webpage displayed by the browser is configured to the attribute information of the browser night mode; and the current webpage is rendered and the rendered current webpage is displayed according to the attribute information of the browser night mode of the CSS. According to the webpage display scheme provided by the embodiment of the invention, when the light around the browser is dark, the webpage displayed by the browser does not stimulate human eyes, and the user may have the feeling of eyestrain after browsing the webpage for a long time, and therefore the user's usage experience is improved.
Description
Technical field
The present invention relates to Intelligent television terminal technical field, particularly relate to a kind of Webpage display process and clear
Look at device.
Background technology
Intelligent television is extremely important science and technology terminal in the modern life, and it is sent in Intelligent housing
The great expectations of the heart.Along with the support energetically to television video broadcasting content of each big video website, and body-sensing
Game and the emergence of TV shopping, intelligent television, in human lives, plays the most important role.
Main force's product as intelligent television: i.e. based on Android system the intelligent television of Android intelligent television,
It it is the main flow of current Related product.
Intelligent television with an important difference of common TV is: intelligent television, can as a terminal
To provide the user with the service connecting the Internet, the resource made full use of internet, come in enriched viewing
Hold.It is known that browser is user when accessing Internet resources, a critical network entrance is logical
Cross browser client and can access massive video and the topical news that the Internet provides, can realize " the most not
Go out family, just understand affairs in this world " good vision.So, can provide connection mutually based on intelligent television
The service of networking, user is the most browsable respectively by installation browser on the intelligent television that is connected with the Internet
The class network information, such as: massive video and topical news etc..
User is when using the browser access network installed on intelligent television, and existing browser is only
It is provided that a kind of browse mode in the daytime browsing webpage for viewing on device ambient light time brighter.And this
Plant browse mode, when browser ambient light is dark, human eye can be produced stronger stimulation, use the head of a household
Time browses webpage in this condition, can produce the sensation of eyestrain, even produce visual deterioration
Pernicious consequence, poor user experience.And due to poor user experience, user then can select other terminal
Carry out browsing device net page, cause the utilization rate of intelligent television to reduce the most at last.
Summary of the invention
Embodiments provide Webpage display process and browser, in order to solve existing Intelligent electric
The poor user experience existed due to the webpage shown depending on the browser of upper installation and the Intelligent electric caused
Depending on the low problem of utilization rate.
In order to solve the problems referred to above, the invention discloses a kind of Webpage display process, described method is applied
In Intelligent television terminal, after described method comprises determining that Intelligent television terminal enters browser Night,
Attribute information in CSS CSS corresponding for the current web page of described browser display is configured to clear
Look at the attribute information of device Night;According to the attribute information of the browser Night of described CSS, wash with watercolours
Contaminate described current web page and display render after described current web page.
In order to solve the problems referred to above, the invention also discloses a kind of browser, described browser is installed on
On Intelligent television terminal, described browser includes: configuration module, is used for determining that Intelligent television terminal enters
After entering browser Night, by CSS corresponding for the current web page of described browser display
Attribute information in CSS is configured to the attribute information of browser Night;Render display module, use
In the attribute information of the browser Night according to described CSS, render described current web page and show
Described current web page after rendering.
The web displaying scheme that the embodiment of the present invention provides, browser depends in the case of light is brighter around
So can generate under browse mode in the daytime and show webpage.And when determining that Intelligent television terminal enters browser
After Night (such as: determine that browser ambient light is dark, or receive browsing browser
When pattern switches under browse mode at night), then by cascading style corresponding for the current web page of browser display
Attribute information in table CSS is configured to the attribute information of browser Night, to be rendered by current web page
Become to be adapted to the dark webpage of browser ambient light.Visible, the webpage provided by the embodiment of the present invention is shown
Showing scheme, when browser ambient light is dark, the webpage shown by browser can't stimulate human eye,
The long-time browsing device net page of user also can produce the sensation of eyestrain, it is possible to promotes the experience of user.
Owing to the experience of user gets a promotion, user just be happy to use Intelligent television terminal to browse webpage,
Therefore, it is possible to improve the utilization rate of intelligent television.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to reality
Execute the required accompanying drawing used in example or description of the prior art to be briefly described, it should be apparent that under,
Accompanying drawing during face describes is some embodiments of the present invention, for those of ordinary skill in the art,
On the premise of not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the flow chart of steps of a kind of Webpage display process of according to embodiments of the present invention;
Fig. 2 is the flow chart of steps of a kind of Webpage display process of according to embodiments of the present invention two;
Fig. 3 is in the Webpage display process shown in embodiment two, operates in Browser process
Layer Tree and synthesizer are schematic diagram alternately;
Fig. 4 is the structured flowchart of a kind of browser of according to embodiments of the present invention three;
Fig. 5 is the structured flowchart of a kind of browser of according to embodiments of the present invention four.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with this
Accompanying drawing in bright embodiment, is clearly and completely described the technical scheme in the embodiment of the present invention,
Obviously, described embodiment is a part of embodiment of the present invention rather than whole embodiments.Based on
Embodiment in the present invention, those of ordinary skill in the art are obtained under not making creative work premise
The every other embodiment obtained, broadly falls into the scope of protection of the invention.
The Webpage display process of the embodiment of the present invention is applicable to Intelligent television terminal.When user passes through Intelligent electric
When opening browser browsing pages depending on terminal, the tool that browser can be presently according to Intelligent television terminal
Body light environment chooses whether that entrance browser Night carries out the page and shows.Such as: current time is
Night, or when Intelligent television terminal marginal ray is dark, then open browser Night, according to this
Page display method display webpage in inventive embodiments.
Embodiment one
With reference to Fig. 1, it is shown that the flow chart of steps of a kind of Webpage display process of the embodiment of the present invention one.
The Webpage display process of the embodiment of the present invention comprises the following steps:
Step S102: after determining that Intelligent television terminal enters browser Night, by browser display
Attribute information in CSS CSS that current web page is corresponding is configured to the attribute of browser Night
Information.
Attribute information in CSS CSS that the current web page to browser display is corresponding is joined
When putting, can realize being configured browser Night by the resolution rules of amendment CSS attribute information
Attribute information.Such as: two sets resolution rules to CSS attribute information is set in browser kernel,
The most a set of for viewing on device Night, another set of for viewing on device day inter mode, in acquiescence feelings
It is to call the resolution rules for viewing on device day inter mode the CSS attribute information that webpage is corresponding is entered under condition
Row resolves, but, after determining that Intelligent television terminal enters browser Night, then call and be applicable to
The CSS attribute information that webpage is corresponding is resolved by the resolution rules of browser Night.
Can also be configured by revising the design parameter of the CSS attribute information comprised in current web page
Attribute information for browser Night.
Such as: the design parameter of a CSS attribute information of a web page tag in current web page is 0,
This design parameter can be revised as 1 when amendment, wherein, 1 to be used for indicating background colour be white, and 0 uses
It is black in instruction background colour.
Step S104: according to the attribute information of the browser Night of CSS, render current web page and show
Show the current web page after rendering.
Browser is rendered according to the attribute information of the browser Night of CSS corresponding to current web page
Implementing of current web page, may refer to browser and renders net according to the CSS attribute information that webpage is corresponding
The correlation technique of page, is not specifically limited this in the present embodiment.
The Webpage display process provided by the embodiment of the present invention, the situation that browser light around is brighter
Under still can generate under browse mode in the daytime and show webpage.And it is clear when determining that Intelligent television terminal enters
Look at after device Night (such as: determine that browser ambient light is dark, or receive browser
When browse mode switches under browse mode at night), then by stacking corresponding for the current web page of browser display
Attribute information in CSS CSS is configured to the attribute information of browser Night, with by current web page
It is rendered to be adapted to the dark webpage of browser ambient light.Net that is visible, that provided by the embodiment of the present invention
Page display packing, when browser ambient light is dark, the webpage shown by browser can't stimulate people
Eye, the long-time browsing device net page of user also can produce the sensation of eyestrain, it is possible to promotes the use of user
Experience.Owing to the experience of user gets a promotion, user is just happy to use Intelligent television terminal to browse
Webpage, therefore, it is possible to improve the utilization rate of intelligent television.
Embodiment two
With reference to Fig. 2, it is shown that the flow chart of steps of a kind of Webpage display process of the embodiment of the present invention two.
In the present embodiment as a example by the upper browser installed of intelligent terminal based on Android system, to the present invention
The Webpage display process of embodiment specifically includes following steps:
Step S202: browser determines that Intelligent television terminal enters browser Night.
Browser determines that Intelligent television terminal entrance browser Night can be the most square by following two
Formula is determined:
One preferably determines that mode is: browser determines the time zone that Intelligent television terminal current location is corresponding
And current time, determine that whether current location is under current time according to the time zone that determines and current time
Night, if, it is determined that Intelligent television terminal enters browser Night.
Another kind preferably determines that mode is: browser receives the browser display mould to Intelligent television terminal
The selection instruction of formula, when the selection instruction received is for indicating Night, it is determined that intelligent television
Terminal enters browser Night.
The above-mentioned preferred implementation of provided both the first be whether browser automatic decision is opened
Browser Night, another kind of, then it is browser according to user operation passive unlatching browser night
Pattern.
It is directed to whether browser automatic decision opens the scheme of browser Night, needs at browser
Set center startup intelligence browse mode.So-called intelligence browse mode, i.e. user are using browser
During online, browser obtains the time zone of this position and current concrete time automatically, and according to the time zone obtained
Determine night with the time, if user opens intelligence browse mode switch, then start mould at night at night
Formula, starts day inter mode by day.If user closes intelligence browse mode, the most unanimously use mould in the daytime
Formula.
Step S204: the background colour of synthesizer corresponding for current page is arranged to and Night by browser
The color matched.
Browser load webpage time, each non-loaded of figure layer in the figure layer tree that current web page is corresponding
In the case of, the showed user of browser is then the background that synthesizer is arranged.In order to avoid the back of the body shown
The color of the color of scape each figure layer corresponding with current web page content and web page contents color saltus step, then need
The background colour of synthesizer is configured, its background colour is arranged to the color matched with Night,
Such as: the color such as black, Lycoperdon polymorphum Vitt.So, just can be in the feelings of each non-loaded of figure layer corresponding to webpage
Under condition, show the background of one synthesizer of user in advance, when each figure layer that current web page is corresponding is shown
Color saltus step also will not occur.
Wherein, synthesizer is for generating current page by each figure lamination in figure layer tree corresponding for current web page.
Step S206: the background colour of each figure layer in figure layer tree corresponding for current web page is arranged to by browser
The color matched with Night.
In the embodiment of the present invention, in order to show the good viewing experience of user, make Intelligent television terminal in advance
Enter all scenes that can occur of webpage fit that browser Night system is shown, in such as webpage
Holding does not has loading to get off, or web page contents is empty scene.Those skilled in the art can understand, net
Page content does not loads, or web page contents is that under empty scene, what browser was shown is default
Figure layer, therefore need the color that the background colour of default map layer is arranged to match with Night.Such as:
The color such as black, Lycoperdon polymorphum Vitt.
Due to being set to the background colour setting of each figure layer in the figure layer tree of webpage of browser kernel acquiescence
Become and the color of patterns match in the daytime, such as: white.And if not corresponding to current web page figure layer tree
In the background colour of each figure layer be configured, then when showing, before web page contents has not rendered,
The most first show figure layer background colour, displayed web page content the most again.Web page contents owing to showing is and the page
The color that pattern matches, and respectively scheming layer background colour is and the background colour of patterns match in the daytime so, to incite somebody to action
The webpage being shown to user is caused to be experienced by bright dimmed generation saltus step, the preview affecting user.If will be current
The background colour of each figure layer in the figure layer tree that webpage is corresponding is arranged to the color matched with Night, by
Same or like with the color of web page contents in the background colour of each figure layer, therefore, within showing current web page
Rong Shi, then can avoid webpage by bright dimmed saltus step.
It should be noted that above-mentioned steps S204 and step S206 there is no sequencing upon execution, and
And, also can only select one of them step to perform during implementing, perform when selecting one of them
Time, it is only that webpage color saltus step can occur.
During implementing, can arrange and whether the background colour of synthesizer is applied in each figure layer,
Background colour as each figure layer.In the case of arranging and not only having performed step S206 but also performed step S204,
Then without arranging, the background colour of synthesizer is applied in each figure layer, and for arrange execution step S204 but
In the case of not performing step S206, then need to be arranged to be applied to the background colour of synthesizer each figure layer
In.
Specifically: when the background colour of only corresponding to current page synthesizer is arranged to and Night phase
During the color joined, match with Night the background colour of synthesizer corresponding for current page is arranged to
Color step after, in addition it is also necessary to figure layer tree corresponding for current page will respectively scheme layer by synthesizer
Background colour be arranged to the color identical with the background colour of synthesizer.
Referring to Fig. 3, browser will respectively be schemed layer in figure layer tree corresponding for current page by synthesizer
Background colour be arranged to the logic that realizes of the color identical with the background colour of synthesizer and illustrate:
In the figure layer tree that the background colour of the synthesizer corresponding to current page and current web page are corresponding
When the background colour of each figure layer is configured, relate to Chromium kernel (i.e. browser kernel) to webpage
Render and show logic.The concept of Layer Tree (i.e. figure layer tree) is present in browser kernel two
Position: one is in Sandbox process (transmission packet procedures);Another is Browser process
In (navigation process).The content displaying of Layer Tree, needs synthesizer be managed it and use,
Correspondingly, during the concept of synthesizer there is also above-mentioned two process.Accompanying drawing 3 is to operating in Browser
Layer Tree in process and the working relation schematic diagram (i.e. mutual schematic diagram) of synthesizer.
As it is shown on figure 3, browser passes through synthesizer by each figure layer in figure layer tree corresponding for current page
When background colour is arranged to the color identical with the background colour of synthesizer, first pass through the interface that synthesizer provides
Connect the chromosome layer in figure layer tree and figure number of plies cluster;Secondly, by figure layer woodlot collection interface to each figure
Layer carries out background colour amendment, is modified as the color identical with synthesizer background colour with the background colour by each figure layer.
It should be noted that the LayerTree operated in Sandbox process and synthesizer are the biggest
Body is also such, therefore, in the present embodiment repeats no more this.
Step S208: browser is by CSS (Cascading Style Sheets corresponding for the current web page of display
CSS) in attribute information be configured to the attribute information of browser Night.
At present, writing of webpage is all based on HTML (Hypertext Markup Language, hypertext mark
Note language) relevant criterion and specification.I.e. one webpage is made up of multiple web page tag.At front page layout
In technology, CSS and JavaScript technology is that webpage supports that colourful content and effect are made that important
Contribution.Can there is at least one CSS attribute following in most html web page label: color (face
Color), background (background), background-color (background color), background-image
(background image), text-shadow (theme shade).These CSS attributes and html web page label exhibition
The color shown and background are correlated with.Visible, current web page is to there being multiple web page tag, and each net
Page label is to there being correspondingly CSS attribute information, and if desired renders current under browser Night
During webpage, then these CSS attribute informations to current web page is corresponding are needed to configure, so that after Pei Zhi
Each CSS attribute information can adapt to the page rendering requirement of browser Night.
Be below two kinds by the attribute that CSS information configuration is browser Night corresponding for current web page
Two kinds of preferred implementations of information:
First preferred implementation is:
Browser kernel is invoked in kernel the CSS corresponding with Night arranged and resolves standard pattern
Table, wherein, CSS resolves standard pattern table and includes: believed by the attribute in CSS corresponding for current web page
Breath is configured to the configuration rule of the attribute information of browser Night.
Being provided with two set CSS in browser kernel and resolve standard pattern table, wherein, a set of CSS resolves
Standard pattern table and browser patterns match in the daytime, another set of, match with browser Night.
So, it is not necessary to the HTML that amendment current web page is corresponding, it is only through changing configuration rule, can realize
Current web page is shown under Night.
Such as: the CSS attribute information background of a certain web page tag in current web page, browsing
The CSS of device patterns match in the daytime resolves in standard pattern table and fixes the equipping rules that this attribute information is corresponding
For not having, then prove this web page tag not to be arranged background.And it is this attribute information background equally,
Resolve in standard pattern table at the CSS of browser patterns match in the daytime and fix corresponding the joining of this attribute information
Putting principle is background-:#151413, is Lycoperdon polymorphum Vitt for indicating the background display effect of web page tag.
Visible, in current web page same CSS attribute information, due to matching principle different web pages label
Show different effects.When all of web page tag in a webpage all carry out so configured after,
One web page display effect out be i.e. background be Lycoperdon polymorphum Vitt, in webpage, font is seted off by contrast highlighted.So realize
The effect of browser Night.
This kind of preferred version, when determining that employing browse mode at night accesses webpage, will adapt to browser
The CSS of Night resolves standard and (default CSS parsing standard is i.e. adapted to browser day inter mode
CSS resolves standard) cover, to realize the CSS parsing standard under browse mode at night.
Specifically for CSS resolve standard switching part, can in browser kernel file:
The definition carrying out in CSSDefaultStyleSheets.cpp being correlated with realizes, and is defined as follows:
Wherein, under normal CSS resolves standard (browser day, the CSS of inter mode resolved standard) correspondence
Object can be defined as follows:
Default Rules=String (htmlCss, sizeof (htmlCss))+
RenderTheme::theme().extraDefaultStyleSheet()。
The object that CSS under browser Night resolves under standard correspondence can be defined as follows:
Default Rules=String (htmlCss, sizeof (htmlCss))+
String(nightmodeCss,sizeof(nightmodeCss))+
RenderTheme::theme().extraDefaultStyleSheet()。
When switching over CSS parsing standard, need object committed memory corresponding for parsing standard before
Release, then creates corresponding new CSS and resolves the object of standard, and its concrete implementation code is as follows:
Void CSSDefaultStyleSheets::changeNightMode (bool night_or_not) // will
CSS resolves standard and changes into Night;
It should be noted that about the generation of nightmodeCss object, in compilation process, pass through
Python script, reads conversion by nightmode.css file, and more changed name is nightmodeCss.
The following program displays partial content of nightmode.css file:
This section of code is the color to input, selec, button, textarea web page tag in HTML
It is modified with background-color attribute, and its value is fixed.In order to reach good bandwagon effect,
Here, also box-shadow, border-color attribute of these four labels is changed.
It is only to list an instantiation it should be noted that above-mentioned, to browser Night mutually
The partial content that the CSS joined resolves in standard pattern table is illustrated.During implementing, clear
The CSS standard pattern table under device Night of looking at is not unique, can be by those skilled in the art according to reality
Border demand is configured.Such as, could be arranged under Night, webpage entirety presents black, but
Simultaneously it is also assumed that under Night, webpage entirety presents Lycoperdon polymorphum Vitt.For another example, night can be arranged on
Under pattern, in webpage, font presents navy blue, but is also provided with thinking under Night simultaneously, word in webpage
Body presents light green color.The standard of these patterns is to work in coordination with collocation, or sets according to the hobby of different people
Put.
The preferred implementation of the second is:
Browser kernel is invoked in kernel the CSS corresponding with Night arranged and resolves standard pattern
Table;Standard pattern table is resolved each web page tag in HTML corresponding for current page is corresponding according to CSS
CSS attribute information correspondence change to the attribute information of browser Night.
Or,
Browser kernel is invoked in kernel the CSS corresponding with Night arranged and resolves standard pattern
Table;Resolve standard pattern table according to CSS in the HTML that current page is corresponding, insert each web page tag pair
The attribute information of the browser Night answered;Wherein, the browser night that each web page tag of insertion is corresponding
The priority of the attribute information of inter mode, the CSS corresponding higher than each web page tag comprised in HTML belongs to
Property information.
Unlike the first implementation, this kind of implementation needs current web page corresponding
HTML modifies, and then renders amended HTML and obtains adapting to browser mould at night
Webpage under formula.The preferred implementation of the second, can be by the loadJavaScript of webview assembly
Method, can resolve CSS content in standard pattern, be inserted into the HTML that the webpage that will show is corresponding
In, so have changed webpage source code, i.e. reach the effect of browse mode at night.
Step S210: browser, according to the attribute information of the browser Night of CSS, renders current net
Page, shows the current web page after rendering.
Being directed to the preferred implementation of the first in step S208, browser browses according to CSS's
The attribute information of device Night, when rendering current web page: resolve in standard pattern table according to CSS and arrange
Configuration rule, and each web page tag in HTML HTML corresponding to current web page
Attribute information, renders each web page tag that current web page is corresponding, renders each web page tag into night
Inter mode.
The preferred implementation of the second being directed in step S208, browser browses according to CSS's
The attribute information of device Night, when rendering current web page: only need to resolve according to the CSS of browser acquiescence
The rule of configuration in standard pattern table (i.e. the CSS with browser pattern match in the daytime resolves standard pattern table)
Then each web page tag in webpage is rendered.
It should be noted that the web page display method in the embodiment of the present invention can be by following arbitrary installation
Browser kernel on Intelligent television terminal performs: carry out based on Web page application program interface in browser
(i.e. browser kernel is to develop based on content api in chromium to the browser kernel of exploitation
) or develop based on Android webpage in browser browser kernel (i.e. browser kernel based on
Android_webview in chromium and the exploitation that carries out).The web page display that the embodiment of the present invention provides
Method is not only suitable for browser one process pattern, again for viewing on device multi-process pattern.
The Webpage display process provided by the embodiment of the present invention, the situation that browser light around is brighter
Under still can generate under browse mode in the daytime and show webpage.And it is clear when determining that Intelligent television terminal enters
Look at after device Night (such as: determine that browser ambient light is dark, or receive browser
When browse mode switches under browse mode at night), then by stacking corresponding for the current web page of browser display
Attribute information in CSS CSS is configured to the attribute information of browser Night, with by current web page
It is rendered to be adapted to the dark webpage of browser ambient light.Visible, by the embodiment of the present invention provide clear
Looking at device, when browser ambient light is dark, the webpage shown by browser can't stimulate human eye, uses
Head of a household's time browsing device net page also can produce the sensation of eyestrain, it is possible to promotes the experience of user.
Owing to the experience of user gets a promotion, user just be happy to use Intelligent television terminal to browse webpage,
Therefore, it is possible to improve the utilization rate of intelligent television.Moreover, the webpage that the embodiment of the present invention provides shows
Showing in method, browser actively can also determine suitable with scene clear according to current concrete scene
Device of looking at display pattern is (such as: start browser Night at night, start browser in the daytime by day
Pattern), actively carry out the switching of browser display pattern, it is not necessary to user's manual switching, promote further
The experience of user.
Embodiment three
With reference to Fig. 4, it is shown that a kind of browser structure block diagram of three according to embodiments of the present invention.
The browser of the embodiment of the present invention is installed on Intelligent television terminal, and described browser includes: configuration
Module 402, after being used for determining that Intelligent television terminal enters browser Night, by browser display
Attribute information in CSS CSS that current web page is corresponding is configured to the attribute of browser Night
Information;Render display module 404, for the attribute information of the browser Night according to CSS, wash with watercolours
Dye current web page also shows the current web page after rendering.
The browser of the embodiment of the present invention is arranged on Intelligent television terminal.When user is whole by intelligent television
When end opens browser browsing pages, the concrete light that browser can be presently according to Intelligent television terminal
Thread environment chooses whether that entrance browser Night carries out the page and shows.Such as: current time is night,
Or Intelligent television terminal marginal ray dark time, then browser comprises configuration module selects unlatching to browse
Device Night, by the attribute information in CSS CSS corresponding for the current web page of browser display
It is configured to the attribute information of browser Night, renders display module then according to the browser night of CSS
The attribute information of pattern, render current web page and display render after current web page.Finally, browser is made
In the case of marginal ray is dark, it is possible to render and demonstrate match with marginal ray, will not be to human eye
Cause the webpage of stimulation.
The browser provided by the embodiment of the present invention, browser in the case of light is brighter around still
Can generate under browse mode in the daytime and show webpage.And when determine that Intelligent television terminal enters browser night
After inter mode (such as: determine that browser ambient light is dark, or receive browser browsed mould
When formula switches under browse mode at night), then by CSS corresponding for the current web page of browser display
Attribute information in CSS is configured to the attribute information of browser Night, to be rendered to by current web page
It is adapted to the dark webpage of browser ambient light.Browser that is visible, that provided by the embodiment of the present invention,
When browser ambient light is dark, the webpage shown by browser can't stimulate human eye, when using the head of a household
Between browsing device net page also can produce the sensation of eyestrain, it is possible to promote the experience of user.Due to
The experience at family gets a promotion, user just be happy to use Intelligent television terminal to browse webpage, therefore,
The utilization rate of intelligent television can be improved.
Embodiment four
With reference to Fig. 5, it is shown that the structured flowchart of a kind of browser of four according to embodiments of the present invention.
The embodiment of the present invention has carried out further optimization to the browser in embodiment three, browsing after optimization
Device is still installed on Intelligent television terminal, and the browser after optimization includes: configuration module 502, is used for
After determining that Intelligent television terminal enters browser Night, by corresponding for the current web page of browser display
Attribute information in CSS CSS is configured to the attribute information of browser Night;Render display
Module 504, for the attribute information of the browser Night according to CSS, renders current web page and shows
Show the current web page after rendering.
Preferably, configuration module 502 is by the genus in CSS corresponding for the current web page of described browser display
When property information configuration is the attribute information of browser Night: browser kernel is invoked in kernel setting
The CSS corresponding with Night resolve standard pattern table, wherein, CSS resolves in standard pattern table and wraps
Include: the attribute information in CSS corresponding for current web page is configured to the attribute information of browser Night
Configuration rule.
Preferably, the display module 504 attribute information according to the browser Night of CSS, wash with watercolours are rendered
During dye current web page: resolve the configuration rule arranged in standard pattern table, and current web page according to CSS
The attribute information of the corresponding each web page tag in HTML HTML is corresponding to current web page
Each web page tag render, each web page tag is rendered as Night.
Preferably, the attribute in CSS corresponding for the current web page of browser display is believed by configuration module 502
When breath is configured to the attribute information of browser Night: browser kernel be invoked in kernel arrange with
The CSS that Night is corresponding resolves standard pattern;According to described CSS resolve standard pattern by described currently
CSS attribute information correspondence corresponding to each web page tag in the HTML that the page is corresponding changes to browser night
The attribute information of inter mode;
Or,
Browser kernel is invoked in kernel the CSS corresponding with Night arranged and resolves standard pattern;
Resolve standard pattern according to described CSS in the HTML that described current page is corresponding, insert described each webpage
The attribute information of the browser Night that label is corresponding;Wherein, described each web page tag of insertion is corresponding
The priority of attribute information of browser Night, higher than each webpage mark comprised in described HTML
Sign corresponding CSS attribute information.
Preferably, the browser in the embodiment of the present invention also includes: the first background colour arranges module 506,
For the background colour of each figure layer in figure layer tree corresponding for described current web page is arranged to and Night phase
The color of coupling;And/or, the second background colour arranges module 508, for by corresponding for described current page
The background colour of synthesizer is arranged to the color matched with Night;Wherein, synthesizer is for by described
Each figure lamination in the figure layer tree that current web page is corresponding generates described current page.
Preferably, the browser in the embodiment of the present invention also includes: change module 510, being used for ought be the most logical
Cross described second background colour arrange the background colour of the module synthesizer corresponding to described current page be arranged to
During the color that Night matches, at described second background colour, module 508 is set by described current page
After the background colour of corresponding synthesizer is arranged to the color matched with Night, by described synthesis
The background colour of each figure layer in figure layer tree corresponding for described current page is arranged to and described synthesizer by device
The color that background colour is identical.
Preferably, the browser in the embodiment of the present invention also includes determining module 512, is used for determining intelligence
Television terminal enter browser Night, described determine module determining Intelligent television terminal enter browse
During device Night: receive the selection instruction of the browser display pattern to Intelligent television terminal, work as reception
To described selection instruction for indicating Night time, it is determined that described Intelligent television terminal enter browse
Device Night;Or, determine time zone corresponding to described Intelligent television terminal current location and current time,
Described time zone and described current time according to determining determine whether current location is night under current time
Between, if, it is determined that described Intelligent television terminal enters browser Night.
The browser of the embodiment of the present invention is used for realizing corresponding net in previous embodiment one and embodiment two
Page display packing, and there is the beneficial effect of corresponding embodiment of the method, do not repeat them here.
Device embodiment described above is only schematically, wherein said illustrates as separating component
Unit can be or may not be physically separate, the parts shown as unit can be or
Person may not be physical location, i.e. may be located at a place, or can also be distributed to multiple network
On unit.Some or all of module therein can be selected according to the actual needs to realize the present embodiment
The purpose of scheme.Those of ordinary skill in the art are not in the case of paying performing creative labour, the most permissible
Understand and implement.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive each reality
The mode of executing can add the mode of required general hardware platform by software and realize, naturally it is also possible to by firmly
Part.Based on such understanding, the portion that prior art is contributed by technique scheme the most in other words
Dividing and can embody with the form of software product, this computer software product can be stored in computer can
Read in storage medium, such as ROM/RAM, magnetic disc, CD etc., including some instructions with so that one
Computer equipment (can be personal computer, server, or the network equipment etc.) performs each to be implemented
The method described in some part of example or embodiment.
Last it is noted that above example is only in order to illustrate technical scheme, rather than to it
Limit;Although the present invention being described in detail with reference to previous embodiment, the ordinary skill of this area
Personnel it is understood that the technical scheme described in foregoing embodiments still can be modified by it, or
Person carries out equivalent to wherein portion of techniques feature;And these amendments or replacement, do not make corresponding skill
The essence of art scheme departs from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (14)
1. a Webpage display process, it is characterised in that described method is applied to Intelligent television terminal, institute
The method of stating includes:
After determining that Intelligent television terminal enters browser Night, by the current net of described browser display
Attribute information in CSS CSS that page is corresponding is configured to the attribute information of browser Night;
According to the attribute information of the browser Night of described CSS, render described current web page and show
Described current web page after rendering.
Method the most according to claim 1, it is characterised in that described by described browser display
Attribute information in CSS CSS that current web page is corresponding is configured to the attribute of browser Night
The step of information includes:
Browser kernel is invoked in kernel the CSS corresponding with Night arranged and resolves standard pattern
Table, wherein, described CSS resolves standard pattern table and includes: by CSS corresponding for described current web page
Attribute information be configured to the configuration rule of attribute information of browser Night.
Method the most according to claim 2, it is characterised in that described clear according to described CSS
Looking at the attribute information of device Night, the step rendering described current web page includes:
The configuration rule arranged in standard pattern table, and described current web page pair is resolved according to described CSS
The attribute information of each web page tag in the HTML HTML answered, to described current web page pair
The each web page tag answered renders, and renders described each web page tag into Night.
Method the most according to claim 1, it is characterised in that described by described browser display
Attribute information in the CSS that current web page is corresponding is configured to the step of the attribute information of browser Night
Including:
Browser kernel is invoked in kernel the CSS corresponding with Night arranged and resolves standard pattern
Table;Standard pattern table is resolved by each webpage in HTML corresponding for described current page according to described CSS
The CSS attribute information correspondence that label is corresponding changes to the attribute information of browser Night;
Or,
Browser kernel is invoked in kernel the CSS corresponding with Night arranged and resolves standard pattern
Table;Resolve standard pattern table according to described CSS and insert described in the HTML that described current page is corresponding
The attribute information of the browser Night that each web page tag is corresponding;Wherein, described each webpage mark of insertion
Sign the priority of the attribute information of corresponding browser Night, each higher than what described HTML comprised
The CSS attribute information that web page tag is corresponding.
Method the most according to claim 1, it is characterised in that described method also includes:
The background colour of each figure layer in figure layer tree corresponding for described current web page is arranged to and Night phase
The color of coupling;And/or,
The background colour of synthesizer corresponding for described current page is arranged to the face matched with Night
Color;Wherein, synthesizer is described for being generated by each figure lamination in figure layer tree corresponding for described current web page
Current page.
Method the most according to claim 5, it is characterised in that when only corresponding to described current page
The background colour of synthesizer when being arranged to the color matched with Night, described by described current page
After the background colour of the synthesizer that face is corresponding is arranged to the step of color matched with Night, described
Method also includes:
By described synthesizer, the background colour of each figure layer in figure layer tree corresponding for described current page is arranged
Become the color identical with the background colour of described synthesizer.
Method the most according to claim 1, it is characterised in that determine that Intelligent television terminal enters clear
The step of device Night of looking at includes:
Receive the selection instruction of the browser display pattern to Intelligent television terminal, when the described choosing received
When selecting instruction for indicating Night, it is determined that described Intelligent television terminal enters browser Night;
Or,
Determine time zone corresponding to described Intelligent television terminal current location and current time, according to the institute determined
State time zone and described current time determines whether current location is night under current time, the most true
Fixed described Intelligent television terminal enters browser Night.
8. a browser, it is characterised in that described browser is installed on Intelligent television terminal, described
Browser includes:
Configuration module, after being used for determining that Intelligent television terminal enters browser Night, browses described
Attribute information in CSS CSS that current web page that device shows is corresponding is configured to browser mould at night
The attribute information of formula;
Render display module, for the attribute information of the browser Night according to described CSS, render
Described current web page also shows the described current web page after rendering.
Browser the most according to claim 8, it is characterised in that described configuration module is by described clear
Attribute information in CSS CSS that current web page that device of looking at shows is corresponding is configured to browser night
During the attribute information of pattern:
Browser kernel is invoked in kernel the CSS corresponding with Night arranged and resolves standard pattern
Table, wherein, described CSS resolves standard pattern table and includes: by CSS corresponding for described current web page
Attribute information be configured to the configuration rule of attribute information of browser Night.
Browser the most according to claim 9, it is characterised in that described in render display module and depend on
According to the attribute information of the browser Night of described CSS, when rendering described current web page:
The configuration rule arranged in standard pattern table, and described current web page pair is resolved according to described CSS
The attribute information of each web page tag in the HTML HTML answered, to described current web page pair
The each web page tag answered renders, and renders described each web page tag into Night.
11. browsers according to claim 8, it is characterised in that described configuration module is by described
Attribute information in the CSS that the current web page of browser display is corresponding is configured to the genus of browser Night
During property information:
Browser kernel is invoked in kernel the CSS corresponding with Night arranged and resolves standard pattern
Table;Standard pattern table is resolved by each net in HTML corresponding for described current page according to described CSS
The CSS attribute information correspondence that page label is corresponding changes to the attribute information of browser Night;
Or,
Browser kernel is invoked in kernel the CSS corresponding with Night arranged and resolves standard pattern
Table;Resolve standard pattern table according to described CSS and insert described in the HTML that described current page is corresponding
The attribute information of the browser Night that each web page tag is corresponding;Wherein, described each webpage mark of insertion
Sign the priority of the attribute information of corresponding browser Night, each higher than what described HTML comprised
The CSS attribute information that web page tag is corresponding.
12. browsers according to claim 8, it is characterised in that described browser also includes:
First background colour arranges module, for by each figure layer in figure layer tree corresponding for described current web page
Background colour is arranged to the color matched with Night;And/or,
Second background colour arranges module, for being arranged by the background colour of synthesizer corresponding for described current page
Become the color matched with Night;Wherein, synthesizer is for by figure layer corresponding for described current web page
Each figure lamination in tree generates described current page.
13. browsers according to claim 12, it is characterised in that described browser also includes:
Change module, corresponding to described current page for only module ought be arranged by described second background colour
The background colour of synthesizer when being arranged to the color matched with Night, set at described second background colour
Put the face that the background colour of synthesizer corresponding for described current page is arranged to match by module with Night
After color, by described synthesizer by the background colour of each figure layer in figure layer tree corresponding for described current page
It is arranged to the color identical with the background colour of described synthesizer.
14. browsers according to claim 8, it is characterised in that described browser also includes:
Determine module, be used for determining that Intelligent television terminal enters browser Night;
Described determine module determine Intelligent television terminal enter browser Night time:
Receive the selection instruction of the browser display pattern to Intelligent television terminal, when the described choosing received
When selecting instruction for indicating Night, it is determined that described Intelligent television terminal enters browser Night;
Or,
Determine time zone corresponding to described Intelligent television terminal current location and current time, according to the institute determined
State time zone and described current time determines whether current location is night under current time, the most true
Fixed described Intelligent television terminal enters browser Night.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510583385.3A CN105979392A (en) | 2015-09-14 | 2015-09-14 | Webpage display method and browser |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510583385.3A CN105979392A (en) | 2015-09-14 | 2015-09-14 | Webpage display method and browser |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105979392A true CN105979392A (en) | 2016-09-28 |
Family
ID=56988176
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510583385.3A Pending CN105979392A (en) | 2015-09-14 | 2015-09-14 | Webpage display method and browser |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105979392A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108008954A (en) * | 2017-12-01 | 2018-05-08 | 深圳乐信软件技术有限公司 | Page configuration method, apparatus, server and medium |
CN108108367A (en) * | 2016-11-24 | 2018-06-01 | 腾讯科技(深圳)有限公司 | A kind of Webpage display process and device |
CN109561352A (en) * | 2017-09-27 | 2019-04-02 | 腾讯科技(深圳)有限公司 | Playback method, device, storage medium and the electronic device of media object |
CN110537165A (en) * | 2017-10-26 | 2019-12-03 | 华为技术有限公司 | A kind of display methods and device |
CN111274521A (en) * | 2020-04-29 | 2020-06-12 | 北京仁和汇智信息技术有限公司 | Document HTML page display method and device and electronic equipment |
CN111367606A (en) * | 2020-03-03 | 2020-07-03 | 北京奇艺世纪科技有限公司 | Application page display method, device, terminal and medium |
CN113268232A (en) * | 2020-02-17 | 2021-08-17 | 腾讯科技(深圳)有限公司 | Page skin generation method and device and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103258038A (en) * | 2013-05-17 | 2013-08-21 | 广州市动景计算机科技有限公司 | Method and device for synchronizing display modes between browser and webpage |
CA2843938A1 (en) * | 2013-03-13 | 2014-09-13 | Usablenet Inc. | Methods for processing cascading style sheets and devices thereof |
CN104346403A (en) * | 2013-08-07 | 2015-02-11 | 腾讯科技(深圳)有限公司 | Browser page display method and device as well as browser and terminal |
CN104462312A (en) * | 2014-11-28 | 2015-03-25 | 北京奇虎科技有限公司 | Web page displaying method and browser client side |
-
2015
- 2015-09-14 CN CN201510583385.3A patent/CN105979392A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CA2843938A1 (en) * | 2013-03-13 | 2014-09-13 | Usablenet Inc. | Methods for processing cascading style sheets and devices thereof |
CN103258038A (en) * | 2013-05-17 | 2013-08-21 | 广州市动景计算机科技有限公司 | Method and device for synchronizing display modes between browser and webpage |
CN104346403A (en) * | 2013-08-07 | 2015-02-11 | 腾讯科技(深圳)有限公司 | Browser page display method and device as well as browser and terminal |
CN104462312A (en) * | 2014-11-28 | 2015-03-25 | 北京奇虎科技有限公司 | Web page displaying method and browser client side |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108108367A (en) * | 2016-11-24 | 2018-06-01 | 腾讯科技(深圳)有限公司 | A kind of Webpage display process and device |
CN108108367B (en) * | 2016-11-24 | 2021-10-26 | 腾讯科技(深圳)有限公司 | Webpage display method and device |
CN109561352A (en) * | 2017-09-27 | 2019-04-02 | 腾讯科技(深圳)有限公司 | Playback method, device, storage medium and the electronic device of media object |
CN109561352B (en) * | 2017-09-27 | 2021-09-24 | 腾讯科技(深圳)有限公司 | Media object playing method and device, storage medium and electronic device |
CN110537165A (en) * | 2017-10-26 | 2019-12-03 | 华为技术有限公司 | A kind of display methods and device |
US11081086B2 (en) | 2017-10-26 | 2021-08-03 | Huawei Technologies Co., Ltd. | Display method and apparatus |
CN108008954A (en) * | 2017-12-01 | 2018-05-08 | 深圳乐信软件技术有限公司 | Page configuration method, apparatus, server and medium |
CN113268232A (en) * | 2020-02-17 | 2021-08-17 | 腾讯科技(深圳)有限公司 | Page skin generation method and device and computer readable storage medium |
CN113268232B (en) * | 2020-02-17 | 2024-04-26 | 腾讯科技(深圳)有限公司 | Page skin generation method and device and computer readable storage medium |
CN111367606A (en) * | 2020-03-03 | 2020-07-03 | 北京奇艺世纪科技有限公司 | Application page display method, device, terminal and medium |
CN111274521A (en) * | 2020-04-29 | 2020-06-12 | 北京仁和汇智信息技术有限公司 | Document HTML page display method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105979392A (en) | Webpage display method and browser | |
CN105373567B (en) | Page generation method and client | |
US20230111594A1 (en) | Simplified website creation, configuration, and customization system | |
KR100666450B1 (en) | Displaying graphical objects | |
CN104217037B (en) | A kind of method and device for showing webpage in the terminal | |
CN103631865B (en) | Webpage generating method and equipment | |
CN106095437B (en) | The implementation method and device of the user interface layout type of RTL from right to left | |
CN105094759B (en) | A kind of browse mode switching handling method and device | |
CN110235123A (en) | For the perception of content energy conservation for the web page browsing for using selectivity load priority | |
CN105893022A (en) | Production method and system of combined user interface control, and control method and system of combined user interface control | |
CN105786924A (en) | Webpage night mode processing method and apparatus, and mobile terminal | |
CN104462312A (en) | Web page displaying method and browser client side | |
CN107315580A (en) | Component processing method, device and the equipment of user interface, computer-readable recording medium | |
CN103631867B (en) | Webpage display method and browser | |
CN106202072B (en) | The method and apparatus of display content are provided | |
CN109683978A (en) | A kind of method, apparatus and electronic equipment of the rendering of streaming layout interface | |
Lerner | At the forge: twitter bootstrap | |
CN112367549B (en) | Video playing implementation method of television browser and browser application operation method | |
Broulik et al. | Pro jQuery mobile | |
CN105528389A (en) | A logic control method and device based on mobile phone browser core | |
WO2019109889A1 (en) | Web page display method, browser, terminal, and computer readable storage medium | |
CN115225952A (en) | Video playing control method and device, electronic equipment, storage medium and product | |
CN109040767A (en) | A kind of direct broadcasting room loading method, system, server and storage medium | |
CN108874373B (en) | Method and device for inserting information into webpage, display terminal and storage medium | |
Fischer et al. | Brassau: automatic generation of graphical user interfaces for virtual assistants |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160928 |
|
WD01 | Invention patent application deemed withdrawn after publication |