WO2015149561A1 - 一种浏览器中页面标签头的绘制方法及装置 - Google Patents

一种浏览器中页面标签头的绘制方法及装置 Download PDF

Info

Publication number
WO2015149561A1
WO2015149561A1 PCT/CN2014/095658 CN2014095658W WO2015149561A1 WO 2015149561 A1 WO2015149561 A1 WO 2015149561A1 CN 2014095658 W CN2014095658 W CN 2014095658W WO 2015149561 A1 WO2015149561 A1 WO 2015149561A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
page label
label header
header
current
Prior art date
Application number
PCT/CN2014/095658
Other languages
English (en)
French (fr)
Inventor
田新超
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
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 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2015149561A1 publication Critical patent/WO2015149561A1/zh

Links

Images

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Definitions

  • the present invention relates to the technical field of browsers, and in particular, to a method for drawing a page label header in a browser and a device for drawing a page label header in a browser.
  • a browser is an application that can display HTML (HyperText Markup Language) file content of a web server or file system and allow users to interact with these files.
  • the browser mainly interacts with the web server through the HTTP protocol and acquires web pages. These web pages are specified by a URL, and the file format is usually HTML, and is specified by the MIME in the HTTP protocol.
  • a web page can include multiple documents, each of which is obtained separately from the server.
  • Most browsers themselves support a wide range of formats besides HTML, such as JPEG, PNG, GIF and other image formats, and can be extended to support a large number of plug-ins.
  • many browsers support other URL types and their corresponding protocols, such as FTP, Gopher, and HTTPS (encrypted versions of the HTTP protocol).
  • the HTTP content type and URL protocol specification allows web page designers to embed images, animations, videos, sounds, streaming media, etc. in web pages.
  • the redrawing of the label after deletion is usually done by labeling the label according to the standard size.
  • the size of the label has changed, the position of the closing button has also changed, and the position of the current mouse point is not consistent, the user has to manually move the mouse position by himself to The mouse moves to the close button of the label, which is very cumbersome to operate.
  • the present invention has been made in order to provide a method for drawing a page label header in a browser and a corresponding drawing device for a page label header in a browser, which overcomes the above problems or at least partially solves or alleviates the above problems. .
  • a method for drawing a page label header in a browser including:
  • a drawing device for a page label header in a browser including a processor, for:
  • a computer program comprising computer readable code, when said computer readable code is executed on a client device, causing said client device to execute said page in said browser The method of drawing the label header.
  • a computer readable medium wherein the computer program described above is stored.
  • the target width of the page label header drawn in the browser tab column is determined, and then the page label header currently drawn in the browser tab bar and/or the The touch focus is such that the closed identification position of a page label header in the current browser tab bar of the re-rendering coincides with the position of the touch focus, and the user does not need to manually move the touch focus to the closing identifier of the page label header, that is, The logo can be turned off directly by the touch focus, which greatly improves the simplicity of operation.
  • the target width of the page label header drawn in the browser tab column is determined, and then the page label header currently drawn in the browser tab column and/or the The touch focus is such that the newly added mark position in the current browser tab bar of the redraw is coincident with the position of the touch focus, and the user does not need to manually move the touch focus to the newly added mark, and can directly trigger through the touch focus.
  • the addition of logos greatly improves the ease of operation.
  • FIG. 1 is a flow chart showing the steps of Embodiment 1 of a method for drawing a page label header in a browser according to an embodiment of the present invention
  • FIG. 2 is a view schematically showing an example of a browser structure according to an embodiment of the present invention
  • FIG. 3 is a view schematically showing an example of closing a web page label header according to an embodiment of the present invention
  • FIG. 4 is a view schematically showing an example of closing a web page label header according to an embodiment of the present invention
  • FIG. 5 is a view schematically showing an example of closing a web page label header according to an embodiment of the present invention.
  • FIG. 6 is a view schematically showing an example of closing a web page label header according to an embodiment of the present invention.
  • FIG. 7 is a view schematically showing an example of closing a web page label header according to an embodiment of the present invention.
  • FIG. 8 is a view schematically showing an example of closing a web page label header according to an embodiment of the present invention.
  • FIG. 9 is a view schematically showing an example of dragging a web page label header according to an embodiment of the present invention.
  • FIG. 10 is a view schematically showing an example of dragging a web page label header according to an embodiment of the present invention.
  • FIG. 11 is a flow chart showing the steps of Embodiment 2 of a method for drawing a page label header in a browser according to an embodiment of the present invention
  • FIG. 12 is a view schematically showing an example of a new webpage tag header according to an embodiment of the present invention.
  • FIG. 13 is a view schematically showing an example of a new web page tag header according to an embodiment of the present invention.
  • FIG. 14 is a view schematically showing an example of a new webpage tag header according to an embodiment of the present invention.
  • FIG. 15 is a view schematically showing an example of a new webpage tag header according to an embodiment of the present invention.
  • FIG. 16 is a flow chart showing the steps of Embodiment 3 of a method for drawing a page label header in a browser according to an embodiment of the present invention
  • FIG. 17 is a view schematically showing an example of a mobile web page tag header according to an embodiment of the present invention.
  • FIG. 18 is a block diagram showing the structure of Embodiment 1 of a device for drawing a page label header in a browser according to an embodiment of the present invention
  • FIG. 19 is a block diagram showing the structure of Embodiment 2 of a device for drawing a page label header in a browser according to an embodiment of the present invention
  • FIG. 20 is a block diagram showing the structure of Embodiment 3 of a device for drawing a page label header in a browser according to an embodiment of the present invention
  • FIG. 21 is a block diagram showing the structure of a browser embodiment 1 according to an embodiment of the present invention.
  • FIG. 22 is a block diagram showing the structure of a browser embodiment 2 according to an embodiment of the present invention.
  • FIG. 23 is a schematic diagram showing a browser embodiment 3 according to an embodiment of the present invention. Structure diagram.
  • Figure 24 is a schematic block diagram showing a client device for performing the method according to the present invention.
  • Fig. 25 schematically shows a storage unit for holding or carrying program code implementing the method according to the invention.
  • Embodiment 1 is a flow chart showing the steps of Embodiment 1 of a method for drawing a page label header in a browser according to an embodiment of the present invention, which may include the following steps:
  • Step 101 Close the current page label header by triggering the touch focus on the closing identifier of the current page label header;
  • the touch focus may be a user's operation control, such as a cursor controlled by a mouse, a touch point controlled by a touch screen, and the like, which is not limited by the embodiment of the present invention.
  • a browser tab bar (such as position B shown in FIG. 2) may be included in a browser, and one or more page label headers may be included in the browser tab bar (for example, as shown in FIG. 2).
  • Position A the current webpage can be displayed in the main body position of the browser (for example, position C shown in FIG. 2), and a close identifier (such as the "X" identifier shown in FIG. 2) can be set in the page label header, and the close identifier is It can be used to trigger the closing operation of the page label header and the corresponding webpage.
  • a new identifier (such as the "+" logo shown in FIG. 2) can be set on the right/left side of the page label header, and the new identifier can be used. The new operation of triggering the corresponding page of the new word page label header.
  • the triggering of the touch focus on the closing identifier in the current page label header may include the following two situations:
  • the touch focus triggers the close identification by clicking the close identifier in the current page label header
  • the touch focus triggers the close identification in the current page label by moving the current page label header out of the browser tab bar.
  • the current page label header can be moved out of the browser label by the touch focus.
  • the bar for example, moves the cursor position to the current page label header, then presses the left mouse button and moves the mouse to move the current page label header out of the browser tab bar.
  • the close identifier is triggered to trigger the closing operation of the current page label header and the corresponding web page in the current browser window.
  • Step 102 Determine, according to current browser tab bar information and a page label header message drawn therein, a target width of a page label header drawn in the browser tab bar;
  • step 102 may include the following sub-steps:
  • S is the length of the browser tab bar
  • N is the number of page label headers after the current page label header is closed
  • W new is the target width of the page label header
  • W min is the minimum width of the page label header
  • W max is The maximum width of the page label header.
  • the browser tab bar can display the page label header within a certain range, such as the range between the page label header A and the page label header I shown in FIG. 3.
  • the length of the page label head can be controlled within a certain range, between the preset maximum width and the minimum width (including the maximum width and the minimum width).
  • the last page label header is related to the order in which the page label is generated. If the page label header is generated from left to right, the rightmost page label header can be used as the last page label header, for example, as shown in FIG. The page label header I; if the page label header is generated from right to left, the leftmost page label header can be used as the last page label header, such as the page label header A shown in FIG.
  • step 102 may include the following sub-steps:
  • Sub-step S21 when the closed page label header is not the last page label header, the target width of the page label header drawn by the width of the current page label header is determined.
  • the width of the page label header may be locked.
  • the page label header A to the page label header H shown in FIG. 3 are all non-last page label headers.
  • Step 103 Re-draw the page label header and/or the touch focus currently drawn in the browser tab bar according to the target width.
  • the closed identification position of a page label header in the redrawn current browser tab column may coincide with the position of the touch focus.
  • step 103 may comprise the following sub-steps:
  • Sub-step S31 determining a page label header corresponding to the current label page
  • Each tab page can correspond to a page tab header, and the tab page displayed in the current browser window is the current tab page.
  • the sub-step S31 may further include the following sub-steps:
  • Sub-step S311 searching for a page identifier corresponding to the current label webpage in the preset storage object
  • Sub-step S312 searching for a page label header corresponding to the page identifier.
  • the storage object may be a Webcontent object
  • the Webcontent object is a rendering result information formed by a content object of a tab page loaded by each webpage subprocess, and the rendering result is sent to a browser main process for display. of.
  • the parameter ID number in the corresponding Webcontent object corresponds to a web page identifier (for example, an index value), which identifies that the index value of the currently displayed page label header is firstvisibleindex, for example, "index1", so that index2 and index3 are sequentially loaded and then loaded.
  • a web page identifier for example, an index value
  • Sub-step S32 drawing a first background on the page label header corresponding to the current label page in the browser tab bar according to the target width, and drawing a second background on the other page label headers;
  • the page label header corresponding to the current tab page can be identified by the first background highlighted.
  • the page label header A as shown in FIG. 3, and the other page label headers may be identified by a dark second background, such as the page labels B and C shown in FIG.
  • the first background and/or the second background can be drawn using the DrawItemImg function.
  • the background image of the page label header (for example, the png file) is decoded into a 32-bit bitmap HBITMAP through the pnglib library, and then the bitmap is bound to the HDC through the SelectObject function, and then the alphablend function is called to draw the bitmap to the screen. on.
  • Sub-step S33 respectively drawing a webpage identifier corresponding to the page label header in the browser tab bar;
  • the webpage identifier can be drawn by the DrawTabIcon function, and the webpage identifier can be a webpage LOGO.
  • the page identifier of the page label header (for example, the png file) is decoded into a 32-bit bitmap HBITMAP through the pnglib library, and then the bitmap is bound to the HDC through the SelectObject function, and then the alphablend function is called to draw the bitmap to the screen. on.
  • Sub-step S34 respectively drawing a page title corresponding to the page label header in the browser tab bar;
  • the page title can be drawn using the DrawText function.
  • Drawtext is a system API (Application Program Interface), and text can be drawn to the screen by passing parameter text and position.
  • Sub-step S35 respectively drawing the close identifier corresponding to the page label header in the browser tab bar.
  • the close flag can be drawn using the DrawTabCloseButton function.
  • the closing identifier of the page label header (for example, the png file) is decoded into a 32-bit bitmap HBITMAP through the pnglib library, and then the bitmap is bound to the HDC through the SelectObject function, and then the alphablend function is called to draw the bitmap to the screen. on.
  • the touch focus triggers the last page label header, that is, the close identifier of the page label header I, and the close identifier can be represented by the reverse color due to the hover operation of the touch focus.
  • the page label header I is closed
  • the page label header A to the page label header H are redrawn, and the width of the page label header A to the page label header H is increased, and the browser tab bar is still filled, so that At this time, the position of the touch focus overlaps with the position of the page label of the page label head of the closed page, that is, the position of the closing label of the page label head H, and the close indicator can also touch the focus.
  • the hover hover operation is represented by an inverted color.
  • the touch focus triggers a non-last page label header, such as a close identifier of the page label header A, which may be represented by an inverted color due to a hover operation of the touch focus.
  • a non-last page label header such as a close identifier of the page label header A
  • the page label header B to the page label header I are redrawn, and the width of the page label header B to the page label header I is increased, and the browser tab bar is still filled, so that At this time, the position of the touch focus overlaps with the position of the page label head of the closed page label header, that is, the position of the closing label of the page label head B, and the closing indicator can also perform the hover operation of the touch focus in reverse color. Said.
  • step 103 may comprise the following sub-steps:
  • Sub-step S41 determining a page label header corresponding to the current tab page
  • Sub-step S42 drawing a first background on the page label header corresponding to the current page in the browser tab bar according to the target width, and drawing a second background on the other page label headers;
  • Sub-step S43 respectively drawing a webpage identifier corresponding to the page label header in the browser tab bar;
  • Sub-step S44 respectively drawing a webpage identifier corresponding to the page label header in the browser tab bar;
  • Sub-step S45 respectively drawing a close identifier corresponding to the page label header in the browser tab bar;
  • Sub-step S46 the condition is satisfied when S ⁇ N * W max is closed and the first page to the last page tag label header, the focus moved to the closed, the touch is currently in the browser identification tag wherein a column of the page header tag Position
  • S is the length of the browser tab bar
  • N is the number of page label headers after the current page label header is closed
  • W max is the maximum width of the page label header
  • the touch focus is moved when the release event of the touch focus is detected, so that the touch focus overlaps with the position of the closed identifier.
  • the abscissa of the position where the touch focus moves is (N*W new -H/2), and the ordinate is D/2;
  • N is the number of page label headers after the current page label header is closed
  • W new is the target width of the page label header
  • H is the width of the closing identifier
  • D is the height of the browser tab bar.
  • the location of the touch focus is set to the close identifier of the page label header before the closed page label header.
  • the width of the page label header A to the page label header D is W max , which fails to fill the browser tab bar, and the touch focus triggers the last page label header, that is, the page label header D is closed.
  • the logo may be represented by an inverted color due to a hover operation of the touch focus.
  • FIG. 8 after the page label header D is closed, the page label header A to the page label header C are redrawn, and the width of the page label header A to the page label header C is unchanged, and is still W max , and still cannot be filled.
  • the position of the touch focus can be moved to the previous page label header of the closed page label header, that is, the position of the closing identifier of the page label header C, so that the two overlap, the closed identifier can also
  • the hover operation of the touch focus is represented by an inverted color.
  • sub-step S41-sub-step S45 is substantially similar to the application of the sub-step S31-sub-step S35, the description is relatively simple, and the relevant part can be referred to the sub-step S31-sub-step S35.
  • the embodiments of the invention are not described in detail herein.
  • the target width of the page label header drawn in the browser tab column is determined, and then the page label header currently drawn in the browser tab bar and/or the The touch focus is such that the closed identification position of a page label header in the current browser tab bar of the re-rendering coincides with the position of the touch focus, and the user does not need to manually move the touch focus to the closing identifier of the page label header, that is, The logo can be turned off directly by the touch focus, which greatly improves the simplicity of operation.
  • Step 104 When the touch focus moves the current page label header out of the browser tab bar, generate a thumbnail of the label webpage corresponding to the page label header at the location where the touch focus is located;
  • Step 105 When monitoring a release event of the touch focus for the page tag header, launching a browser window;
  • Step 106 Load a label webpage corresponding to the page label header in the browser window.
  • the page label header that is dragged out by the touch focus (for example, the movement position of the cursor exceeds the drawing window interval of the browser tab bar) will be based on the current URL.
  • the thumbnail is generated, and the thumbnail is displayed at the position of the current touch focus, and the thumbnail is a browser sub-window in which the thumbnail is loaded. For example, when the page label header C shown in FIG. 8 is moved out of the browser tab bar, as shown in FIG. 9, a web page thumbnail of the page label header C is generated.
  • a web page corresponding to the page header of the mobile page in the browser new window is generated. For example, as shown in FIG. 10, when the page label header C shown in FIG. 8 is moved out of the browser tab bar and released, a web page corresponding to the browser new page loading page label header C is generated.
  • the page label header is redrawn to the corresponding range, and the webpage identification column (for example, the index value) is recorded.
  • FIG. 11 is a flow chart showing the steps of Embodiment 2 of a method for drawing a page label header in a browser according to an embodiment of the present invention, which may include the following steps:
  • Step 1101 Turn off the current page label header by triggering a focus on a closed identifier in a current page label header
  • Step 1102 Determine, according to the current browser tab bar information and the page label header message drawn therein, a target width of the page label header drawn in the browser tab bar.
  • Step 1103 Re-draw the page label header and/or the touch focus currently drawn in the browser tab bar according to the target width; wherein the re-drawing of a page label header in the current browser tab bar is closed.
  • the identification position coincides with the position of the touch focus;
  • Step 1104 Add a current page label header by triggering a new identifier on the browser tab bar by the touch focus;
  • Step 1105 Determine, according to the current browser tab bar information and the page label header message drawn therein, a target width of the page label header drawn in the browser tab bar;
  • step 1105 can include the following sub-steps:
  • W new When W new >W max , W new takes the value W max ; when W new ⁇ W min , W new takes the value W min ;
  • S is the length of the browser tab bar
  • M is the number of page label headers after the new page label header
  • W new is the target width of the page label header
  • W min is the minimum width of the page label header
  • W max is the page label The maximum width of the head.
  • the browser tab bar can display the page label header within a certain range, such as the range between the page label header A and the page label header I shown in FIG. 3.
  • the length of the page label head can be controlled within a certain range, between the preset maximum width and the minimum width (including the maximum width and the minimum width).
  • the new identifier may be set at the far right of the browser tab bar. If the page label header is generated from right to left, the new logo may be added. Set to the far left of the browser tab bar.
  • Step 1106 Re-draw the page label header and/or the touch focus currently drawn in the browser tab bar according to the target width.
  • the closed identification position of a page label header in the redrawn current browser tab column coincides with the position of the touch focus.
  • step 1106 can include the following sub-steps:
  • Sub-step S61 determining a page label header corresponding to the current label page
  • the newly added web page label header is displayed as the current web page, that is, the newly added web page label header is the page label header corresponding to the current tab page.
  • the sub-step S61 may further include the following sub-steps:
  • Sub-step S611 searching for a page identifier corresponding to the current label webpage in the preset storage object
  • Sub-step S612 searching for a page label header corresponding to the page identifier.
  • Sub-step S62 drawing a first background on the page label header corresponding to the current page in the browser tab column according to the target width, and drawing a second background on the other page label headers;
  • Sub-step S63 respectively drawing a webpage identifier corresponding to the page label header in the browser tab bar;
  • Sub-step S64 respectively drawing a page title corresponding to the page label header in the browser tab bar
  • Sub-step S65 respectively drawing the close identifier corresponding to the page label header in the browser tab bar.
  • sub-step S61-sub-step S65 is substantially similar to the application of the sub-step S31-sub-step S35, the description is relatively simple, and the relevant part can be referred to the sub-step S31-sub-step S35.
  • the embodiments of the invention are not described in detail herein.
  • the current browser tab bar has a total of 7 page label headers from the page label header A to the page label header G.
  • the 7 page label headers are filled with the browser tab bar, and the new logo is located at the far right. side.
  • the touch focus triggers a new logo.
  • the page label header H is added after the page label header G. After the page header H is added, the page label header A to the page label header H are drawn, and the width of the page label header A to the page label header G is reduced, but the browser tab bar is still filled, and the new logo is still located at the most On the right side, the position of the touch focus overlaps with the position of the newly added logo.
  • step 1106 can include the following sub-steps:
  • Sub-step S71 determining a page label header corresponding to the current tab page
  • Sub-step S72 drawing a first background on the page label header corresponding to the current page in the browser tab bar according to the target width, and drawing a second background on the other page label headers;
  • Sub-step S73 respectively drawing a webpage identifier corresponding to the page label header in the browser tab bar;
  • Sub-step S74 respectively drawing a page title corresponding to the page label header in the browser tab bar
  • Sub-step S75 respectively drawing the close identifier corresponding to the page label header in the browser tab bar.
  • Sub-step S76 when the condition S ⁇ M*W max is satisfied, the touch focus is moved to the position of the closing identifier of one of the page label headers in the browser tab bar;
  • S is the length of the browser tab bar
  • M is the number of page label headers after the new page label header
  • W max is the maximum width of the page label header
  • the position of the touch focus is located at the page label header.
  • the touch focus is moved when the release event of the touch focus is detected, so that the touch focus overlaps with the position of the newly added logo.
  • the abscissa of the position where the touch focus moves is (M*W new -H/2), and the ordinate is D/2;
  • M is the number of page label headers after the new page label header
  • W new is the target width of the page label header
  • H is the width of the closing identifier
  • D is the height of the browser tab bar.
  • the width of the page label header A to the page label header D is W max , which fails to fill the browser tab bar, and the new logo is located at the far right.
  • the touch focus triggers the new logo
  • the page label header E is added after the page label header D.
  • the page label header A to the page label header E are drawn.
  • the width of the page label header A to the page label header E is W max , and the browser tab bar cannot be filled yet.
  • the position of the touch focus overlaps with the position of the newly added logo.
  • sub-step S71-sub-step S75 is substantially similar to the application of the sub-step S31-sub-step S35, the description is relatively simple, and the relevant part can be referred to the sub-step S31-sub-step S35.
  • the embodiments of the invention are not described in detail herein.
  • the target width of the page label header drawn in the browser tab column is determined, and then the page label header currently drawn in the browser tab column and/or the The touch focus is such that the newly added mark position in the current browser tab bar of the redraw is coincident with the position of the touch focus, and the user does not need to manually move the touch focus to the newly added mark, and can directly trigger through the touch focus.
  • the addition of logos greatly improves the ease of operation.
  • Embodiment 2 of a method for drawing a page label header in a browser according to an embodiment of the present invention is shown, which may include the following steps:
  • Step 1601 Turn off the trigger by closing the focus of the current page label header by the touch focus.
  • the current page label header
  • Step 1602 determining, according to the current browser tab bar information and the page label header message drawn therein, the target width of the page label header drawn in the browser tab bar;
  • Step 1603 re-rendering the page label header and/or the touch focus currently drawn in the browser tab bar according to the target width; wherein the re-drawing of a page label header in the current browser tab bar is closed.
  • the identification position coincides with the position of the touch focus;
  • Step 1604 When the touch focus triggers the position swap operation of the current tab page, the page label header currently drawn in the browser tab bar is redrawn according to the width of the current page label header.
  • the position label swapping operation of the current tab page is triggered for the page label header of the touch focus drag movement (for example, the movement position of the cursor does not exceed the drawing window interval of the browser tab bar).
  • step 1604 can include the following sub-steps:
  • Sub-step S81 determining a page label header corresponding to the current label page
  • the webpage corresponding to the webpage label head of the touch focus dragging is displayed as the current webpage, that is, the webpage label header of the touch focus dragging movement is the page label header corresponding to the current tabpage.
  • the sub-step S81 may further include the following sub-steps:
  • Sub-step S811 searching for a page identifier corresponding to the current label webpage in the preset storage object
  • Sub-step S812 searching for a page label header corresponding to the page identifier.
  • the width of the current page label header respectively draws a first background on the page label header corresponding to the current page in the browser tab column, and draws a second background on the other page label headers;
  • Sub-step S83 respectively drawing a webpage identifier corresponding to the page label header in the browser tab bar;
  • Sub-step S84 respectively drawing a webpage title corresponding to the page label header in the browser tab bar;
  • Sub-step S85 respectively drawing the close identifier corresponding to the page label header in the browser tab bar.
  • the page label header B and the page label header C shown in FIG. 12 trigger the movement operation. Since the page label header is not increased or decreased, the width thereof does not change, as shown in FIG. According to the moving position of the touch focus, it is determined that the page label header C (for example, the web page identifier is index3) and the page label header B (for example, the web page identifier is index2) are interactively moved to redraw the page label header corresponding to index3 and index2.
  • the area of the page header can be determined according to the moving position of the current page label header, and then redrawed.
  • sub-step S81-sub-step S85 is substantially similar to the application of the sub-step S31-sub-step S35, the description is relatively simple, and the relevant part can be referred to the sub-step S31-sub-step S35.
  • the embodiments of the invention are not described in detail herein.
  • FIG. 18 is a structural block diagram of Embodiment 1 of a device for drawing a page label header in a browser according to an embodiment of the present invention, which may specifically include the following modules:
  • the closing module 1801 is adapted to close the current page label header by triggering a touch focus on a closed identifier in a current page label header;
  • the first determining module 1802 is configured to determine, according to the current browser tab bar information and the page tag header message drawn therein, a target width of the page tag header drawn in the browser tag column;
  • the first drawing module 1803 is adapted to redraw the page label header and/or the touch focus currently drawn in the browser tab bar according to the target width; wherein the redrawing one of the current browser tab columns
  • the closed identification position of the page label header coincides with the position of the touch focus.
  • the triggering of the touch focus on the closing identifier in the current page label header includes:
  • the touch focus triggers the close identification by clicking the close identifier in the current page label header
  • the touch focus triggers the close identifier in the current page tab by moving the current page label header out of the browser tab bar.
  • the first determining module 1802 is further adapted to:
  • W new When W new >W max , W new takes the value W max when W new ⁇ W min , W new takes the value W min ;
  • S is the length of the browser tab bar
  • N is the number of page label headers after the current page label header is closed
  • W new is the target width of the page label header
  • W min is the minimum width of the page label header
  • W max is The maximum width of the page label header.
  • the first determining module 1802 is further adapted to:
  • the target width of the page label header that is most drawn in the width of the current page label header is determined.
  • the first drawing module 1803 may further be adapted to:
  • the first background is drawn on the page label header corresponding to the current page in the browser tab bar according to the target width, and the second background is drawn on the other page label headers;
  • the first drawing module 1803 may further be adapted to:
  • S is the length of the browser tab bar
  • N is the number of page label headers after the current page label header is closed
  • W max is the maximum width of the page label header
  • the abscissa of the position where the touch focus moves is (N*W new -H/2), and the ordinate is D/2;
  • N is the number of page label headers after the current page label header is closed
  • W new is the target width of the page label header
  • H is the width of the closing identifier
  • D is the height of the browser tab bar.
  • the first drawing module 1803 may further be adapted to:
  • the method further includes the following modules:
  • a display module configured to generate a thumbnail of a tab webpage corresponding to the page label header at a location where the touch focus is located when the touch focus moves the current page label header out of the browser tab bar;
  • the startup module is adapted to start a browser window when monitoring a release event of the touch focus to the page label header;
  • a loading module configured to load a label webpage corresponding to the page label header in the browser window.
  • Embodiment 2 of a device for drawing a page label header in a browser may specifically include the following modules:
  • the closing module 1901 is adapted to close the current page label header by triggering a touch focus on a closing identifier in a current page label header;
  • the first determining module 1902 is configured to determine, according to the current browser tab bar information and the page tag header message drawn therein, a target width of the page label header drawn in the browser tab bar;
  • the first drawing module 1903 is adapted to redraw the page label header and/or the touch focus currently drawn in the browser tab bar according to the target width; wherein the redrawing one of the current browser tab columns
  • the closed identification position of the page label header coincides with the position of the touch focus.
  • a new module 1904 is configured to add a current page label header by triggering a new identifier on the browser tab bar by the touch focus;
  • the second determining module 1905 is configured to determine, according to the current browser tab bar information and the page tag header message drawn therein, a target width of the page label header drawn in the browser tab bar;
  • a second rendering module 1906 configured to redraw a page label header and/or the touch focus currently drawn in a browser tab bar according to the target width; wherein the re-rendered current browser The closed identification position of a page label header in the tab bar coincides with the position of the touch focus.
  • the second determining module 1905 is further adapted to:
  • W new When W new >W max , W new takes the value W max ; when W new ⁇ W min , W new takes the value W min ;
  • S is the length of the browser tab bar
  • M is the number of page label headers after the new page label header
  • W new is the target width of the page label header
  • W min is the minimum width of the page label header
  • W max is the page label The maximum width of the head.
  • the second rendering module 1906 is further adapted to:
  • the first background is drawn on the page label header corresponding to the current page in the browser tab bar according to the target width, and the second background is drawn on the other page label headers;
  • the second rendering module 1906 is further adapted to:
  • S is the length of the browser tab bar
  • M is the number of page label headers after the new page label header
  • W max is the maximum width of the page label header
  • the abscissa of the position where the touch focus moves is (M*W new -H/2), and the ordinate is D/2;
  • M is the number of page label headers after the new page label header
  • W new is the target width of the page label header
  • H is the width of the closing identifier
  • D is the height of the browser tab bar.
  • the second rendering module 1906 is further adapted to:
  • FIG. 20 is a structural block diagram of Embodiment 3 of a device for drawing a page label header in a browser according to an embodiment of the present invention, which may specifically include the following modules:
  • the closing module 2001 is adapted to close the current page label header by triggering the closing focus on the current page label header by the touch focus;
  • the first determining module 2002 is configured to determine, according to the current browser tab bar information and the page tag header message drawn therein, a target width of the page label header drawn in the browser tab bar;
  • a first rendering module 2003 adapted to redraw a page label header and/or the touch focus currently drawn in a browser tab bar according to the target width; wherein the redrawn one of the current browser tab columns
  • the closed identification position of the page label header coincides with the position of the touch focus.
  • the third drawing module 2004 is adapted to re-draw the page label header currently drawn in the browser tab bar according to the width of the current page label header when the touch focus triggers the position swapping operation of the current tab page.
  • the third rendering module 2004 may further be adapted to:
  • the width of the current page label header respectively draws a first background on the page label header corresponding to the current page in the browser tab bar, and draws a second background on the other page label headers;
  • the third rendering module 2004 may further be adapted to:
  • FIG. 21 a structure of a browser embodiment 1 according to an embodiment of the present invention is shown.
  • the block diagram may specifically include the following modules:
  • the closing module 2101 is adapted to close the current page label header by triggering a touch focus on a closed identifier in a current page label header;
  • the first determining module 2102 is configured to determine, according to the current browser tab bar information and the page tag header message drawn therein, a target width of the page tag header drawn in the browser tag column;
  • a first drawing module 2103 configured to redraw a page label header and/or the touch focus currently drawn in a browser tab bar according to the target width; wherein the redrawing one of the current browser tab columns
  • the closed identification position of the page label header coincides with the position of the touch focus.
  • the triggering of the touch focus on the closing identifier in the current page label header includes:
  • the touch focus triggers the close identification by clicking the close identifier in the current page label header
  • the touch focus triggers the close identifier in the current page tab by moving the current page label header out of the browser tab bar.
  • the first determining module 2102 is further adapted to:
  • W new When W new >W max , W new takes the value W max ; when W new ⁇ W min , W new takes the value W min ;
  • S is the length of the browser tab bar
  • N is the number of page label headers after the current page label header is closed
  • W new is the target width of the page label header
  • W min is the minimum width of the page label header
  • W max is The maximum width of the page label header.
  • the first determining module 2102 is further adapted to:
  • the target width of the page label header that is most drawn in the width of the current page label header is determined.
  • the first rendering module 2103 is further adapted to:
  • the first background is drawn on the page label header corresponding to the current page in the browser tab bar according to the target width, and the second background is drawn on the other page label headers;
  • the first rendering module 2103 is further adapted to:
  • S is the length of the browser tab bar
  • N is the number of page label headers after the current page label header is closed
  • W max is the maximum width of the page label header
  • the abscissa of the position where the touch focus moves is (N*W new -H/2), and the ordinate is D/2;
  • N is the number of page label headers after the current page label header is closed
  • W new is the target width of the page label header
  • H is the width of the closing identifier
  • D is the height of the browser tab bar.
  • the first rendering module 2103 is further adapted to:
  • the method further includes the following modules:
  • the display module 2104 is configured to generate a thumbnail of the label webpage corresponding to the page label header at a position where the touch focus is located when the touch focus moves the current page label header out of the browser tab bar;
  • the startup module 2105 is adapted to start a browser window when monitoring a release event of the touch focus for the page label header;
  • the loading module 2106 is adapted to load the label webpage corresponding to the page label header in the browser window.
  • FIG. 22 a block diagram of a second embodiment of a browser according to an embodiment of the present invention is shown. Specifically, the following modules may be included:
  • the closing module 2201 is adapted to close the current page label header by triggering the closing focus on the current page label header by the touch focus;
  • the first determining module 2202 is configured to determine, according to the current browser tab bar information and the page tag header message drawn therein, a target width of the page label header drawn in the browser tab bar;
  • the first drawing module 2203 is adapted to redraw the page label header and/or the touch focus currently drawn in the browser tab bar according to the target width; wherein the redrawn one of the current browser tab columns
  • the closed identification position of the page label header coincides with the position of the touch focus.
  • a new module 2204 is configured to add a current page label header by triggering a new identifier on the browser tab bar by the touch focus;
  • the second determining module 2205 is adapted to determine, according to the current browser tab bar information and the page tag header message drawn therein, a target width of the page tag header drawn in the browser tag column;
  • a second rendering module 2206 configured to redraw a page label header and/or the touch focus currently drawn in a browser tab bar according to the target width; wherein the redrawing one of the current browser tab columns
  • the closed identification position of the page label header coincides with the position of the touch focus.
  • the second determining module 2205 is further adapted to:
  • W new When W new >W max , W new takes the value W max ; when W new ⁇ W min , W new takes the value W min ;
  • S is the length of the browser tab bar
  • M is the number of page label headers after the new page label header
  • W new is the target width of the page label header
  • W min is the minimum width of the page label header
  • W max is the page label The maximum width of the head.
  • the second rendering module 2206 is further adapted to:
  • the first background is drawn on the page label header corresponding to the current page in the browser tab bar according to the target width, and the second background is drawn on the other page label headers;
  • the second rendering module 2206 is further adapted to:
  • S is the length of the browser tab bar
  • M is the number of page label headers after the new page label header
  • W max is the maximum width of the page label header
  • the abscissa of the position where the touch focus moves is (M*W new -H/2), and the ordinate is D/2;
  • M is the number of page label headers after the new page label header
  • W new is the target width of the page label header
  • H is the width of the closing identifier
  • D is the height of the browser tab bar.
  • the second rendering module 2206 is further adapted to:
  • FIG. 23 a block diagram of a third embodiment of a browser according to an embodiment of the present invention is shown, which may specifically include the following modules:
  • the closing module 2301 is adapted to close the current page label header by triggering a touch focus on a closed identifier in a current page label header;
  • the first determining module 2302 is configured to determine, according to the current browser tab bar information and the page tag header message drawn therein, a target width of the page tag header drawn in the browser tag column;
  • the first drawing module 2303 is adapted to redraw the page label header and/or the touch focus currently drawn in the browser tab bar according to the target width; wherein the redrawing one of the current browser tab columns
  • the closed identification position of the page label header coincides with the position of the touch focus.
  • the third drawing module 2304 is adapted to redraw the page label header currently drawn in the browser tab bar according to the width of the current page label header when the touch focus triggers the position swapping operation of the current tab page.
  • the third rendering module 2304 is further adapted to:
  • the width of the current page label header respectively draws a first background on the page label header corresponding to the current page in the browser tab bar, and draws a second background on the other page label headers;
  • the third rendering module 2304 is further adapted to:
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of some or all of the components of the page label header in a browser in accordance with an embodiment of the present invention. All features.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 24 illustrates a client device, such as a browser, that can implement the rendering of a page tag header in a browser in accordance with the present invention.
  • the client device traditionally includes a processor 2401 and a computer program product or computer readable medium in the form of a memory 2402.
  • the memory 2402 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • Memory 2402 has a memory space 2403 for program code 2404 for performing any of the method steps described above.
  • storage space 2403 for program code may include various program code 2404 for implementing various steps in the above methods, respectively.
  • These program codes can be from one or more computer program products Read or write to one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such a computer program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have a storage section, a storage space, and the like arranged similarly to the storage 2402 in the client device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes computer readable code 2404', ie, code that can be read by, for example, a processor such as 2401, which when executed by the client device causes the client device to perform the method described above The various steps.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

