CN103345497B - Method and device for resizing webpages on electronic equipment - Google Patents

Method and device for resizing webpages on electronic equipment Download PDF

Info

Publication number
CN103345497B
CN103345497B CN201310268150.6A CN201310268150A CN103345497B CN 103345497 B CN103345497 B CN 103345497B CN 201310268150 A CN201310268150 A CN 201310268150A CN 103345497 B CN103345497 B CN 103345497B
Authority
CN
China
Prior art keywords
scaling
word
webpage
displaying control
web displaying
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.)
Active
Application number
CN201310268150.6A
Other languages
Chinese (zh)
Other versions
CN103345497A (en
Inventor
张炅轩
范国峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Hongxiang Technical Service Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201310268150.6A priority Critical patent/CN103345497B/en
Publication of CN103345497A publication Critical patent/CN103345497A/en
Priority to PCT/CN2014/074455 priority patent/WO2014206125A1/en
Priority to US14/901,512 priority patent/US10061494B2/en
Priority to PCT/CN2014/074454 priority patent/WO2014206124A1/en
Application granted granted Critical
Publication of CN103345497B publication Critical patent/CN103345497B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method and device for resizing webpages on electronic equipment. The method comprises the following steps of inheriting a webpage display control to establish a custom-made touch event method, judging whether the touch event method is triggered by the operation on the electronic equipment that the n-1 of the n touch points are loosened, wherein the n is an integer larger than or equal to 2, setting the scaling of webpage texts as display scaling of the webpage display control if a judging result is yes, reflecting the setting from objects of a scaling manager and starting using a scaling method to carry out calls, and executing the touch event method of the inherited webpage display control. According to the embodiment of the method and device for resizing the webpages on the electronic equipment, under the premise of not modifying a browser or the kernel components of other page display programs, the functions of recomposing the page after page resizing and enabling contents to be tiled on a whole screen are achieved.

Description

The method and apparatus of webpage scaling in a kind of electronic equipment
Technical field
The present invention relates to web displaying technology, more particularly to the method and apparatus that webpage is scaled in a kind of electronic equipment.
Background technology
With the intelligentized continuous development of electronic equipment, increasing user is browsed using the browser on electronic equipment Webpage or other contents, and in the operation for browsing webpage, content is zoomed in or out(Hereinafter referred to as " scale ")Use Scene is more universal.
In a kind of scheme of prior art, the display control carried using electronic device system, with Android systems As a example by system, the zoom function of its WebView control for carrying is opened, you can realize scaling.Fig. 1 schematically shows electronics and sets The view of a standby shown entire Web page page, using this prior art, user can be by amplifying in the page A certain region to be more clearly visible that the particular content in this region, be embodied in:The units such as picture, word in the region Element all can equal proportion amplification.However, some region of after amplification shown on electronic equipment as schematically shown is regarded Shown in Fig. 2 of figure, the content outside the region, especially before also in the region, later because in amplification removes the region Hold, can be because showing beyond screen ranges.In contrast, by reduction operation, the overall picture of webpage can be more clearly visible that, It is embodied in:The elements such as picture, word in region meeting scaled down, because of diminution, vacant region out can then be filled Completely content was not shown before upper, but at the same time also results in word becomes less, readable poor.
In the scheme of another kind of prior art, by changing browser kernel component(Such as the WebKit of android system Component), then it is bundled in its application program installation kit to realize zoom function.This prior art can be accomplished When designated area is amplified, the word content in the region is carried out typesetting again, and its " tiling " is shown to electronics setting It is standby upper, reaching the similar effect for reading novel, it is to avoid because amplification cannot display portion content problem.However, this It is larger compared with slow, application program installation kit that prior art has scaling speed(Depositing for many occupancy 5MB to 6MB is needed generally Storage space), the defects such as the new features that bring of operating system of redaction cannot be utilized, meanwhile, modification browser kernel component is deposited In certain risk, exploitation and the difficulty being adapted to are increased, it is possible to cause browser collapse and be difficult to find concrete reason.
The content of the invention
In view of the above problems, it is proposed that the present invention, overcome the problems referred to above or solve at least in part to provide one kind The method and apparatus of the webpage zoom on electronic equipment of the problems referred to above.
According to one aspect of the present invention, there is provided the method for webpage scaling in a kind of electronic equipment, comprise the following steps: Web displaying control is inherited, to build customization touch event method;Judge whether the operation to electronic equipment is to unclamp n touch N-1 touch point in point and trigger touch event method, wherein n is the integer more than or equal to 2;In judged result for yes In the case of, webpage word scaling is set to into the display scaling of web displaying control;From scaling manager object Reflection arranges and enables scaling method to be called;And perform the touch event side of heritable web displaying control Method.
Alternatively, it is in the method for webpage zoom on electronic equipment according to an embodiment of the invention, described by webpage text The step of word scaling is set to the display scaling of web displaying control includes:In the operating system of electronic equipment it is In the case of Android2.3.x or more older version, word scaling object is reflected from the web displaying control, and The word scaling object is given by the value of the display scaling of web displaying control;Or in the operation of electronic equipment In the case that system is Android4.0 or more redaction, word scaling pair is reflected from the scaling manager object As, and the word scaling object is given by the value of the display scaling of web displaying control.
Alternatively, in the method for webpage zoom on electronic equipment according to an embodiment of the invention, judge right described During whether the operation of electronic equipment is the step of touch event method is triggered in the n-1 touch point unclamped in n touch point, profit Determine whether to unclamp in n touch point with ACTION_POINTER_UP objects or ACTION_POINTER_n_UP objects N-1 touch point and trigger touch event method.
Alternatively, the method for webpage zoom on electronic equipment also includes step according to an embodiment of the invention:Described Before the step of webpage word scaling is set to the display scaling of web displaying control, the behaviour of electronic equipment is judged Make whether system is supported to scale handler object, in the case where not supporting, perform described by the setting of webpage word scaling For web displaying control display scaling the step of and it is described from scaling manager object in reflection arrange and enable contracting The step of ratio method is put to be called and perform the touch event method of heritable web displaying control;What is supported In the case of, the step of perform the touch event method of the heritable web displaying control.
Alternatively, the method for webpage zoom on electronic equipment also includes step according to an embodiment of the invention:Described Before the step of webpage word scaling is set to the display scaling of web displaying control, whether widescreen will be enabled clear The value of object of looking at is set to false;And the reflection in the manager object from scaling is arranged and enables scaling method After the step of to be called, whether enabled widescreen and browsed the value of object and be set to true.
Alternatively, in the method for webpage zoom on electronic equipment according to an embodiment of the invention, described from scaling In the step of reflection is arranged and enables scaling method to be called in manager object, the parameter transmitted when calling includes It is arranged to the webpage word scaling of the display scaling of web displaying control, allows text composition and allow strong Text composition processed.
Alternatively, in the method for webpage zoom on electronic equipment according to an embodiment of the invention, the web displaying Control is the WebView controls of android system, and the scaling manager object is mZoomManager objects, the scaling Handler object is mListener objects, and the word scaling is to liking mTextWrapScale objects, the touch thing Part method includes onTouchEvent methods and dispatchTouchEvent methods, and the setting simultaneously enables scaling side Method is setZoomScale methods or setNewZoomScale methods, it is described whether enable widescreen browse to as if SetUseWideViewPort objects.
According to another aspect of the present invention, there is provided the device of webpage scaling in a kind of electronic equipment, including:Customization is touched Event methods build module, are suitable to inherit web displaying control, to build customization touch event method;Touch point judge module, It is suitable to judge whether the operation to electronic equipment is to unclamp n-1 touch point in n touch point to trigger touch event method, Wherein n is the integer more than or equal to 2;Webpage word scaling setup module, is suitable in judged result as in the case of being, Webpage word scaling is set to into the display scaling of web displaying control;Scaling calling module, is suitable to from contracting Reflection in putting manager object arranges and enables scaling method to be called;And touch event method performing module, It is adapted for carrying out the touch event method of heritable web displaying control.
Alternatively, in the device of webpage zoom on electronic equipment according to an embodiment of the invention, in electronic equipment In the case that operating system is Android2.3.x or more older version, the webpage word scaling setup module is suitable to from institute Word scaling object is reflected in stating web displaying control, and the value of the display scaling of web displaying control is given The word scaling object;Or in the case where the operating system of electronic equipment is Android4.0 or more redaction, The webpage word scaling setup module is suitable to reflect word scaling object from the scaling manager object, and And the word scaling object is given by the value of the display scaling of web displaying control.
Alternatively, in the device of webpage zoom on electronic equipment according to an embodiment of the invention, the touch point is sentenced Disconnected module is suitable to determine whether to unclamp n using ACTION_POINTER_UP objects or ACTION_POINTER_n_UP objects N-1 touch point in individual touch point and trigger touch event method.
Alternatively, the device of webpage zoom on electronic equipment also includes according to an embodiment of the invention:Scaling processor Judge module is supported, is suitable to webpage word scaling is set to webpage in the webpage word scaling setup module show Before showing the display scaling of control, judge whether the operating system of electronic equipment is supported to scale handler object, do not propping up In the case of holding, webpage word scaling is set to web displaying control by the webpage word scaling setup module Scaling is shown, scaling calling module is arranged and enables scaling method to enter from reflection in scaling manager object Row is called, and touch event method performing module performs the touch event method of heritable web displaying control;Supporting In the case of, touch event method performing module performs the touch event method of the heritable web displaying control.
Alternatively, the device of webpage zoom on electronic equipment also includes according to an embodiment of the invention:Enable widescreen clear Look at object setup module, be suitable to webpage word scaling is set to webpage in the webpage word scaling setup module Before showing the display scaling of control, whether enabled widescreen and browsed the value of object and be set to false, and be suitable in institute Scaling calling module is stated from after reflection is arranged and scaling method enabled to be called in scaling manager object, Whether enabled widescreen and browsed the value of object and be set to true.
Alternatively, in the device of webpage zoom on electronic equipment according to an embodiment of the invention, in the pantograph ratio Example calling module is reflected when arranging and enabling scaling method to be called from scaling manager object, is transmitted when calling Parameter include being arranged to web displaying control display scaling webpage word scaling, allow text composition, And allow to force text composition.
Alternatively, in the device of webpage zoom on electronic equipment according to an embodiment of the invention, the web displaying Control is the WebView controls of android system, and the scaling manager object is mZoomManager objects, the scaling Handler object is mListener objects, and the word scaling is to liking mTextWrapScale objects, the touch thing Part method includes onTouchEvent methods and dispatchTouchEvent methods, and the setting simultaneously enables scaling side Method is setZoomScale methods or setNewZoomScale methods, it is described whether enable widescreen browse to as if SetUseWideViewPort objects.
The invention provides the method and apparatus that webpage is scaled in a kind of electronic equipment.Embodiments in accordance with the present invention, after Web displaying control is held, to build customization touch event method, is judging that touch operation is to unclamp n-1 in n touch point Touch point and in the case of triggering touch event method, webpage word scaling is set to into the display contracting of web displaying control Ratio is put, and is arranged and scaling method is enabled to be called from reflection in scaling manager object, so as to not repair Change browser or other pages show the kernel component of program(Such as the WebKit components of android system)On the premise of, realize After page zoom-in and zoom-out again typesetting, make content tile to the function of whole screen, solving cannot display portion content because of amplification Problem.And, embodiments of the invention are not supported to scale the electronic equipment of handler object for operating system, equally can The function of typesetting again is realized after above-mentioned scaling, is so achieved that for the support of nearly all electronic equipment.Meanwhile, according to Embodiments of the invention, the new features that the operating system of redaction can be made full use of to bring, such as using Android4.0 and The function of hardware acceleration of more redaction, can significantly improve scaling speed, can also utilize Android4.0 and more redaction The new features such as senior web page browsing feature.Further, since the core group of browser or other pages display programs need not be changed Part, saves the memory space of electronic equipment, while it also avoid changing the risk that browser kernel component brings.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And can be practiced according to the content of description, and in order to allow the above and other objects of the present invention, feature and advantage can Become apparent, below especially exemplified by the specific embodiment of the present invention.
Description of the drawings
By the detailed description for reading hereafter preferred implementation, various other advantages and benefit are common for this area Technical staff will be clear from understanding.Accompanying drawing is only used for the purpose for illustrating preferred implementation, and is not considered as to the present invention Restriction.And in whole accompanying drawing, it is denoted by the same reference numerals identical part.In the accompanying drawings:
Fig. 1 schematically shows the view of an entire Web page page shown on electronic equipment;
Fig. 2 schematically shows some region of view after amplification shown on electronic equipment;
Fig. 3 schematically shows the flow process of the method for webpage zoom on electronic equipment according to an embodiment of the invention Figure;
Fig. 4 schematically illustrates webpage contracting on the electronic equipment comprising each optional step according to an embodiment of the invention The flow chart of the method put;
Fig. 5 schematically shows the block diagram of the device of webpage zoom on electronic equipment according to an embodiment of the invention; And
Fig. 6 schematically illustrates webpage contracting on the electronic equipment comprising each optional module according to an embodiment of the invention The block diagram of the device put.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should not be by embodiments set forth here Limited.On the contrary, there is provided these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure Complete conveys to those skilled in the art.
Fig. 3 schematically illustrates the stream of the method 300 of webpage zoom on electronic equipment according to an embodiment of the invention Cheng Tu.
The principle of the present invention is applied to any electronic equipment comprising display unit, including but not limited to:It is based on The computer of the desktop operating systems such as Windows, Linux, Mac OS, Unix;Based on iOS, Android, Windows The mobile phone of the Mobile operating systems such as Phone, Symbian, panel computer, video player, electronic reader, DPF Etc..Hereinafter, by by taking the electronic equipment based on android system as an example, the principle of the present invention is exemplarily retouched State.However, this is intended merely to the specific example description present invention, it is to help reader to understand the principle of the present invention, of the invention Scope not limited to this, but go for any comprising display unit, the electronic equipment based on any operating system.
In the following description, " scale " and refer both to " zooming in or out ".
Embodiments in accordance with the present invention, web page contents not only can include word content, it is also possible to including picture, video etc. Other contents.
As shown in figure 3, the method 300 of webpage zoom on electronic equipment starts from step according to an embodiment of the invention S301, in step S301, inherits web displaying control, to build customization touch event method.
Embodiments in accordance with the present invention, the web displaying control can for example be the WebView controls of android system Part, the scope of the present invention not limited to this, web displaying control can be any controls that can realize web displaying function, for example UIWebView controls of iOS system etc..
Embodiments in accordance with the present invention, touch event method can for example be the onTouchEvent sides of android system Method and/or dispatchTouchEvent methods, any touch operation of the user to a certain control, android system can all be touched Touch place director's part of the control, onTouchEvent methods and dispatchTouchEvent methods one parameter of band are sent out, is used To describe the situation of user's current touch, it is MotionEvent objects in android system, which is used for describing such as user The quantity of current touch point, corresponding coordinate and the state for touching, such as " when mobile ", " when pressing ", " during release " etc..
Embodiments in accordance with the present invention, in above-mentioned steps S301, can generate an object, allow which to inherit web displaying Control, to build the customization touch event method of their own, such as onTouchEvent methods and dispatchTouchEvent Method.
After step S301, execution step S303, wherein, judge whether the operation to electronic equipment is to unclamp n to touch N-1 touch point in touching a little and trigger touch event method, wherein n is the integer more than or equal to 2.
In case of n=2, i.e. assume Touch screen of the user with two fingers touch electronic equipments, wherein one When root finger unclamps, touch place reason event methods will be triggered.
Embodiments in accordance with the present invention, in step S303, for android system, it is possible to use ACTION_ POINTER_UP objects or ACTION_POINTER_n_UP objects determine whether to unclamp n-1 touch in n touch point Put and trigger touch event method.
Next, execution step S305, wherein, in the case of being to be in the judged result in step S303, by webpage text Word scaling is set to the display scaling of web displaying control.
Embodiments in accordance with the present invention, in step S305, electronic equipment operating system be Android2.3.x or In the case of more older version, word scaling object is reflected from the web displaying control, and by web displaying control The value of display scaling give the word scaling object.
Embodiments in accordance with the present invention, for reflective operation, can adopt the reflection of the offers such as Java language .Net language Method or object are temporarily become publicly-owned attribute from privately owned attribute, for directly using and changing being operated by mechanism.Ability Field technique personnel it is understood that can equally adopt other programming languages, in a similar manner by method or object from Privately owned attribute temporarily becomes publicly-owned attribute, to reach the purpose of reflective operation.
In addition, for android system, can be obtained by obtaining Build.VERSION.SDK_INT objects The version number of android system.
Embodiments in accordance with the present invention, in android system, the word scaling is to liking MTextWrapScale objects.The word scaling object is given by the value of the display scaling of web displaying control, That is, make word scaling object word scaling value be equal to web displaying control display scaling value.Its In, word scaling refers to " web width "/" textwidth ", shows that scaling refers to " web width "/" screen width Degree ".When the value of word scaling is equal to shows the value of scaling, textwidth is equal to web width, and the text is just Can be displayed in full screen.For example, if word scaling is 2, and the display scaling of WebView controls is 1, is represented The ratio of screen shared by word is 1/2;And if the displaying ratio of WebView controls and word scaling are 1, then it represents that Screen proportion shared by word is 1/1, namely full screen display.Even if in addition, user is slided by touch operation in use Word segment is removed screen by screen(The rightmost side is slided into for example, until word all removes screen), due to word pantograph ratio Example is not changed in, therefore when word is slided by user by touch operation, once the left frame of word and electronic equipment screen When the left frame of curtain aligns, then word must be paved with full frame.
In step S305, in the case where the operating system of electronic equipment is Android4.0 or more redaction, from institute Word scaling object is reflected in stating scaling manager object, and the value of the display scaling of web displaying control is assigned Give the word scaling object.Wherein, for android system, the scaling manager object can be MZoomManager objects, the object directly or indirectly can be called by WebView controls, thus can be by zoom operations From script just very complicated WebView controls detach out, become more independent module, and by WebView controls(Even Other controls)It is used.Wherein, in Android2.3.x or more older version, this java class is exactly WebView control classes, That is WebView classes;And in Android3.0 and later version, directly use for WebView controls one of the object The object of java class, the i.e. object of ZoomManager classes.
After step S305, can with execution step S307, wherein, from scaling manager object in reflection arrange and enable Scaling method is to be called, and execution step S309, wherein performing the touch thing of heritable web displaying control Part method.In addition, in the case that the judged result in step S303 is no, can directly perform above-mentioned steps S309, that is, hold The touch event method of the heritable web displaying control of row.
Embodiments in accordance with the present invention, for android system, the setting simultaneously enables scaling method and can be SetZoomScale methods or setNewZoomScale methods, and the parameter transmitted when calling in step S307 can include: It is arranged to the webpage word scaling of the display scaling of web displaying control, allows text composition(It is set to true), and allow force text composition(It is set to true).
Have invoked in step S307 after arranging and enabling scaling method, it is possible to execution step S109, i.e. hold The touch event method of the heritable web displaying control of row, i.e., original touch event method, for android system, The onTouchEvent methods and dispatchTouchEvent methods of its parent are called exactly.This way it is possible to realize page Reduction of area put after again typesetting, make content tile to the function of whole screen.
Fig. 4 schematically illustrates webpage contracting on the electronic equipment comprising each optional step according to an embodiment of the invention The flow chart of the method put.Each optional step in method 100 is described below in conjunction with Fig. 4.
As shown in figure 4, alternatively, embodiments in accordance with the present invention, the method 300 of the webpage zoom on electronic equipment is also Step S304 can be included:Before step S305, judge whether the operating system of electronic equipment is supported to scale handler object.
For android system, the scaling handler object can be mListener objects, this pair as if be directed to A certain control zooms in and out the module called during operation, the mListener of android system to as if scaling processor class- The object of OnScaleGestureListener classes, which includes scaling start method, scaling process approach and the scaling side of completing Method, for mListener objects, they are respectively onScaleBegin methods, onScale methods and onScaleEnd side Method.By taking the scene that user is zoomed in and out using two fingers in the Touch screen of electronic equipment as an example, when user prepares double finger During scaling, namely when user puts down double fingers and starts to drag, call the scaling start method of scaling handler object;In user During scaling, the scaling process approach of scaling handler object is called;Double fingers are unclamped in user, when indication scaling is completed, Call the scaling Method Of Accomplishment of scaling handler object.Each supports that the control of scaling can be realized at one's own scaling Reason device object, WebView controls are one.
As shown in figure 4, in step s 304, in the case where being judged as not supporting, above-mentioned steps S305, step can be performed Rapid S307 and step S309, will webpage word scaling be set to the display scaling of web displaying control, and Arrange and scaling method is enabled to be called from reflection in scaling manager object, and perform heritable webpage show Show the touch event method of control.
And in the case where being judged as supporting, as shown in figure 4, can be directly in execution step S309 execution it is described by after The step of touch event method of the web displaying control for holding.
As shown in figure 4, alternatively, embodiments in accordance with the present invention, the method 300 of the webpage zoom on electronic equipment is also Step S304 can be included ':Before step S305, whether enabled widescreen and browsed the value of object and be set to false.For Android system, the widescreen that whether enables are browsed to liking setUseWideViewPort objects, and its value is present in WebView control setup modules(WebSettings objects in android system)In, by step S304 ' in operation, The user after displaying ratio is amplified can be avoided to move webpage by the screen of touch electronic equipment.
As shown in figure 4, alternatively, embodiments in accordance with the present invention, the method 300 of the webpage zoom on electronic equipment is also Step S308 can be included:In step S307 from scaling manager object in reflection arranging and enable scaling method with After the step of being called, whether enabled widescreen and browsed the value of object and be set to true.By the operation of step S308, can To recover the function of webpage is moved by touch operation after word again typesetting.
As shown in figure 4, further optionally, the method 300 of the webpage zoom on electronic equipment above-mentioned steps S303 it Before, the step of whether quantity for judging current touch point is more than 1 S302-1 can also be included and judge whether webpage supports contracting The step of playing function S302-2, in the two steps, if the judged result of any of which step is no, just do not do further Process, the step of the touch event method of the execution heritable web displaying control in direct execution step S309.
Alternatively, judge that the step of whether webpage supports zoom function S302-2 can be realized in the following way:Can be with Obtain WebView control setup modules(WebSettings objects in android system)In " whether support scaling " become Amount, the variable are Boolean, if true, then it represents that support, if false, then it represents that do not support zoom function, terminate this and sentence Disconnected step;" the minimum zoom ratio of current web page " object and " the maximum contracting of current web page are reflected from scaling manager object Put ratio " object with complete obtain operation, they in android system be respectively mMinZoomScale objects and MMaxZoomScale objects.Under normal circumstances, in the source code of webpage(It is invisible to user)In, some is understood for accusing Know the scaling scope of the webpage, the value is underground under normal circumstances, therefore need to obtain by reflecting;It is then possible to compare It is whether equal with the value of " the maximum zoom ratio of current web page " object compared with the value of " the minimum zoom ratio of current web page " object, If equal, false is directly returned, represent that the webpage does not support zoom function, if unequal, return true, represent " whether The value of support zoom function " variable is true, webpage support zoom function.
The invention provides the method that webpage is scaled in a kind of electronic equipment.Embodiments in accordance with the present invention, inherit webpage Control is shown, to build customization touch event method, is judging that touch operation is to unclamp n-1 touch point in n touch point And in the case of triggering touch event method, webpage word scaling is set to into the display pantograph ratio of web displaying control Example, and arrange and enable scaling method to be called from reflection in scaling manager object, so as to not change clear Look at device or other pages show the kernel component of programs(Such as the WebKit components of android system)On the premise of, realize the page After scaling again typesetting, make the content tile to the function of whole screen, solve because amplification cannot display portion content ask Topic.And, embodiments of the invention are not supported to scale the electronic equipment of handler object for operating system, can equally realize Again the function of typesetting after above-mentioned scaling, is so achieved that for the support of nearly all electronic equipment.Meanwhile, according to this Bright embodiment, the new features that the operating system of redaction can be made full use of to bring, such as using Android4.0 and renewal The function of hardware acceleration of version, can significantly improve scaling speed, can also utilize the senior of Android4.0 and more redaction The new features such as web page browsing feature.Further, since the kernel component of browser or other pages display programs, section need not be changed The memory space of the sub- equipment of power saving, while it also avoid changing the risk that browser kernel component brings.
It is corresponding with above-mentioned method 300, present invention also offers the device 500 that webpage is scaled in a kind of electronic equipment. Fig. 5 schematically illustrates the block diagram of the device 500 of webpage zoom on electronic equipment according to an embodiment of the invention.
Referring to Fig. 5, the device 500 of the webpage zoom on electronic equipment is main to include that customization touch event method builds mould Block 501, touch point judge module 503, webpage word scaling setup module 505, scaling calling module 507, and Touch event method performing module 509.
Embodiments in accordance with the present invention, customization touch event method build module 501 and are suitable to inherit web displaying control, with Build customization touch event method;Touch point judge module 503 is suitable to judge whether the operation to electronic equipment is to unclamp n to touch N-1 touch point in touching a little and trigger touch event method, wherein n is the integer more than or equal to 2;Webpage word pantograph ratio Example setup module 505 is suitable in judged result, in the case of being, webpage word scaling to be set to web displaying control Display scaling;Scaling calling module 507 is suitable to from reflection in scaling manager object arrange and enable pantograph ratio Example method is being called;Touch event method performing module 509 is adapted for carrying out the touch thing of heritable web displaying control Part method.
Embodiments in accordance with the present invention, first, customization touch event method builds module 501 and inherits web displaying control, To build customization touch event method.
Embodiments in accordance with the present invention, the web displaying control can for example be the WebView controls of android system Part, the scope of the present invention not limited to this, web displaying control can be any controls that can realize web displaying function, for example UIWebView controls of iOS system etc..
Embodiments in accordance with the present invention, touch event method can for example be the onTouchEvent sides of android system Method and/or dispatchTouchEvent methods, any touch operation of the user to a certain control, android system can all be touched Touch place director's part of the control, onTouchEvent methods and dispatchTouchEvent methods one parameter of band are sent out, is used To describe the situation of user's current touch, it is MotionEvent objects in android system, which is used for describing such as user The quantity of current touch point, corresponding coordinate and the state for touching, such as " when mobile ", " when pressing ", " during release " etc..
Embodiments in accordance with the present invention, customization touch event method build module 501 and can generate an object, allow its after Hold web displaying control, to build the customization touch event method of their own, for example onTouchEvent methods and DispatchTouchEvent methods.
Subsequently, touch point judge module 503 judges whether the operation to electronic equipment is to unclamp the n-1 in n touch point Individual touch point and trigger touch event method, wherein n is the integer more than or equal to 2.
In case of n=2, i.e. assume Touch screen of the user with two fingers touch electronic equipments, wherein one When root finger unclamps, touch place reason event methods will be triggered.
Embodiments in accordance with the present invention, for android system, touch point judge module 503 can utilize ACTION_ POINTER_UP objects or ACTION_POINTER_n_UP objects determine whether to unclamp n-1 touch in n touch point Put and trigger touch event method.
Next, in the case where touch point judge module 503 is judged as YES, webpage word scaling setup module The 505 display scalings that webpage word scaling is set to web displaying control.
Embodiments in accordance with the present invention, in the situation that the operating system of electronic equipment is Android2.3.x or more older version Under, webpage word scaling setup module 505 reflects word scaling object from the web displaying control, and will The value of the display scaling of web displaying control gives the word scaling object.
Embodiments in accordance with the present invention, for reflective operation, webpage word scaling setup module 505 can be adopted Method or object are temporarily become public affairs from privately owned attribute being operated by the reflex mechanism of the offers such as Java language .Net language There is attribute, for directly using and changing.It will be appreciated by those skilled in the art that webpage word scaling setup module 505 Other programming languages can be equally adopted, in a similar manner method or object is temporarily become from privately owned attribute publicly-owned Attribute, to reach the purpose of reflective operation.
In addition, for android system, webpage word scaling setup module 505 can be by obtaining Build.VERSION.SDK_INT objects are obtaining the version number of android system.
Embodiments in accordance with the present invention, in android system, the word scaling is to liking MTextWrapScale objects.Webpage word scaling setup module 505 is by the display scaling of web displaying control Value gives the word scaling object, i.e. make the value of the word scaling of word scaling object aobvious equal to webpage Show the value of the display scaling of control.Wherein, word scaling refers to " web width "/" textwidth ", shows scaling Ratio refers to " web width "/" screen width ".When the value of word scaling is equal to shows the value of scaling, text width Degree is equal to web width, and the text just can be displayed in full screen.For example, if word scaling is 2, and WebView The display scaling of control is 1, represents that the ratio of screen shared by word is 1/2;And if the displaying ratio of WebView controls 1 is with word scaling, then it represents that screen proportion shared by word is 1/1, namely full screen display.Even if in addition, user exists Word segment is removed by screen by touch operation slip screen during use(For example slide into the rightmost side, until word it is complete Portion removes screen), as word scaling is not changed in, therefore when word is slided by user by touch operation, one When the left frame of denier word is alignd with the left frame of electronic equipment screen, then word must be paved with full frame.
In the case where the operating system of electronic equipment is Android4.0 or more redaction, webpage word scaling sets Put module 505 word scaling object is reflected from the scaling manager object, and by the display of web displaying control The value of scaling gives the word scaling object.Wherein, for android system, the scaling manager object Can be mZoomManager objects, the object directly or indirectly can be called by WebView controls, thus will can be contracted Put operation to detach out from script just very complicated WebView controls, become more independent module, and controlled by WebView Part(Or even other controls)It is used.Wherein, in Android2.3.x or more older version, this java class is exactly WebView Control class, i.e. WebView classes;And in Android3.0 and later version, the object is directly used for WebView controls The object of one java class, the i.e. object of ZoomManager classes.
Afterwards, scaling calling module 507 is arranged and enables scaling method from reflection in scaling manager object To be called, and touch event method performing module 509 performs the touch event method of heritable web displaying control. In addition, in the case where the judged result of touch point judge module 503 is no, touch event method performing module 509 can be straight Connect the touch event method for performing heritable web displaying control.
Embodiments in accordance with the present invention, for android system, the setting simultaneously enables scaling method and can be SetZoomScale methods or setNewZoomScale methods, and transmit when scaling calling module 507 is performed and called Parameter can include:It is arranged to the webpage word scaling of the display scaling of web displaying control, allows word to arrange Version(It is set to true), and allow force text composition(It is set to true).
After scaling calling module 507 have invoked and arrange and enable scaling method, touch event method is held Row module 509 can just perform the touch event method of heritable web displaying control, i.e., original touch event method is right In android system, that is, the onTouchEvent methods and dispatchTouchEvent methods for calling its parent.This Sample, it is possible to after realizing page zoom-in and zoom-out again typesetting, make content tile to the function of whole screen.
Fig. 6 schematically illustrates webpage contracting on the electronic equipment comprising each optional module according to an embodiment of the invention The block diagram of the device put.Below in conjunction with Fig. 6 and figure 4 above for each optional module of device 200 is described.
As shown in fig. 6, alternatively, embodiments in accordance with the present invention, the device 600 of the webpage zoom on electronic equipment is also Can include that scaling processor supports judge module 604, be suitable to webpage in the webpage word scaling setup module 605 Before word scaling is set to the display scaling of web displaying control, judge whether the operating system of electronic equipment props up Hold scaling handler object.
For android system, the scaling handler object can be mListener objects, this pair as if be directed to A certain control zooms in and out the module called during operation, the mListener of android system to as if scaling processor class- The object of OnScaleGestureListener classes, which includes scaling start method, scaling process approach and the scaling side of completing Method, for mListener objects, they are respectively onScaleBegin methods, onScale methods and onScaleEnd side Method.By taking the scene that user is zoomed in and out using two fingers in the Touch screen of electronic equipment as an example, when user prepares double finger During scaling, namely when user puts down double fingers and starts to drag, call the scaling start method of scaling handler object;In user During scaling, the scaling process approach of scaling handler object is called;Double fingers are unclamped in user, when indication scaling is completed, Call the scaling Method Of Accomplishment of scaling handler object.Each supports that the control of scaling can be realized at one's own scaling Reason device object, WebView controls are one.
In the case where scaling processor supports that judge module is judged as not supporting, webpage word scaling setup module The 605 display scalings that webpage word scaling can be set to web displaying control, and scaling calls mould Block 607 can be arranged and enable scaling method to be called from reflection in scaling manager object, and touch event Method performing module 609 performs the touch event method of heritable web displaying control.
And in the case where scaling processor supports that judge module is judged as supporting, touch event method performing module 609 The touch event method of the heritable web displaying control can directly be performed.
As shown in fig. 6, alternatively, embodiments in accordance with the present invention, the device 600 of the webpage zoom on electronic equipment is also Can include that enabling widescreen browses object setup module 604 ', being suitable to will in the webpage word scaling setup module 605 Before webpage word scaling is set to the display scaling of web displaying control, whether is enabled widescreen and browsed object Value is set to false.For android system, the widescreen that whether enables is browsed to liking setUseWideViewPort pair As its value is present in WebView control setup modules(WebSettings objects in android system)In, by enabling width Screen browses this operation of object setup module 604 ', and the user after displaying ratio is amplified can be avoided to pass through to touch electronic equipment Screen is moving webpage.
Alternatively, embodiments in accordance with the present invention, enable widescreen and browse object setup module 604 ' and be further adapted in the contracting Ratio calling module 607 is put from after reflection is arranged and scaling method enabled to be called in scaling manager object, Whether enabled widescreen and browsed the value of object and be set to true.This behaviour of object setup module 604 ' is browsed by enabling widescreen Make, can recover the function of webpage is moved by touch operation after word again typesetting.
Further optionally, embodiments in accordance with the present invention, the touch point judge module 603 are being judged to electronic equipment Operation be whether, before touch event method is triggered in the n-1 touch point unclamped in n touch point, can also to judge currently The quantity of touch point whether more than 1, and judge whether webpage supports scaling, in this judges twice, if any of which time Judged result be no, just further do not processed, touch event method performing module 609 just directly performs described succession Web displaying control touch event method.
Alternatively, the touch point judge module 603 judges whether webpage supports that zoom function can be in the following way Realize:The touch point judge module 603 can obtain WebView control setup modules(In android system WebSettings objects)In " whether support scaling " variable, the variable is Boolean, if true, then it represents that supported, if For false, then it represents that do not support zoom function, terminate the judgement;The touch point judge module 603 can be from scaling manager " the minimum zoom ratio of current web page " object and " the maximum zoom ratio of current web page " object are reflected in object to complete to obtain Extract operation, they are respectively mMinZoomScale objects and mMaxZoomScale objects in android system.Normal conditions Under, in the source code of webpage(It is invisible to user)In, some is understood for informing the scaling scope of the webpage, the value It is underground under normal circumstances, therefore need to obtain by reflecting;Then, the touch point judge module 603 can compare " current Whether the value of the minimum zoom ratio of webpage " object is equal with the value of " the maximum zoom ratio of current web page " object, if equal, False is then directly returned, represents that the webpage does not support zoom function, if unequal, returned true, represent " whether support contracting The value of playing function " variable is true, webpage support zoom function.
Due to above-mentioned each equipment(Device)Embodiment is corresponding with aforementioned approaches method embodiment, therefore no longer to each device reality Apply example to be described in detail.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein. Various general-purpose systems can also be used together based on teaching in this.As described above, construct required by this kind of system Structure be obvious.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to use it is various Programming language realizes the content of invention described herein, and the description done to language-specific above is to disclose this Bright preferred forms.
In description mentioned herein, a large amount of details are illustrated.It is to be appreciated, however, that the enforcement of the present invention Example can be put into practice in the case where not having these details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help understand one or more in each inventive aspect, exist Above to, in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together into single enforcement sometimes In example, figure or descriptions thereof.However, should the method for the disclosure be construed to reflect following intention:I.e. required guarantor The more features of feature is expressly recited in each claim by the application claims ratio of shield.More precisely, such as following Claims it is reflected as, inventive aspect is less than all features of single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as the separate embodiments of the present invention.
Those skilled in the art are appreciated that can be carried out adaptively to the module in the device in embodiment Change and they are arranged in one or more different from embodiment device.Can be some modules in embodiment A module or unit or component are combined into, and multiple submodule or subelement or sub-component can be divided in addition. In addition at least some in such feature and/or process or module is excluded each other, any combinations pair can be adopted This specification(Including adjoint claim, summary and accompanying drawing)Disclosed in all features and so disclosed any method Or all processes or unit of equipment are combined.Unless expressly stated otherwise, this specification(Will including adjoint right Ask, make a summary and accompanying drawing)Disclosed in each feature can be by providing identical, equivalent or similar purpose alternative features replacing.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments In some included features rather than further feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in detail in the claims, embodiment required for protection one of arbitrarily Can in any combination mode using.
The present invention each device embodiment can be realized with hardware, or with one or more processor operation Software module realize, or with combinations thereof realize.It will be understood by those of skill in the art that can use in practice Microprocessor or digital signal processor(DSP)To realize some or all moulds in device according to embodiments of the present invention The some or all functions of block.The present invention is also implemented as performing a part for method as described herein or complete The program of device in portion(For example, computer program and computer program).Such program for realizing the present invention can be stored On a computer-readable medium, or can have one or more signal form.Such signal can be from the Internet Download on website and obtain, or provide on carrier signal, or provided with any other form.
It should be noted that above-described embodiment the present invention will be described rather than limits the invention, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference markss between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not Element listed in the claims or step.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can come real by means of the hardware for including some different elements and by means of properly programmed computer It is existing.If in the unit claim for listing equipment for drying, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and be run after fame Claim.
Embodiment of the invention discloses that the method that webpage is scaled in A1. a kind of electronic equipment, comprises the following steps:Inherit Web displaying control, to build customization touch event method;Judge whether the operation to electronic equipment is to unclamp in n touch point N-1 touch point and trigger touch event method, wherein n is the integer more than or equal to 2;In the situation that judged result is yes Under, webpage word scaling is set to into the display scaling of web displaying control;Reflect from scaling manager object Arrange and enable scaling method to be called;And perform the touch event method of heritable web displaying control. A2. the method as described in A1, wherein the display scaling that webpage word scaling is set to web displaying control The step of include:It is in the case where the operating system of electronic equipment is Android2.3.x or more older version, aobvious from the webpage Word scaling object is reflected in showing control, and the word is given by the value of the display scaling of web displaying control Scaling object;Or in the case where the operating system of electronic equipment is Android4.0 or more redaction, from the contracting Word scaling object is reflected in putting manager object, and institute is given by the value of the display scaling of web displaying control State word scaling object.A3. the method as described in A1, wherein judging whether the operation to electronic equipment is release described N-1 touch point in n touch point and the step of trigger touch event method in, using ACTION_POINTER_UP objects Or ACTION_POINTER_n_UP objects determine whether the n-1 touch point unclamped in n touch point and trigger touch thing Part method.A4. the method as described in any one of A1 to A3, also including step:Webpage word scaling is set described Before the step of being set to the display scaling of web displaying control, judge whether the operating system of electronic equipment is supported at scaling Reason device object, in the case where not supporting, performs the display that webpage word scaling is set to web displaying control Reflection in the step of scaling and the manager object from scaling arranges and enables scaling method to be called And the step of performing the touch event method of heritable web displaying control;In the case of support, perform it is described by after The step of touch event method of the web displaying control for holding.A5. the method as described in any one of A1 to A3, also including step Suddenly:Before the step of display scaling that webpage word scaling is set to web displaying control described, will be whether Enable widescreen and browse the value of object and be set to false;And the reflection in the manager object from scaling is arranged and enables contracting After the step of ratio method is put to be called, whether enabled widescreen and browsed the value of object and be set to true.A6. such as A1 extremely Method described in any one of A3, wherein reflection is arranged and enables scaling method in the manager object from scaling In the step of to be called, the parameter transmitted when calling includes the net of the display scaling for being arranged to web displaying control Text composition is forced in page word scaling, permission text composition and permission.A7. as described in any one of A1 to A3 Method, wherein the web displaying control is the WebView controls of android system, the scaling manager object is MZoomManager objects, the scaling handler object are mListener objects, and the word scaling is to liking MTextWrapScale objects, the touch event method include onTouchEvent methods and dispatchTouchEvent Method, the setting to enable scaling method be setZoomScale methods or setNewZoomScale methods are described to be The no widescreen that enables is browsed to liking setUseWideViewPort objects.
Embodiments of the invention also disclose the device of webpage scaling in B8. a kind of electronic equipment, including:Customization touches thing Part method builds module, is suitable to inherit web displaying control, to build customization touch event method;Touch point judge module, fits In judging that whether the operation to electronic equipment is to unclamp n-1 touch point in n touch point to trigger touch event method, its Middle n is the integer more than or equal to 2;Webpage word scaling setup module, is suitable in judged result, in the case of being, to incite somebody to action Webpage word scaling is set to the display scaling of web displaying control;Scaling calling module, is suitable to from scaling Reflection in manager object arranges and enables scaling method to be called;And touch event method performing module, fit In the touch event method for performing heritable web displaying control.B9. the device as described in B8, wherein in the behaviour of electronic equipment Make system in the case of Android2.3.x or more older version, the webpage word scaling setup module is suitable to from described Word scaling object is reflected in web displaying control, and institute is given by the value of the display scaling of web displaying control State word scaling object;Or in the case where the operating system of electronic equipment is Android4.0 or more redaction, institute State webpage word scaling setup module to be suitable to reflect word scaling object from the scaling manager object, and The word scaling object is given by the value of the display scaling of web displaying control.B10. the device as described in B8, Wherein described touch point judge module is suitable to using ACTION_POINTER_UP objects or ACTION_POINTER_n_UP pair Touch event method is triggered as determining whether the n-1 touch point unclamped in n touch point.B11. as in B8 to B10 Device described in any one, also includes:Scaling processor supports judge module, is suitable to arrange in the webpage word scaling Before webpage word scaling is set to the display scaling of web displaying control by module, the operation of electronic equipment is judged Whether system is supported to scale handler object, and in the case where not supporting, the webpage word scaling setup module is by net Page word scaling is set to the display scaling of web displaying control, and scaling calling module from scaling management In device object reflection arrange and enable scaling method to be called, and touch event method performing module perform by after The touch event method of the web displaying control for holding;In the case of support, touch event method performing module performs the quilt The touch event method of the web displaying control of succession.B12. the device as described in any one of B8 to B10, also includes:Open Object setup module is browsed with widescreen, is suitable to set webpage word scaling in the webpage word scaling setup module Before being set to the display scaling of web displaying control, whether enabled widescreen and browsed the value of object and be set to false, and It is suitable to arrange and enable scaling method to carry out from reflection in scaling manager object in the scaling calling module After calling, whether enabled widescreen and browsed the value of object and be set to true.B13. the dress as described in any one of B8 to B10 Put, wherein arranging and enabling scaling method to enter from reflection in scaling manager object in the scaling calling module When row is called, the parameter transmitted when calling includes the webpage word scaling of the display scaling for being arranged to web displaying control Text composition is forced in ratio, permission text composition and permission.B14. the device as described in any one of B8 to B10, wherein The web displaying control is the WebView controls of android system, and the scaling manager object is mZoomManager pair As the scaling handler object is mListener objects, and the word scaling is to liking mTextWrapScale pair As the touch event method includes onTouchEvent methods and dispatchTouchEvent methods, and the setting is simultaneously It is setZoomScale methods or setNewZoomScale methods to enable scaling method, and the widescreen that whether enables is browsed To liking setUseWideViewPort objects.

Claims (20)

1. the method that webpage is scaled in a kind of electronic equipment, comprises the following steps:
Web displaying control is inherited, to build customization touch event method;
Judge whether the operation to electronic equipment is to unclamp n-1 touch point in n touch point to trigger touch event method, Wherein n is the integer more than or equal to 2;
In the case of being to be in judged result, webpage word scaling is set to into the display pantograph ratio of web displaying control Example;
Arrange and enable scaling method to be called from reflection in scaling manager object;And
Perform the touch event method of heritable web displaying control.
2. the method for claim 1, wherein described be set to the aobvious of web displaying control by webpage word scaling The step of showing scaling includes:
In the case where the operating system of electronic equipment is Android 2.3.x or more older version, from the web displaying control Middle reflection word scaling object, and the word pantograph ratio is given by the value of the display scaling of web displaying control Example object;Or
In the case where the operating system of electronic equipment is Android 4.0 or more redaction, from the scaling manager object Middle reflection word scaling object, and the word pantograph ratio is given by the value of the display scaling of web displaying control Example object.
3. the method for claim 1, wherein judging whether the operation to electronic equipment is to unclamp n touch point described In n-1 touch point and the step of trigger touch event method in, using ACTION_POINTER_UP objects or ACTION_POINTER_n_UP objects determine whether the n-1 touch point unclamped in n touch point and trigger touch event side Method.
4. the method as described in any one of claims 1 to 3, also including step:Described by webpage word scaling Before the step of being set to the display scaling of web displaying control, judge whether the operating system of electronic equipment supports scaling Handler object,
In the case where not supporting, the display pantograph ratio that webpage word scaling is set to web displaying control is performed Reflection in the step of example and the manager object from scaling arranges and enables scaling method to be called and hold The step of touch event method of row heritable web displaying control;
In the case of support, the step of perform the touch event method of the heritable web displaying control.
5. the method as described in any one of claims 1 to 3, also including step:
Before the step of display scaling that webpage word scaling is set to web displaying control described, will be whether Enable widescreen and browse the value of object and be set to false;And
After the step of reflection is arranged and enables scaling method to be called in the manager object from scaling, will Whether enable widescreen and browse the value of object and be set to true.
6. the method as described in any one of claims 1 to 3, wherein reflection is arranged in the manager object from scaling And the step of enable scaling method to be called in, the parameter transmitted when calling includes being arranged to web displaying control Display scaling webpage word scaling, allow text composition and allow force text composition.
7. the method as described in any one of claims 1 to 3, wherein the web displaying control is android system WebView controls, the scaling manager object are mZoomManager objects, and the touch event method includes OnTouchEvent methods and dispatchTouchEvent methods, the setting simultaneously enable scaling method and are SetZoomScale methods or setNewZoomScale methods.
8. method as claimed in claim 2, wherein the word scaling to as if mTextWrapScale objects.
9. method as claimed in claim 4, wherein the scaling handler object is mListener objects.
10. method as claimed in claim 5, wherein it is described whether enable widescreen browse to as if setUseWideViewPort Object.
The device of webpage scaling in 11. a kind of electronic equipment, including:
Customization touch event method builds module, is suitable to inherit web displaying control, to build customization touch event method;
Touch point judge module, is suitable to judge whether the operation to electronic equipment is to unclamp n-1 touch point in n touch point And touch event method is triggered, wherein n is the integer more than or equal to 2;
Webpage word scaling setup module, is suitable in judged result, in the case of being, webpage word scaling to be set It is set to the display scaling of web displaying control;
Scaling calling module, is suitable to from reflection in scaling manager object arrange and enable scaling method to be adjusted With;And
Touch event method performing module, is adapted for carrying out the touch event method of heritable web displaying control.
12. devices as claimed in claim 11, wherein the operating system in electronic equipment is Android 2.3.x or version earlier In the case of this, the webpage word scaling setup module is suitable to word pantograph ratio is reflected from the web displaying control Example object, and the word scaling object is given by the value of the display scaling of web displaying control;Or
In the case where the operating system of electronic equipment is Android 4.0 or more redaction, the webpage word scaling Setup module is suitable to reflect word scaling object, and showing web displaying control from the scaling manager object Show that the value of scaling gives the word scaling object.
13. devices as claimed in claim 11, wherein the touch point judge module is suitable to utilize ACTION_POINTER_UP Object or ACTION_POINTER_n_UP objects determine whether the n-1 touch point unclamped in n touch point and trigger tactile Touch event methods.
14. devices as described in any one of claim 11 to 13, also include:
Scaling processor supports judge module, is suitable to webpage word pantograph ratio in the webpage word scaling setup module Before example is set to the display scaling of web displaying control, judge whether the operating system of electronic equipment supports that scaling is processed Device object,
In the case where not supporting, webpage word scaling is set to webpage by the webpage word scaling setup module The display scaling of control is shown, and scaling calling module is arranged and enables contracting from reflection in scaling manager object Ratio method is put to be called, and touch event method performing module performs the touch thing of heritable web displaying control Part method;
In the case of support, touch event method performing module performs the touch event of the heritable web displaying control Method.
15. devices as described in any one of claim 11 to 13, also include:
Enable widescreen and browse object setup module, be suitable to scale webpage word in the webpage word scaling setup module Before ratio setting is for the display scaling of web displaying control, whether is enabled widescreen and browsed the value of object and be set to False, and be suitable to arrange and enable scaling from reflection in scaling manager object in the scaling calling module After method is to be called, whether is enabled widescreen and browsed the value of object and be set to true.
16. devices as described in any one of claim 11 to 13, wherein in the scaling calling module from scaling When in manager object, reflection is arranged and enables scaling method to be called, the parameter transmitted when calling includes being set For the webpage word scaling of the display scaling of web displaying control, text composition and permission is allowed to force word Typesetting.
17. devices as described in any one of claim 11 to 13, wherein the web displaying control is android system WebView controls, the scaling manager object is mZoomManager objects, and the touch event method includes OnTouchEvent methods and dispatchTouchEvent methods, the setting simultaneously enable scaling method and are SetZoomScale methods or setNewZoomScale methods.
18. devices as claimed in claim 12, wherein the word scaling is to liking mTextWrapScale objects.
19. devices as claimed in claim 14, wherein the scaling handler object is mListener objects.
20. devices as claimed in claim 15, wherein the widescreen that whether enables is browsed to liking SetUseWideViewPort objects.
CN201310268150.6A 2013-06-28 2013-06-28 Method and device for resizing webpages on electronic equipment Active CN103345497B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201310268150.6A CN103345497B (en) 2013-06-28 2013-06-28 Method and device for resizing webpages on electronic equipment
PCT/CN2014/074455 WO2014206125A1 (en) 2013-06-28 2014-03-31 Method and device for aligning zoomed webpage on electronic device
US14/901,512 US10061494B2 (en) 2013-06-28 2014-03-31 Method and device for webpage zooming on electronic apparatus
PCT/CN2014/074454 WO2014206124A1 (en) 2013-06-28 2014-03-31 Method and device for performing zooming on webpage on electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310268150.6A CN103345497B (en) 2013-06-28 2013-06-28 Method and device for resizing webpages on electronic equipment

Publications (2)

Publication Number Publication Date
CN103345497A CN103345497A (en) 2013-10-09
CN103345497B true CN103345497B (en) 2017-05-03

Family

ID=49280292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310268150.6A Active CN103345497B (en) 2013-06-28 2013-06-28 Method and device for resizing webpages on electronic equipment

Country Status (1)

Country Link
CN (1) CN103345497B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014206124A1 (en) * 2013-06-28 2014-12-31 北京奇虎科技有限公司 Method and device for performing zooming on webpage on electronic device
CN103955469B (en) * 2014-03-28 2018-01-19 北京奇虎科技有限公司 A kind of method and apparatus that page zoom-in and zoom-out is carried out in browser
CN105630815A (en) * 2014-10-31 2016-06-01 广州市动景计算机科技有限公司 Webpage reformatting method and device
CN110536005B (en) * 2019-08-16 2021-09-03 维沃移动通信有限公司 Object display adjustment method and terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314502A (en) * 2011-09-01 2012-01-11 百度在线网络技术(北京)有限公司 Method and equipment for displaying webpage main content on mobile terminal
CN102637198A (en) * 2012-02-28 2012-08-15 优视科技有限公司 Realization method and device of webpage content display, browser and mobile terminal
CN102779167A (en) * 2012-06-21 2012-11-14 北京奇虎科技有限公司 Method and system for displaying webpage in mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090109243A1 (en) * 2007-10-25 2009-04-30 Nokia Corporation Apparatus and method for zooming objects on a display

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314502A (en) * 2011-09-01 2012-01-11 百度在线网络技术(北京)有限公司 Method and equipment for displaying webpage main content on mobile terminal
CN102637198A (en) * 2012-02-28 2012-08-15 优视科技有限公司 Realization method and device of webpage content display, browser and mobile terminal
CN102779167A (en) * 2012-06-21 2012-11-14 北京奇虎科技有限公司 Method and system for displaying webpage in mobile terminal

Also Published As

Publication number Publication date
CN103345497A (en) 2013-10-09

Similar Documents

Publication Publication Date Title
CN103336817B (en) A kind of method and apparatus of webpage zoom on electronic equipment
CN103324734B (en) The method and apparatus of webpage scaling in a kind of electronic equipment
KR102118223B1 (en) Cross window animation
US20160004574A1 (en) Method and apparatus for accelerating system running
US20190042069A1 (en) Displaying an electronic document
WO2018040943A1 (en) Display data control method, device, and system
US20120306930A1 (en) Techniques for zooming in and out with dynamic content
CN106101767A (en) A kind of screen recording method and mobile terminal
CN107480148A (en) The method and device and user terminal that control webpage redirects
CN103345497B (en) Method and device for resizing webpages on electronic equipment
MX2015007246A (en) Method, apparatus and terminal device for controlling movement of application interface.
CN113918260A (en) Application program display method and device and electronic equipment
KR20210088484A (en) Method and system for information providing interface based on new user experience
WO2014137106A1 (en) Method and apparatus for controlling electronic medical record system based output window
US9367223B2 (en) Using a scroll bar in a multiple panel user interface
CN106598617A (en) Method for setting webpage shortcut, and electronic equipment
CN106599257A (en) Page shortcut realization method and electronic equipment
CN106126111A (en) A kind of file moving method, device and terminal unit
CN103324743B (en) A kind of webpage zoom on electronic equipment and the method and apparatus of alignment
CN105278810A (en) Collection method and electronic device
CN108460031B (en) Data information display method and device
CN111782113B (en) Display method, display device and computer-readable storage medium
CN102955648A (en) Terminal equipment, content merging method and display method
CN110196672B (en) Method and device for opening file, folding screen device and storage medium
CN110727484B (en) Information display method and device and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220727

Address after: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, Binhai New Area, Tianjin

Patentee after: 3600 Technology Group Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230711

Address after: 1765, floor 17, floor 15, building 3, No. 10 Jiuxianqiao Road, Chaoyang District, Beijing 100015

Patentee after: Beijing Hongxiang Technical Service Co.,Ltd.

Address before: 300450 No. 9-3-401, No. 39, Gaoxin 6th Road, Binhai Science Park, Binhai New Area, Tianjin

Patentee before: 3600 Technology Group Co.,Ltd.

TR01 Transfer of patent right