公开了一种浏览器中页面标签头的绘制方法及装置,所述的方法包括:通过触控焦点对当前页面标签头中关闭标识的触发,关闭所述当前页面标签头(101);依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度(102);依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点(103);其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。用户不用手动将触控焦点移动到页面标签头的关闭标识处,即可直接通过触控焦点触发关闭标识,大大提高了操作的简便性。

Description

一种浏览器中页面标签头的绘制方法及装置 技术领域
本发明涉及浏览器的技术领域,尤其涉及一种浏览器中页面标签头的绘制方法和一种浏览器中页面标签头的绘制装置。
背景技术
浏览器是指可以显示网页服务器或者文件系统的HTML(HyperText Markup Language,超文本标记语言)文件内容,并让用户与这些文件交互的一种应用程序。浏览器主要通过HTTP协议与网页服务器交互并获取网页,这些网页由URL指定,文件格式通常为HTML,并由MIME在HTTP协议中指明。一个网页中可以包括多个文档,每个文档都是分别从服务器获取的。大部分的浏览器本身支持除了HTML之外的广泛的格式,例如JPEG、PNG、GIF等图像格式,并且能够扩展支持众多的插件(plug-ins)。另外,许多浏览器还支持其他的URL类型及其相应的协议,如FTP、Gopher、HTTPS(HTTP协议的加密版本)。HTTP内容类型和URL协议规范允许网页设计者在网页中嵌入图像、动画、视频、声音、流媒体等。
目前的浏览器多是多标签(Tab)显示网页的,对于不同的网页链接都是在不同的页面标签中进行加载渲染,以便用户进行阅览。
标签在删除后的重绘,通常是按照标准大小尺寸进行标签的绘制。对于关闭后的剩下的标签的重绘,标签的大小发生了变化,关闭按钮的位置也发生了变化,和当前鼠标点的位置不是一致的,用户不得不手动地自己移动鼠标位置,以将鼠标移动到标签的关闭按钮处才行,操作十分麻烦。尤其对于众多的标签,难以进行精准的移动,操作效率十分低。
发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决或者减缓上述问题的一种浏览器中页面标签头的绘制方法和相应的一种浏览器中页面标签头的绘制装置。
根据本发明的一个方面,提供了一种浏览器中页面标签头的绘制方法,包括:
通过触控焦点对当前页面标签头中关闭标识的触发,关闭所述当前页面标签头;
依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
根据本发明的另一个方面,提供了一种浏览器中页面标签头的绘制装置,包括处理器,用于:
通过触控焦点对当前页面标签头中关闭标识的触发,关闭所述当前页面标签头;
依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;以及
依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
根据本发明的又一个方面,提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在客户端装置上运行时,导致所述客户端装置执行上述的浏览器中页面标签头的绘制方法。
根据本发明的再一个方面,提供了一种计算机可读介质,其中存储了上述的计算机程序。
本发明的有益效果为:
本发明实施例在关闭当前页面标签头时,确定浏览器标签栏中绘制的页面标签头的目标宽度,再依据目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点,使得重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与触控焦点的位置相重合,用户不用手动将触控焦点移动到页面标签头的关闭标识处,即可直接通过触控焦点触发关闭标识,大大提高了操作的简便性。
本发明实施例在新增页面标签头时,确定浏览器标签栏中绘制的页面标签头的目标宽度,再依据目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点,使得重新绘制的当前浏览器标签栏中的新增标识位置与触控焦点的位置相重合,用户不用手动将触控焦点移动到新增标识处,即可直接通过触控焦点触发新增标识,大大提高了操作的简便性。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示意性地示出了根据本发明一个实施例的一种浏览器中页面标签头的绘制方法实施例1的步骤流程图;
图2示意性地示出了根据本发明一个实施例的一种浏览器结构示例图;
图3示意性地示出了根据本发明一个实施例的一种关闭网页标签头的示例图;
图4示意性地示出了根据本发明一个实施例的一种关闭网页标签头的示例图;
图5示意性地示出了根据本发明一个实施例的一种关闭网页标签头的示例图;
图6示意性地示出了根据本发明一个实施例的一种关闭网页标签头的示例图;
图7示意性地示出了根据本发明一个实施例的一种关闭网页标签头的示例图;
图8示意性地示出了根据本发明一个实施例的一种关闭网页标签头的示例图;
图9示意性地示出了根据本发明一个实施例的一种拖曳网页标签头的示例图;
图10示意性地示出了根据本发明一个实施例的一种拖曳网页标签头的示例图;
图11示意性地示出了根据本发明一个实施例的一种浏览器中页面标签头的绘制方法实施例2的步骤流程图;
图12示意性地示出了根据本发明一个实施例的一种新增网页标签头的示例图;
图13示意性地示出了根据本发明一个实施例的一种新增网页标签头的示例图;
图14示意性地示出了根据本发明一个实施例的一种新增网页标签头的示例图;
图15示意性地示出了根据本发明一个实施例的一种新增网页标签头的示例图;
图16示意性地示出了根据本发明一个实施例的一种浏览器中页面标签头的绘制方法实施例3的步骤流程图;
图17示意性地示出了根据本发明一个实施例的一种移动网页标签头的示例图;
图18示意性地示出了根据本发明一个实施例的一种浏览器中页面标签头的绘制装置实施例1的结构框图;
图19示意性地示出了根据本发明一个实施例的一种浏览器中页面标签头的绘制装置实施例2的结构框图;
图20示意性地示出了根据本发明一个实施例的一种浏览器中页面标签头的绘制装置实施例3的结构框图;
图21示意性地示出了根据本发明一个实施例的一种浏览器实施例1的结构框图;
图22示意性地示出了根据本发明一个实施例的一种浏览器实施例2的结构框图;以及
图23示意性地示出了根据本发明一个实施例的一种浏览器实施例3的 结构框图。
图24示意性地示出了用于执行根据本发明的方法的客户端装置的框图;以及
图25示意性地示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单元。
具体实施例
下面结合附图和具体的实施方式对本发明作进一步的描述。
参照图1,示出了根据本发明一个实施例的一种浏览器中页面标签头的绘制方法实施例1的步骤流程图,可以包括如下步骤:
步骤101,通过触控焦点对当前页面标签头中关闭标识的触发,关闭所述当前页面标签头;
需要说明的是,触控焦点可以为用户的操作控件,例如通过鼠标控制的光标、通过触控屏幕控制的触摸点等等,本发明实施例对此不加以限制。
如图2所示,在一个浏览器中可以包括浏览器标签栏(例如图2所示的位置B),在浏览器标签栏中可以包括一个或多个页面标签头(例如图2所示的位置A),在浏览器的主体位置可以显示当前网页(例如图2所示的位置C),在页面标签头中可以设置关闭标识(例如图2所示的“X”标识),该关闭标识可以用于触发该页面标签头及对应的网页的关闭操作,在页面标签头的最右/左侧可以设置新增标识(例如图2所示的“+”标识),该新增标识可以用于触发新词页面标签头即对应的网页的新增操作。
在具体实现中,所述触控焦点对当前页面标签头中关闭标识的触发可以包括以下两种情形:
在一种情形中,触控焦点通过点击当前页面标签头中的关闭标识触发关闭标识;
例如,用户通过触控焦点点击如图2所示的“X”标识触发关闭标识。
和/或,
在另一种情形中,触控焦点通过将当前页面标签头移出浏览器标签栏触发当前页面标签中的关闭标识。
在本发明实施例中,可以通过触控焦点将当前页面标签头移出浏览器标 签栏,例如,将光标位置移动到当前页面标签头,然后按住鼠标左键,移动鼠标,即可将当前页面标签头移出浏览器标签栏。当前页面标签头移出浏览器标签栏后,触发关闭标识,触发当前页面标签头及对应的网页的在当前浏览器窗口的关闭操作。
步骤102,依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
在关闭了当前页面标签头后,使得页面标签头发生变化,因此需要进行重绘。在重绘之前,需要先确定重绘时页面标签的目标宽度。
在本发明的一种优选实施例中,步骤102可以包括如下子步骤:
子步骤S11,当被关闭的页面标签头为最后一个页面标签头时,通过公式S=N*Wnew确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
子步骤S12,当Wnew>Wmax时,Wnew取值Wmax;当Wnew<Wmin时,Wnew取值Wmin
其中,S为浏览器标签栏的长度,N为所述当前页面标签头关闭后页面标签头的数量,Wnew为页面标签头的目标宽度,Wmin为页面标签头的最小宽度,Wmax为页面标签头的最大宽度。
在本发明实施例中,浏览器标签栏可以在一定范围内显示页面标签头,例如图3所示的页面标签头A至页面标签头I之间的范围。
为了更加美观整洁同时保证用户正常使用,页面标签头的长度可以控制在一定范围内,介于预置的最大宽度和最小宽度之间(包括最大宽度和最小宽度)。
通过公式S=N*(乘法计算)Wnew确定目标宽度时,当Wnew>Wmax时,Wnew取值Wmax;当Wnew<Wmin时,Wnew取值Wmin;当Wmin≤Wnew≤Wmax时,Wnew可以取公式的计算值,即S/(除法计算)N。
需要说明的是,最后一个页面标签头与页面标签生成的顺序相关,若页面标签头自左往右生成,则可以以最右的页面标签头作为最后一个页面标签头,例如图3所示的页面标签头I;若页面标签头自右往左生成,则可以以最左的页面标签头作为最后一个页面标签头,例如图3所示的页面标签头A。
在本发明的一种优选实施例中,步骤102可以包括如下子步骤:
子步骤S21,当被关闭的页面标签头为非最后一个页面标签头时,确定当前页面标签头的宽度最为中绘制的页面标签头的目标宽度。
在本发明实施例中,若被关闭的页面标签头为非最后一个页面标签头时,可以锁定页面标签头的宽度。
例如,若页面标签头自左往右生成,图3所示的页面标签头A至页面标签头H都为非最后一个页面标签头。
步骤103,依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;
在具体实现中,进行重绘时,所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置可以与所述触控焦点的位置相重合。
在本发明的一种优选实施例中,步骤103可以包括如下子步骤:
子步骤S31,确定当前标签页面对应的页面标签头;
每一个标签页面都可以对应一个页面标签头,在当前浏览器窗口中显示的标签页面即为当前标签页面。
在本发明实施例中,在关闭网页标签头时,当前显示的网页没有改变。
在本发明实施例的一种优选示例中,子步骤S31进一步可以包括如下子步骤:
子步骤S311,在预置的存储对象中查找当前标签网页对应的页面标识;
子步骤S312,查找该页面标识对应的页面标签头。
在本发明实施例中,存储对象可以为Webcontent对象,Webcontent对象是在各个网页子进程进行加载的标签页面的内容对象形成的渲染结果信息,该渲染结果是被发送给浏览器主进程进行显示用的。
对于每一个绘制的页面标签头,其对应的Webcontent对象中的参数ID号码会与一个网页标识(例如index值)进行对应,其标识出了当前显示的页面标签头的index值为firstvisibleindex,例如是“index1”,这样index2、index3就是顺序后依次被渲染加载的。
子步骤S32,分别按照所述目标宽度在浏览器标签栏中对当前标签页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
当前标签页面对应的页面标签头可以采用高亮的第一背景进行标识,例 如图3所示的页面标签头A,而其他页面标签头则可以采用暗色的第二背景进行标识,例如图3所示的页面标签B、C。
在本示例中,可以采用DrawItemImg函数绘制第一背景和/或第二背景。具体地,将页面标签头的背景图(例如png文件)通过pnglib库解码为32位位图HBITMAP,然后通过SelectObject函数将该位图绑定到HDC上,再调用alphablend函数将位图绘制到屏幕上。
和/或,
子步骤S33,分别在浏览器标签栏中绘制页面标签头对应的网页标识;
在本示例中,可以DrawTabIcon函数绘制网页标识,而网页标识可以为网页LOGO。具体地,将页面标签头的网页标识(例如png文件)通过pnglib库解码为32位位图HBITMAP,然后通过SelectObject函数将该位图绑定到HDC上,再调用alphablend函数将位图绘制到屏幕上。
和/或,
子步骤S34,分别在浏览器标签栏中绘制页面标签头对应的网页标题;
在本示例中,可以采用DrawText函数绘制网页标题。具体地,Drawtext为系统API(Application Program Interface,应用程序接口),通过传递参数文字和位置,就可以将文字绘制到屏幕上。
和/或,
子步骤S35,分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
在本示例中,可以采用DrawTabCloseButton函数绘制关闭标识。具体地,将页面标签头的关闭标识(例如png文件)通过pnglib库解码为32位位图HBITMAP,然后通过SelectObject函数将该位图绑定到HDC上,再调用alphablend函数将位图绘制到屏幕上。
例如,如图3所示,触控焦点触发了最后一个页面标签头,即页面标签头I的关闭标识,该关闭标识可以由于触控焦点的悬停hover操作以反色进行表示。如图4所示,在关闭页面标签头I后,对页面标签头A至页面标签头H进行重绘,页面标签头A至页面标签头H的宽度增加,仍然填满浏览器标签栏,使得此时触控焦点的位置与被关闭的页面标签头前一个的页面标签头,即页面标签头H的关闭标识的位置重叠,该关闭标识也可以触控焦点 的悬停hover操作以反色进行表示。
又例如,如图5所示,触控焦点触发了非最后一个页面标签头,如页面标签头A的关闭标识,该关闭标识可以由于触控焦点的悬停hover操作以反色进行表示。如图6所示,在关闭页面标签头A后,对页面标签头B至页面标签头I进行重绘,页面标签头B至页面标签头I的宽度增加,仍然填满浏览器标签栏,使得此时触控焦点的位置与被关闭的页面标签头后一个的页面标签头,即页面标签头B的关闭标识的位置重叠,该关闭标识也可以触控焦点的悬停hover操作以反色进行表示。
在本发明的一种优选实施例中,步骤103可以包括如下子步骤:
子步骤S41,确定当前标签页面对应的页面标签头;
子步骤S42,分别按照所述目标宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
和/或,
子步骤S43,分别在浏览器标签栏中绘制页面标签头对应的网页标识;
和/或,
子步骤S44,分别在浏览器标签栏中绘制页面标签头对应的网页标识;
和/或,
子步骤S45,分别在浏览器标签栏中绘制页面标签头对应的关闭标识;
子步骤S46,当满足条件S≥N*Wmax且被关闭的页面标签头为最后一个页面标签头时,将触控焦点移动到当前在浏览器标签栏中其中一个页面标签头的关闭标识的位置上;
其中,S为浏览器标签栏的长度,N为所述当前页面标签头关闭后页面标签头的数量,Wmax为页面标签头的最大宽度。
在本发明实施例中,在关闭为最后一个页面标签头时,若Wnew取值为Wmax,使得页面标签头的总长度不能填满整个浏览器标签栏,此时,触控焦点的位置位于页面标签头之外,则在检测到触控焦点的释放事件时移动触控焦点,使得触控焦点与关闭标识的位置重叠。
在本发明实施例的一种优选示例中,触控焦点移动的位置的横坐标为(N*Wnew-H/2),纵坐标为D/2;
其中,N为所述当前页面标签头关闭后页面标签头的数量,Wnew为页面标签头的目标宽度,H为关闭标识的宽度,D为浏览器标签栏的高度。
在此示例中,设置触控焦点的位置为被关闭的页面标签头之前的页面标签头的关闭标识处。
例如,如图7所示,页面标签头A至页面标签头D的宽度为Wmax,未能填满浏览器标签栏,触控焦点触发了最后一个页面标签头,即页面标签头D的关闭标识,该关闭标识可以由于触控焦点的悬停hover操作以反色进行表示。如图8所示,在关闭页面标签头D后,对页面标签头A至页面标签头C进行重绘,页面标签头A至页面标签头C的宽度不变,仍为Wmax,依然不能填满浏览器标签栏,此时可以移动触控焦点的位置至被关闭的页面标签头的前一个页面标签头,即页面标签头C的关闭标识的位置,使两者重叠,该关闭标识也可以触控焦点的悬停hover操作以反色进行表示。
需要说明的是,由于子步骤S41-子步骤S45与子步骤S31-子步骤S35的应用基本相似,所以描述的比较简单,相关之处参见子步骤S31-子步骤S35的部分说明即可,本发明实施例在此不加以详述。
本发明实施例在关闭当前页面标签头时,确定浏览器标签栏中绘制的页面标签头的目标宽度,再依据目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点,使得重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与触控焦点的位置相重合,用户不用手动将触控焦点移动到页面标签头的关闭标识处,即可直接通过触控焦点触发关闭标识,大大提高了操作的简便性。
在本发明的一种优选实施例中,还可以包括如下步骤:
步骤104,当触控焦点将当前页面标签头移出浏览器标签栏时,在所述触控焦点所在的位置生成所述页面标签头对应的标签网页的缩略图;
步骤105,当监测到触控焦点针对所述页面标签头的释放事件时,启动浏览器窗口;
步骤106,在所述浏览器窗口中加载所述页面标签头对应的标签网页。
在本发明实施例中,对于触控焦点拖拽出来(例如光标的移动位置超出了浏览器标签栏的绘制窗口区间)的页面标签头,将依据当前URL的网页 进行缩略图的生成,在当前的触控焦点的位置处进行显示该缩略图,该缩略图是一个浏览器子窗口,该子窗口中加载有该缩略图。例如,将图8所示的页面标签头C移出浏览器标签栏时,如图9所示,生成页面标签头C的网页缩略图。
在监测到了触控焦点针对所述页面标签头的释放事件,例如鼠标的左键释放事件时,就生成一个浏览器新窗口中加载该移动的页面标签头对应的网页。例如,如图10所示,将将图8所示的页面标签头C移出浏览器标签栏并释放时,生成一个浏览器新窗口加载页面标签头C对应的网页。
对应地,在触控焦点的移动区域进入了浏览器标签栏的页面标签头的绘制区域窗口时,再重新绘制该页面标签头到对应的区间范围中,记录网页标识列(例如index值)。
参照图11,示出了根据本发明一个实施例的一种浏览器中页面标签头的绘制方法实施例2的步骤流程图,可以包括如下步骤:
步骤1101,通过触控焦点对当前页面标签头中关闭标识的触发,关闭所述当前页面标签头;
步骤1102,依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
步骤1103,依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合;
步骤1104,通过触控焦点对浏览器标签栏中新增标识的触发,新增当前页面标签头;
例如,用户通过触控焦点点击如图2所示的“+”标识触发新增标识。
步骤1105,依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
在新增了页面标签头后,使得页面标签头发生变化,因此需要进行重绘。在重绘之前,需要先确定重绘时页面标签的目标宽度。
在本发明的一种优选实施例中,步骤1105可以包括如下子步骤:
子步骤S51,通过公式S=M*Wnew确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
当Wnew>Wmax时,Wnew取值Wmax;当Wnew<Wmin时,Wnew取值Wmin
其中,S为浏览器标签栏的长度,M为新增页面标签头后页面标签头的数量,Wnew为页面标签头的目标宽度,Wmin为页面标签头的最小宽度,Wmax为页面标签头的最大宽度。
在本发明实施例中,浏览器标签栏可以在一定范围内显示页面标签头,例如图3所示的页面标签头A至页面标签头I之间的范围。
为了更加美观整洁同时保证用户正常使用,页面标签头的长度可以控制在一定范围内,介于预置的最大宽度和最小宽度之间(包括最大宽度和最小宽度)。
通过公式S=M*(乘法计算)Wnew确定目标宽度时,当Wnew>Wmax时,Wnew取值Wmax;当Wnew<Wmin时,Wnew取值Wmin;当Wmin≤Wnew≤Wmax时,Wnew可以取公式的计算值,即S/(除法计算)M。
需要说明的是,若页面标签头自左往右生成,则可以以将新增标识设置在浏览器标签栏的最右侧,若页面标签头自右往左生成,则可以以将新增标识设置在浏览器标签栏的最左侧。
步骤1106,依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;
在具体实现中,进行重绘时,所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
在本发明的一种优选实施例中,步骤1106可以包括如下子步骤:
子步骤S61,确定当前标签页面对应的页面标签头;
在本发明实施例中,在新增网页标签头时,新增的网页标签头显示为当前网页,即新增的网页标签头为当前标签页面对应的页面标签头。
在本发明实施例的一种优选示例中,子步骤S61进一步可以包括如下子步骤:
子步骤S611,在预置的存储对象中查找当前标签网页对应的页面标识;
子步骤S612,查找该页面标识对应的页面标签头。
子步骤S62,分别按照所述目标宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
和/或,
子步骤S63,分别在浏览器标签栏中绘制页面标签头对应的网页标识;
和/或,
子步骤S64,分别在浏览器标签栏中绘制页面标签头对应的网页标题;
和/或,
子步骤S65,分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
需要说明的是,由于子步骤S61-子步骤S65与子步骤S31-子步骤S35的应用基本相似,所以描述的比较简单,相关之处参见子步骤S31-子步骤S35的部分说明即可,本发明实施例在此不加以详述。
例如,如图12所示,当前浏览器标签栏有页面标签头A至页面标签头G共7个页面标签头,这7个页面标签头填满了浏览器标签栏,新增标识位于最右侧。触控焦点触发了新增标识,如图13所示,在页面标签头G后增加页面标签头H。在新增页面标签头H后,对页面标签头A至页面标签头H进行绘制,页面标签头A至页面标签头G的宽度减少,但是仍然填满浏览器标签栏,新增标识依然位于最右侧,使得此时触控焦点的位置与新增标识的位置重叠。
在本发明的一种优选实施例中,步骤1106可以包括如下子步骤:
子步骤S71,确定当前标签页面对应的页面标签头;
子步骤S72,分别按照所述目标宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
和/或,
子步骤S73,分别在浏览器标签栏中绘制页面标签头对应的网页标识;
和/或,
子步骤S74,分别在浏览器标签栏中绘制页面标签头对应的网页标题;
和/或,
子步骤S75,分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
子步骤S76,当满足条件S≥M*Wmax时,将触控焦点移动到当前在浏览 器标签栏中其中一个页面标签头的关闭标识的位置上;
其中,S为浏览器标签栏的长度,M为新增页面标签头后页面标签头的数量,Wmax为页面标签头的最大宽度。
在本发明实施例中,在新增页面标签头时,若Wnew取值为Wmax,而页面标签头的总长度不能填满整个浏览器标签栏时,触控焦点的位置位于页面标签头之内,则在检测到触控焦点的释放事件时移动触控焦点,使得触控焦点与新增标识的位置重叠。
在本发明实施例的一种优选示例中,触控焦点移动的位置的横坐标为(M*Wnew-H/2),纵坐标为D/2;
其中,M为新增页面标签头后页面标签头的数量,Wnew为页面标签头的目标宽度,H为关闭标识的宽度,D为浏览器标签栏的高度。
例如,如图14所示,页面标签头A至页面标签头D的宽度为Wmax,未能填满浏览器标签栏,新增标识位于最右侧。触控焦点触发了新增标识,如图15所示,在页面标签头D后增加页面标签头E。在新增页面标签头E后,对页面标签头A至页面标签头E进行绘制,页面标签头A至页面标签头E的宽度为Wmax,依然不能填满浏览器标签栏,此时可以移动触控焦点的位置至新增标识的位置重叠。
需要说明的是,由于子步骤S71-子步骤S75与子步骤S31-子步骤S35的应用基本相似,所以描述的比较简单,相关之处参见子步骤S31-子步骤S35的部分说明即可,本发明实施例在此不加以详述。
本发明实施例在新增页面标签头时,确定浏览器标签栏中绘制的页面标签头的目标宽度,再依据目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点,使得重新绘制的当前浏览器标签栏中的新增标识位置与触控焦点的位置相重合,用户不用手动将触控焦点移动到新增标识处,即可直接通过触控焦点触发新增标识,大大提高了操作的简便性。
参照图16,示出了根据本发明一个实施例的一种浏览器中页面标签头的绘制方法实施例2的步骤流程图,可以包括如下步骤:
步骤1601,通过触控焦点对当前页面标签头中关闭标识的触发,关闭所 述当前页面标签头;
步骤1602,依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
步骤1603,依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合;
步骤1604,当触控焦点触发当前标签页面的位置交换操作时,依据当前页面标签头的宽度重新绘制当前在浏览器标签栏中绘制的页面标签头。
在本发明实施例中,对于触控焦点拖拽移动(例如光标的移动位置未超出了浏览器标签栏的绘制窗口区间)的页面标签头,触发了当前标签页面的位置交换操作。
在交换了页面标签头后,使得页面标签头的位置发生变化,因此需要进行重绘。
在本发明的一种优选实施例中,步骤1604可以包括如下子步骤:
子步骤S81,确定当前标签页面对应的页面标签头;
在本发明实施例中,在位置交换操作时,触控焦点拖曳移动的网页标签头对应的网页显示为当前网页,即触控焦点拖曳移动的网页标签头为当前标签页面对应的页面标签头。
在本发明实施例的一种优选示例中,子步骤S81进一步可以包括如下子步骤:
子步骤S811,在预置的存储对象中查找当前标签网页对应的页面标识;
子步骤S812,查找该页面标识对应的页面标签头。
子步骤S82,分别当前页面标签头的宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
和/或,
子步骤S83,分别在浏览器标签栏中绘制页面标签头对应的网页标识;
和/或,
子步骤S84,分别在浏览器标签栏中绘制页面标签头对应的网页标题;
和/或,
子步骤S85,分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
例如,对图12所示的页面标签头B和页面标签头C触发移动操作,由于页面标签头没有增加,也没有减少,因此其宽度不会发生变化,如图17所示,在移动时就是依据触控焦点的移动位置判断出是页面标签头C(例如网页标识为index3)、页面标签头B(例如网页标识为index2)之间进行了交互移动从而重绘index3、index2对应的页面标签头的区域,即可以依据当前页面标签头的移动位置判断出交换页面标签头的区域,再进行重绘。
需要说明的是,由于子步骤S81-子步骤S85与子步骤S31-子步骤S35的应用基本相似,所以描述的比较简单,相关之处参见子步骤S31-子步骤S35的部分说明即可,本发明实施例在此不加以详述。
对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明实施例并不受所描述的动作顺序的限制,因为依据本发明实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本发明实施例所必须的。
参照图18,示出了根据本发明一个实施例的一种浏览器中页面标签头的绘制装置实施例1的结构框图,具体可以包括如下模块:
关闭模块1801,适于通过触控焦点对当前页面标签头中关闭标识的触发,关闭所述当前页面标签头;
第一确定模块1802,适于依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
第一绘制模块1803,适于依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
在本发明的一种优选实施例中,所述触控焦点对当前页面标签头中关闭标识的触发包括:
触控焦点通过点击当前页面标签头中的关闭标识触发关闭标识;
和/或,
触控焦点通过将当前页面标签头移出浏览器标签栏触发当前页面标签中的关闭标识。
在本发明的一种优选实施例中,所述第一确定模块1802还可以适于:
当被关闭的页面标签头为最后一个页面标签头时,通过公式S=N*Wnew确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
当Wnew>Wmax时,Wnew取值Wmax当Wnew<Wmin时,Wnew取值Wmin
其中,S为浏览器标签栏的长度,N为所述当前页面标签头关闭后页面标签头的数量,Wnew为页面标签头的目标宽度,Wmin为页面标签头的最小宽度,Wmax为页面标签头的最大宽度。
在本发明的一种优选实施例中,所述第一确定模块1802还可以适于:
当被关闭的页面标签头为非最后一个页面标签头时,确定当前页面标签头的宽度最为中绘制的页面标签头的目标宽度。
在本发明的一种优选实施例中,所述第一绘制模块1803还可以适于:
确定当前标签页面对应的页面标签头;
分别按照所述目标宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的网页标识;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的网页标题;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
在本发明的一种优选实施例中,所述第一绘制模块1803还可以适于:
当满足条件S≥N*Wmax且被关闭的页面标签头为最后一个页面标签头时,将触控焦点移动到当前在浏览器标签栏中其中一个页面标签头的关闭标识的位置上;
其中,S为浏览器标签栏的长度,N为所述当前页面标签头关闭后页面标签头的数量,Wmax为页面标签头的最大宽度。
在本发明的一种优选实施例中,触控焦点移动的位置的横坐标为 (N*Wnew-H/2),纵坐标为D/2;
其中,N为所述当前页面标签头关闭后页面标签头的数量,Wnew为页面标签头的目标宽度,H为关闭标识的宽度,D为浏览器标签栏的高度。
在本发明的一种优选实施例中,所述第一绘制模块1803还可以适于:
在预置的存储对象中查找当前标签网页对应的页面标识;
查找该页面标识对应的页面标签头。
在本发明的一种优选实施例中,还包括可以包括如下模块:
显示模块,适于在触控焦点将当前页面标签头移出浏览器标签栏时,在所述触控焦点所在的位置生成所述页面标签头对应的标签网页的缩略图;
启动模块,适于在监测到触控焦点针对所述页面标签头的释放事件时,启动浏览器窗口;
加载模块,适于在所述浏览器窗口中加载所述页面标签头对应的标签网页。
参照图19,示出了根据本发明一个实施例的一种浏览器中页面标签头的绘制装置实施例2的结构框图,具体可以包括如下模块:
关闭模块1901,适于通过触控焦点对当前页面标签头中关闭标识的触发,关闭所述当前页面标签头;
第一确定模块1902,适于依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
第一绘制模块1903,适于依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
新增模块1904,适于通过触控焦点对浏览器标签栏中新增标识的触发,新增当前页面标签头;
第二确定模块1905,适于依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
第二绘制模块1906,适于依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器 标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
在本发明的一种优选实施例中,所述第二确定模块1905还可以适于:
通过公式S=M*Wnew确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
当Wnew>Wmax时,Wnew取值Wmax;当Wnew<Wmin时,Wnew取值Wmin
其中,S为浏览器标签栏的长度,M为新增页面标签头后页面标签头的数量,Wnew为页面标签头的目标宽度,Wmin为页面标签头的最小宽度,Wmax为页面标签头的最大宽度。
在本发明的一种优选实施例中,所述第二绘制模块1906还可以适于:
确定当前标签页面对应的页面标签头;
分别按照所述目标宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的网页标识;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的网页标题;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
在本发明的一种优选实施例中,所述第二绘制模块1906还可以适于:
当满足条件S≥M*Wmax时,将触控焦点移动到当前在浏览器标签栏中其中一个页面标签头的关闭标识的位置上;
其中,S为浏览器标签栏的长度,M为新增页面标签头后页面标签头的数量,Wmax为页面标签头的最大宽度。
在本发明的一种优选实施例中,触控焦点移动的位置的横坐标为(M*Wnew-H/2),纵坐标为D/2;
其中,M为新增页面标签头后页面标签头的数量,Wnew为页面标签头的目标宽度,H为关闭标识的宽度,D为浏览器标签栏的高度。
在本发明的一种优选实施例中,所述第二绘制模块1906还可以适于:
在预置的存储对象中查找当前标签网页对应的页面标识;
查找该页面标识对应的页面标签头。
参照图20,示出了根据本发明一个实施例的一种浏览器中页面标签头的绘制装置实施例3的结构框图,具体可以包括如下模块:
关闭模块2001,适于通过触控焦点对当前页面标签头中关闭标识的触发,关闭所述当前页面标签头;
第一确定模块2002,适于依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
第一绘制模块2003,适于依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
第三绘制模块2004,适于在触控焦点触发当前标签页面的位置交换操作时,依据当前页面标签头的宽度重新绘制当前在浏览器标签栏中绘制的页面标签头。
在本发明的一种优选实施例中,所述第三绘制模块2004还可以适于:
确定当前标签页面对应的页面标签头;
分别当前页面标签头的宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的网页标识;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的网页标题;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
在本发明的一种优选实施例中,所述第三绘制模块2004还可以适于:
在预置的存储对象中查找当前标签网页对应的页面标识;
查找该页面标识对应的页面标签头。
参照图21,示出了根据本发明一个实施例的一种浏览器实施例1的结构 框图,具体可以包括如下模块:
关闭模块2101,适于通过触控焦点对当前页面标签头中关闭标识的触发,关闭所述当前页面标签头;
第一确定模块2102,适于依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
第一绘制模块2103,适于依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
在本发明的一种优选实施例中,所述触控焦点对当前页面标签头中关闭标识的触发包括:
触控焦点通过点击当前页面标签头中的关闭标识触发关闭标识;
和/或,
触控焦点通过将当前页面标签头移出浏览器标签栏触发当前页面标签中的关闭标识。
在本发明的一种优选实施例中,所述第一确定模块2102还可以适于:
当被关闭的页面标签头为最后一个页面标签头时,通过公式S=N*Wnew确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
当Wnew>Wmax时,Wnew取值Wmax;当Wnew<Wmin时,Wnew取值Wmin
其中,S为浏览器标签栏的长度,N为所述当前页面标签头关闭后页面标签头的数量,Wnew为页面标签头的目标宽度,Wmin为页面标签头的最小宽度,Wmax为页面标签头的最大宽度。
在本发明的一种优选实施例中,所述第一确定模块2102还可以适于:
当被关闭的页面标签头为非最后一个页面标签头时,确定当前页面标签头的宽度最为中绘制的页面标签头的目标宽度。
在本发明的一种优选实施例中,所述第一绘制模块2103还可以适于:
确定当前标签页面对应的页面标签头;
分别按照所述目标宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的网页标识;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的网页标题;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
在本发明的一种优选实施例中,所述第一绘制模块2103还可以适于:
当满足条件S≥N*Wmax且被关闭的页面标签头为最后一个页面标签头时,将触控焦点移动到当前在浏览器标签栏中其中一个页面标签头的关闭标识的位置上;
其中,S为浏览器标签栏的长度,N为所述当前页面标签头关闭后页面标签头的数量,Wmax为页面标签头的最大宽度。
在本发明的一种优选实施例中,触控焦点移动的位置的横坐标为(N*Wnew-H/2),纵坐标为D/2;
其中,N为所述当前页面标签头关闭后页面标签头的数量,Wnew为页面标签头的目标宽度,H为关闭标识的宽度,D为浏览器标签栏的高度。
在本发明的一种优选实施例中,所述第一绘制模块2103还可以适于:
在预置的存储对象中查找当前标签网页对应的页面标识;
查找该页面标识对应的页面标签头。
在本发明的一种优选实施例中,还包括可以包括如下模块:
显示模块2104,适于在触控焦点将当前页面标签头移出浏览器标签栏时,在所述触控焦点所在的位置生成所述页面标签头对应的标签网页的缩略图;
启动模块2105,适于在监测到触控焦点针对所述页面标签头的释放事件时,启动浏览器窗口;
加载模块2106,适于在所述浏览器窗口中加载所述页面标签头对应的标签网页。
参照图22,示出了根据本发明一个实施例的一种浏览器实施例2的结构框图,具体可以包括如下模块:
关闭模块2201,适于通过触控焦点对当前页面标签头中关闭标识的触发,关闭所述当前页面标签头;
第一确定模块2202,适于依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
第一绘制模块2203,适于依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
新增模块2204,适于通过触控焦点对浏览器标签栏中新增标识的触发,新增当前页面标签头;
第二确定模块2205,适于依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
第二绘制模块2206,适于依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
在本发明的一种优选实施例中,所述第二确定模块2205还可以适于:
通过公式S=M*Wnew确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
当Wnew>Wmax时,Wnew取值Wmax;当Wnew<Wmin时,Wnew取值Wmin
其中,S为浏览器标签栏的长度,M为新增页面标签头后页面标签头的数量,Wnew为页面标签头的目标宽度,Wmin为页面标签头的最小宽度,Wmax为页面标签头的最大宽度。
在本发明的一种优选实施例中,所述第二绘制模块2206还可以适于:
确定当前标签页面对应的页面标签头;
分别按照所述目标宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的网页标识;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的网页标题;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
在本发明的一种优选实施例中,所述第二绘制模块2206还可以适于:
当满足条件S≥M*Wmax时,将触控焦点移动到当前在浏览器标签栏中其中一个页面标签头的关闭标识的位置上;
其中,S为浏览器标签栏的长度,M为新增页面标签头后页面标签头的数量,Wmax为页面标签头的最大宽度。
在本发明的一种优选实施例中,触控焦点移动的位置的横坐标为(M*Wnew-H/2),纵坐标为D/2;
其中,M为新增页面标签头后页面标签头的数量,Wnew为页面标签头的目标宽度,H为关闭标识的宽度,D为浏览器标签栏的高度。
在本发明的一种优选实施例中,所述第二绘制模块2206还可以适于:
在预置的存储对象中查找当前标签网页对应的页面标识;
查找该页面标识对应的页面标签头。
参照图23,示出了根据本发明一个实施例的一种浏览器实施例3的结构框图,具体可以包括如下模块:
关闭模块2301,适于通过触控焦点对当前页面标签头中关闭标识的触发,关闭所述当前页面标签头;
第一确定模块2302,适于依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
第一绘制模块2303,适于依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
第三绘制模块2304,适于在触控焦点触发当前标签页面的位置交换操作时,依据当前页面标签头的宽度重新绘制当前在浏览器标签栏中绘制的页面标签头。
在本发明的一种优选实施例中,所述第三绘制模块2304还可以适于:
确定当前标签页面对应的页面标签头;
分别当前页面标签头的宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的网页标识;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的网页标题;
和/或,
分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
在本发明的一种优选实施例中,所述第三绘制模块2304还可以适于:
在预置的存储对象中查找当前标签网页对应的页面标识;
查找该页面标识对应的页面标签头。
对于装置、浏览器实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的浏览器中页面标签头的绘制设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图24示出了可以实现根据本发明的浏览器中页面标签头的绘制的客户端装置,例如浏览器。该客户端装置传统上包括处理器2401和以存储器2402形式的计算机程序产品或者计算机可读介质。存储器2402可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器2402具有用于执行上述方法中的任何方法步骤的程序代码2404的存储空间2403。例如,用于程序代码的存储空间2403可以包括分别用于实现上面的方法中的各种步骤的各个程序代码2404。这些程序代码可以从一个或者多个计算机程序产品中 读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图25所述的便携式或者固定存储单元。该存储单元可以具有与图24的客户端装置中的存储器2402类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码2404’,即可以由例如诸如2401之类的处理器读取的代码,这些代码当由客户端装置运行时,导致该客户端装置执行上面所描述的方法中的各个步骤。
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。

Claims (38)

  1. 一种浏览器中页面标签头的绘制方法,包括步骤:
    通过触控焦点对当前页面标签头中关闭标识的触发,关闭所述当前页面标签头;
    依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
    依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
  2. 如权利要求1所述的方法,其特征在于,所述触控焦点对当前页面标签头中关闭标识的触发包括:
    触控焦点通过点击当前页面标签头中的关闭标识触发关闭标识;
    和/或,
    触控焦点通过将当前页面标签头移出浏览器标签栏触发当前页面标签中的关闭标识。
  3. 如权利要求1所述的方法,其特征在于,所述依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度的步骤包括:
    当被关闭的页面标签头为最后一个页面标签头时,通过公式S=N*Wnew确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
    当Wnew>Wmax时,Wnew取值Wmax;当Wnew<Wmin时,Wnew取值Wmin
    其中,S为浏览器标签栏的长度,N为所述当前页面标签头关闭后页面标签头的数量,Wnew为页面标签头的目标宽度,Wmin为页面标签头的最小宽度,Wmax为页面标签头的最大宽度。
  4. 如权利要求1所述的方法,其特征在于,所述依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度的步骤包括:
    当被关闭的页面标签头为非最后一个页面标签头时,确定当前页面标签 头的宽度最为中绘制的页面标签头的目标宽度。
  5. 如权利要求3或4所述的方法,其特征在于,所述依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点的步骤包括:
    确定当前标签页面对应的页面标签头;
    分别按照所述目标宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的网页标识;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的网页标题;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
  6. 如权利要求5所述的方法,其特征在于,所述依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点的步骤还包括:
    当满足条件S≥N*Wmax且被关闭的页面标签头为最后一个页面标签头时,将触控焦点移动到当前在浏览器标签栏中其中一个页面标签头的关闭标识的位置上;
    其中,S为浏览器标签栏的长度,N为所述当前页面标签头关闭后页面标签头的数量,Wmax为页面标签头的最大宽度。
  7. 如权利要求6所述的方法,其特征在于,触控焦点移动的位置的横坐标为(N*Wnew-H/2),纵坐标为D/2;
    其中,N为所述当前页面标签头关闭后页面标签头的数量,Wnew为页面标签头的目标宽度,H为关闭标识的宽度,D为浏览器标签栏的高度。
  8. 如权利要求5所述的方法,其特征在于,所述确定当前标签页面对应的页面标签头的步骤包括:
    在预置的存储对象中查找当前标签网页对应的页面标识;
    查找该页面标识对应的页面标签头。
  9. 如权利要求2所述的方法,其特征在于,还包括步骤:
    当触控焦点将当前页面标签头移出浏览器标签栏时,在所述触控焦点所在的位置生成所述页面标签头对应的标签网页的缩略图;
    当监测到触控焦点针对所述页面标签头的释放事件时,启动浏览器窗口:
    在所述浏览器窗口中加载所述页面标签头对应的标签网页。
  10. 如权利要求1所述的方法,其特征在于,还包括步骤:
    通过触控焦点对浏览器标签栏中新增标识的触发,新增当前页面标签头;
    依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
    依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
  11. 如权利要求10所述的方法,其特征在于,所述依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度的步骤包括:
    通过公式S=M*Wnew确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
    当Wnew>Wmax时,Wnew取值Wmax;当Wnew<Wmin时,Wnew取值Wmin
    其中,S为浏览器标签栏的长度,M为新增页面标签头后页面标签头的数量,Wnew为页面标签头的目标宽度,Wmin为页面标签头的最小宽度,Wmax为页面标签头的最大宽度。
  12. 如权利要求11所述的方法,其特征在于,所述依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点的步骤包括:
    确定当前标签页面对应的页面标签头;
    分别按照所述目标宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的网页标识;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的网页标题;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
  13. 如权利要求12所述的方法,其特征在于,所述依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点的步骤还包括:
    当满足条件S≥M*Wmax时,将触控焦点移动到当前在浏览器标签栏中其中一个页面标签头的关闭标识的位置上;
    其中,S为浏览器标签栏的长度,M为新增页面标签头后页面标签头的数量,Wmax为页面标签头的最大宽度。
  14. 如权利要求13所述的方法,其特征在于,触控焦点移动的位置的横坐标为(M*Wnew-H/2),纵坐标为D/2;
    其中,M为新增页面标签头后页面标签头的数量,Wnew为页面标签头的目标宽度,H为关闭标识的宽度,D为浏览器标签栏的高度。
  15. 如权利要求12所述的方法,其特征在于,所述确定当前标签页面对应的页面标签头的步骤包括:
    在预置的存储对象中查找当前标签网页对应的页面标识;
    查找该页面标识对应的页面标签头。
  16. 如权利要求1所述的方法,其特征在于,还包括:
    当触控焦点触发当前标签页面的位置交换操作时,依据当前页面标签头的宽度重新绘制当前在浏览器标签栏中绘制的页面标签头。
  17. 如权利要求16所述的方法,其特征在于,所述依据当前页面标签头的宽度重新绘制当前在浏览器标签栏中绘制的页面标签头的步骤包括:
    确定当前标签页面对应的页面标签头;
    分别当前页面标签头的宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的网页标识;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的网页标题;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
  18. 如权利要求17所述的方法,其特征在于,所述确定当前标签页面对应的页面标签头的步骤包括:
    在预置的存储对象中查找当前标签网页对应的页面标识;
    查找该页面标识对应的页面标签头。
  19. 一种浏览器中页面标签头的绘制装置,包括处理器,用于:
    通过触控焦点对当前页面标签头中关闭标识的触发,关闭所述当前页面标签头;
    依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;以及
    依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
  20. 如权利要求19所述的装置,其特征在于,所述触控焦点对当前页面标签头中关闭标识的触发包括:
    触控焦点通过点击当前页面标签头中的关闭标识触发关闭标识;
    和/或,
    触控焦点通过将当前页面标签头移出浏览器标签栏触发当前页面标签中的关闭标识。
  21. 如权利要求19所述的装置,其特征在于,所述处理器还用于:
    当被关闭的页面标签头为最后一个页面标签头时,通过公式S=N*Wnew确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
    当Wnew>Wmax时,Wnew取值Wmax;当Wnew<Wmin时,Wnew取值Wmin
    其中,S为浏览器标签栏的长度,N为所述当前页面标签头关闭后页面标签头的数量,Wnew为页面标签头的目标宽度,Wmin为页面标签头的最小宽度,Wmax为页面标签头的最大宽度。
  22. 如权利要求19所述的装置,其特征在于,所述处理器还用于:
    当被关闭的页面标签头为非最后一个页面标签头时,确定当前页面标签头的宽度最为中绘制的页面标签头的目标宽度。
  23. 如权利要求21或22所述的装置,其特征在于,所述处理器还用于:
    确定当前标签页面对应的页面标签头;
    分别按照所述目标宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的网页标识;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的网页标题;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
  24. 如权利要求23所述的方法,其特征在于,所述处理器还用于:
    当满足条件S≥N*Wmax且被关闭的页面标签头为最后一个页面标签头时,将触控焦点移动到当前在浏览器标签栏中其中一个页面标签头的关闭标识的位置上;
    其中,S为浏览器标签栏的长度,N为所述当前页面标签头关闭后页面标签头的数量,Wmax为页面标签头的最大宽度。
  25. 如权利要求24所述的装置,其特征在于,触控焦点移动的位置的横坐标为(N*Wnew-H/2),纵坐标为D/2;
    其中,N为所述当前页面标签头关闭后页面标签头的数量,Wnew为页面标签头的目标宽度,H为关闭标识的宽度,D为浏览器标签栏的高度。
  26. 如权利要求23所述的装置,其特征在于,所述处理器还用于:
    在预置的存储对象中查找当前标签网页对应的页面标识;
    查找该页面标识对应的页面标签头。
  27. 如权利要求20所述的装置,其特征在于,所述处理器还用于:
    在触控焦点将当前页面标签头移出浏览器标签栏时,在所述触控焦点所在的位置生成所述页面标签头对应的标签网页的缩略图;
    在监测到触控焦点针对所述页面标签头的释放事件时,启动浏览器窗口;以及,
    在所述浏览器窗口中加载所述页面标签头对应的标签网页。
  28. 如权利要求19所述的装置,其特征在于,所述处理器还用于:
    通过触控焦点对浏览器标签栏中新增标识的触发,新增当前页面标签头;
    依据当前的浏览器标签栏信息和其中绘制的页面标签头消息,确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
    依据所述目标宽度重新绘制当前在浏览器标签栏中绘制的页面标签头和/或所述触控焦点;其中所述重新绘制的当前浏览器标签栏中的一个页面标签头的关闭标识位置与所述触控焦点的位置相重合。
  29. 如权利要求28所述的装置,其特征在于,所述处理器还用于:
    通过公式S=M*Wnew确定所述浏览器标签栏中绘制的页面标签头的目标宽度;
    当Wnew>Wmax时,Wnew取值Wmax;当Wnew<Wmin时,Wnew取值Wmin
    其中,S为浏览器标签栏的长度,M为新增页面标签头后页面标签头的数量,Wnew为页面标签头的目标宽度,Wmin为页面标签头的最小宽度,Wmax为页面标签头的最大宽度。
  30. 如权利要求29所述的装置,其特征在于,所述处理器还用于:
    确定当前标签页面对应的页面标签头;
    分别按照所述目标宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的网页标识;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的网页标题;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
  31. 如权利要求30所述的装置,其特征在于,所述处理器还用于:
    当满足条件S≥M*Wmax时,将触控焦点移动到当前在浏览器标签栏中其中一个页面标签头的关闭标识的位置上;
    其中,S为浏览器标签栏的长度,M为新增页面标签头后页面标签头的数量,Wmax为页面标签头的最大宽度。
  32. 如权利要求31所述的装置,其特征在于,触控焦点移动的位置的横坐标为(M*Wnew-H/2),纵坐标为D/2;
    其中,M为新增页面标签头后页面标签头的数量,Wnew为页面标签头的目标宽度,H为关闭标识的宽度,D为浏览器标签栏的高度。
  33. 如权利要求30所述的装置,其特征在于,所述处理器还用于:
    在预置的存储对象中查找当前标签网页对应的页面标识;
    查找该页面标识对应的页面标签头。
  34. 如权利要求19所述的装置,其特征在于,所述处理器还用于:
    在触控焦点触发当前标签页面的位置交换操作时,依据当前页面标签头的宽度重新绘制当前在浏览器标签栏中绘制的页面标签头。
  35. 如权利要求34所述的装置,其特征在于,所述处理器还用于:
    确定当前标签页面对应的页面标签头;
    分别当前页面标签头的宽度在浏览器标签栏中对当前页面对应的页面标签头绘制第一背景,对其他页面标签头绘制第二背景;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的网页标识;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的网页标题;
    和/或,
    分别在浏览器标签栏中绘制页面标签头对应的关闭标识。
  36. 如权利要求34所述的装置,其特征在于,所述处理器还用于:
    在预置的存储对象中查找当前标签网页对应的页面标识;
    查找该页面标识对应的页面标签头。
  37. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在客户端装置上运行时,导致所述客户端装置执行根据权利要求1-18中的任一个所述的浏览器中页面标签头的绘制方法。
  38. 一种计算机可读介质,其中存储了如权利要求37所述的计算机程序。
PCT/CN2014/095658 2014-03-31 2014-12-30 一种浏览器中页面标签头的绘制方法及装置 WO2015149561A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410127062.9 2014-03-31
CN201410127062.9A CN103955476A (zh) 2014-03-31 2014-03-31 一种浏览器中页面标签头的绘制方法、装置和浏览器

Publications (1)

Publication Number Publication Date
WO2015149561A1 true WO2015149561A1 (zh) 2015-10-08

Family

ID=51332751

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/095658 WO2015149561A1 (zh) 2014-03-31 2014-12-30 一种浏览器中页面标签头的绘制方法及装置

Country Status (2)

Country Link
CN (1) CN103955476A (zh)
WO (1) WO2015149561A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955476A (zh) * 2014-03-31 2014-07-30 北京奇虎科技有限公司 一种浏览器中页面标签头的绘制方法、装置和浏览器
CN104346463B (zh) * 2014-11-07 2018-07-17 北京奇虎科技有限公司 一种页面标签的加载方法、装置和浏览器客户端
CN106611014B (zh) * 2015-10-27 2020-08-21 北京国双科技有限公司 网页查询条件顺序的调整方法及装置
CN106708495B (zh) * 2015-11-18 2021-05-07 优信拍(北京)信息科技有限公司 一种基于移动终端的页面显示方法及装置
CN106371946A (zh) * 2016-09-13 2017-02-01 乐视控股(北京)有限公司 浏览器异常恢复处理方法及装置
CN114675906B (zh) * 2022-05-25 2022-10-04 杭州脸脸会网络技术有限公司 多窗口管理方法、装置、电子装置和存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7587679B1 (en) * 2004-08-25 2009-09-08 Adobe Systems Incorporated System and method for displaying elements using a single tab
US8001482B2 (en) * 2007-12-21 2011-08-16 International Business Machines Corporation Method of displaying tab titles
CN102831155A (zh) * 2012-06-29 2012-12-19 北京奇虎科技有限公司 一种网页标签的缩微图显示方法和装置
CN102945265A (zh) * 2012-10-24 2013-02-27 北京奇虎科技有限公司 标签在浏览器中的呈现方法及装置
CN103577167A (zh) * 2012-07-26 2014-02-12 腾讯科技(深圳)有限公司 实现动画显示页面标签的方法和装置
US8762879B1 (en) * 2008-09-01 2014-06-24 Google Inc. Tab management in a browser
CN103955476A (zh) * 2014-03-31 2014-07-30 北京奇虎科技有限公司 一种浏览器中页面标签头的绘制方法、装置和浏览器

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020163545A1 (en) * 2001-05-01 2002-11-07 Hii Samuel S. Method of previewing web page content while interacting with multiple web page controls
US7596760B2 (en) * 2005-04-07 2009-09-29 Microsoft Corporation System and method for selecting a tab within a tabbed browser

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7587679B1 (en) * 2004-08-25 2009-09-08 Adobe Systems Incorporated System and method for displaying elements using a single tab
US8001482B2 (en) * 2007-12-21 2011-08-16 International Business Machines Corporation Method of displaying tab titles
US8762879B1 (en) * 2008-09-01 2014-06-24 Google Inc. Tab management in a browser
CN102831155A (zh) * 2012-06-29 2012-12-19 北京奇虎科技有限公司 一种网页标签的缩微图显示方法和装置
CN103577167A (zh) * 2012-07-26 2014-02-12 腾讯科技(深圳)有限公司 实现动画显示页面标签的方法和装置
CN102945265A (zh) * 2012-10-24 2013-02-27 北京奇虎科技有限公司 标签在浏览器中的呈现方法及装置
CN103955476A (zh) * 2014-03-31 2014-07-30 北京奇虎科技有限公司 一种浏览器中页面标签头的绘制方法、装置和浏览器

Also Published As

Publication number Publication date
CN103955476A (zh) 2014-07-30

Similar Documents

Publication Publication Date Title
WO2015149561A1 (zh) 一种浏览器中页面标签头的绘制方法及装置
WO2015196954A1 (zh) 网页元素的显示方法以及浏览器装置
CN103930885B (zh) 测量网页渲染时间
US9756140B2 (en) Tracking user behavior relative to a network page
CN104933142B (zh) 动画展示方法和装置
WO2016101755A1 (zh) 基于拖拽操作跨页面调整对象位置的方法和装置
WO2015039586A1 (zh) 一种进行网页加载的方法、装置和浏览器
US20180039907A1 (en) Document structure extraction using machine learning
US20120192063A1 (en) On-the-fly transformation of graphical representation of content
CN104317474A (zh) 窗口切换方法及装置
WO2016101754A1 (zh) web页面的切换方法和装置及综合页面提供装置
JP2011159284A (ja) ウェブサイトフォントのプレビュー
JP6975339B2 (ja) デジタルコンポーネントのバックドロップレンダリング
US20150227276A1 (en) Method and system for providing an interactive user guide on a webpage
KR20160044486A (ko) 고정 포맷 문서를 리플로우 포맷으로 프리젠트하는 기법
US20150205454A1 (en) Systems and methods for displaying preview data
WO2014108040A1 (zh) 在电子设备上呈现内容的方法和装置
US11061541B2 (en) Apparatus, method, and computer-readable recording medium for compactedly displaying popup content
TW201624253A (zh) 在一圖形使用者介面上顯示關於一子層級新分頁之父層級分頁的網頁資訊的方法、電腦程式產品與電腦系統
WO2017000613A1 (zh) 在搜索结果页中生成提示信息的方法及装置
US20150301993A1 (en) User interface for creation of content works
WO2015149560A1 (zh) 已关闭的网页标签和/或浏览器窗口的显示方法和装置
JP6053717B2 (ja) マークアップ言語で記述されたページのカラーシームを抽出する方法、上記カラーシームを抽出するための電子装置、及び、その電子装置用プログラム
TWI609274B (zh) 用以導引經編頁項目結果之系統及方法,以及機器可讀媒體
US20150058710A1 (en) Navigating fixed format document in e-reader application

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14888474

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase
122 Ep: pct application non-entry in european phase

Ref document number: 14888474

Country of ref document: EP

Kind code of ref document: A1