WO2013056562A1 - 一种基于Webkit浏览器的wap页面显示方法及装置 - Google Patents

一种基于Webkit浏览器的wap页面显示方法及装置 Download PDF

Info

Publication number
WO2013056562A1
WO2013056562A1 PCT/CN2012/077233 CN2012077233W WO2013056562A1 WO 2013056562 A1 WO2013056562 A1 WO 2013056562A1 CN 2012077233 W CN2012077233 W CN 2012077233W WO 2013056562 A1 WO2013056562 A1 WO 2013056562A1
Authority
WO
WIPO (PCT)
Prior art keywords
display
displayed
width
webpage
webkit browser
Prior art date
Application number
PCT/CN2012/077233
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 WO2013056562A1 publication Critical patent/WO2013056562A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present invention relates to the field of mobile communication technologies, and in particular, to a wap page display method and apparatus based on a WebKit browser.
  • Android ⁇ & open source mobile operating system on Linux platform Android platform consists of operating system, middleware, user interface and application software.
  • the bottom layer of the platform is based on the Linux kernel developed by C language, providing only basic functions, the middle layer of the platform. It includes function libraries and virtual machines, and the upper layers of the platform are various application software.
  • a full-featured browser based on the open source WebKit kernel is integrated inside the Android platform to support both the Wireless Application Communication Protocol (WAP) network and the World Wide Web (WWW).
  • WAP Wireless Application Communication Protocol
  • WWWW World Wide Web
  • the WebKit browser in the Android system cannot know the minimum width required for the wap page layout, and can only use the default 800 pixels as the minimum required for the wap type page layout.
  • Width in general, the minimum width required for a wap page layout is about 200 pixels, which is much smaller than 800 pixels, and 800 pixels is larger than the display width of the display (generally less than 480 pixels), so that when the browser displays the wap webpage, A large blank area is created in the horizontal direction of the display in the form of a scroll bar, which reduces the user experience.
  • the WebKit browser can determine whether the currently accessed page is a wap page by looking up keywords in the web page address (URL) (such as ".wap.,,, ".m.”, etc.), and then agree that the width of the browser display area is The display width of the display of the mobile terminal, however, the method cannot recognize the webpage address in digital form. For example, if there is no related keyword such as ".wap.” in the webpage address http://218.204.177.211:8080/test/, It is not possible to determine whether the web page is of the wap type. Moreover, in this method, when the minimum width required for the page layout is larger than the display width of the display screen, the display may be confused.
  • URL web page address
  • the invention provides a method and a device for displaying a wap page based on a WebKit browser, which can effectively identify a wap type webpage when using a WebKit browser, and determine a suitable browser display area width for a wap.
  • the page is displayed.
  • a method for displaying a wap page based on a WebKit browser including:
  • Get the media type parameter value of the web page to be displayed Determining, according to the media type parameter value, that the webpage to be displayed is a wap type, determining a WebKit browser based on a maximum view width of the WebKit browser, a display width of the display screen of the display terminal, and a minimum width required for the page layout of the web page to be displayed. Displaying a display width required for the web page to be displayed;
  • a wap page display device based on WebKit browser comprising:
  • a first processing unit configured to obtain a media type parameter value of the webpage to be displayed
  • a second processing unit configured to determine, according to the media type parameter value, that the webpage to be displayed is a wap type, a maximum view width based on a WebKit browser, a display width of a display screen of the display terminal, and a layout of the webpage to be displayed
  • the minimum width is required to determine the display width required by the WebKit browser to display the web page to be displayed
  • a third processing unit configured to use the determined display width required by the determined WebKit browser to display the webpage to be displayed as the display area width of the WebKit browser to display the webpage to be displayed.
  • the webpage type parameter value of the webpage to be displayed is obtained, and the webpage to be displayed is determined to be a wap type according to the media type parameter value, the maximum view width based on the WebKit browser and the display terminal display screen are displayed.
  • the display width and the minimum width required for the web page layout to be displayed determine the display width required by the WebKit browser to display the web page to be displayed, and the required display width is used as the display area width of the WebKit browser to display the web page to be displayed. Therefore, when using the WebKit browser, the wap type webpage can be effectively recognized, and the appropriate browser display area width is determined to display the wap page.
  • FIG. 1 is a flowchart of a method for displaying a wap page based on a WebKit browser according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of an object calling relationship when a mimetype value is obtained in an embodiment of the present invention
  • FIG. 3 is a structural diagram of a wap page display device based on a WebKit browser according to an embodiment of the present invention.
  • the wap type webpage can be effectively identified, and the appropriate browser display area width is determined to display the wap page.
  • the view size change function viewSizeChanged of the web view core object WebViewCore in the WebKit browser is called (in Java).
  • the method is a minimum unit for implementing the function.
  • the method is convenient for presentation, and the method is called a function.
  • the specific implementation code of the wap page display method based on the WebKit browser is added to the viewSizeChanged function.
  • the specific implementation code can also be set outside the WebKit browser, and then the calling relationship can be set.
  • FIG. 1 in the embodiment of the present invention, a detailed method for displaying a wap page based on a WebKit browser is as follows:
  • Step 101 Obtain a media type parameter (mimetype) value of the webpage to be displayed.
  • the mimetype value of the webpage to be displayed is obtained by calling the media type parameter return (responseMIMEType) function in the frame loading object FrameLoader.
  • the mimetype value of the webpage to be displayed After obtaining the mimetype value of the webpage to be displayed, determining whether the mimetype value is "text/vnd.wap.wml", and if so, determining that the webpage to be displayed is of a wap type. If the mimetype value is "text/html", the page to be displayed is html type.
  • the media type parameter value of the webpage to be displayed is obtained by calling the responseMIMEType function of the FrameLoader object in the WebKit browser, and the media type parameter value is obtained by the responseMIMEType function from the webpage data of the webpage to be displayed returned by the server.
  • the responseMIMEType function in the FrameLoader object in the WebKit browser is invoked through the interrelated object, for example, the Web ViewCore object in the WebKit browser is first called, and the main frame media type in the object is obtained.
  • the function nativeGetMainFrameMimeType ( ) calls the local Web view core object NativeWeb ViewCore, and then calls the FrameLoader object through the main frame type get function GetMainFrameType ( ) in the NativeWeb ViewCore object, and returns the mimetype value step by step through the responseMIMEType ( ) function in the Frameloader object.
  • Step 102 Determine, according to the mimetype value, that the webpage to be displayed is a wap type, determine a WebKit browsing based on a maximum view width (maxviewport) of the WebKit browser, a display width of the display screen of the display terminal, and a minimum width (minpreftvidth) required for the page layout of the web page to be displayed.
  • the WebKit browser displays the display width required for the webpage to be displayed, obtaining the display terminal display screen by using an application programming interface (API) of the display terminal Android system.
  • the display width, as well as the minimum width of the page layout opened by the WebKit browser gets the interface GetContentMinPrefWidth to get the minimum width required for the page layout of the page to be displayed.
  • the maximum view width of the WebKit browser is a predetermined value, such as 800 pixels.
  • the specific code can be expressed as: DisplayMetrics.DENSITY_DEVICE*2, where DisplayMetrics is a display parameter provided by the Android system API.
  • the class, DENSITY DEVICE is a static variable of the class, which represents the value of the logical density of the current display device. Multiplying the value by 2 gives the number of pixels corresponding to the display width of the current display device.
  • the specific selection is as follows: Displays the maximum width of the display width of the terminal display and the minimum width required to display the page layout of the web page to be displayed Value, and further select the minimum value of the maximum value and the maximum view width of the WebKit browser, and determine the minimum value as the display width required by the WebKit browser to display the web page to be displayed.
  • Step 103 The determined display width of the WebKit browser for displaying the webpage to be displayed is used as the display area width of the WebKit browser to display the webpage to be displayed.
  • the code in the viewSizeChanged ( ... ) function of the Web ViewCore object set in the WebKit browser can be represented by pseudo code as follows:
  • Mimetype The mimetype value of the web page to be displayed obtained
  • Width min (Maximum view width of WebKit browser, max (display width of mobile terminal display, minimum width required for web page layout to be displayed))
  • the embodiment of the present invention further provides a WAP page display device based on the WebKit browser, and the principle of solving the problem by the device and the wap page display based on the WebKit browser in the embodiment of the present invention.
  • the method is similar, so the specific implementation of the device can be referred to the implementation of the above method, and the repeated description will not be repeated.
  • the device mainly includes the following processing units:
  • the first processing unit 301 is configured to obtain a media type parameter value of the webpage to be displayed;
  • the second processing unit 302 is configured to determine, according to the media type parameter value, a maximum view width of the WebKit browser, a display width of the display screen of the display terminal, and a maximum and width determination of the page layout of the web page to be displayed when the web page to be displayed is of the wap type.
  • the WebKit browser displays the display width required for the web page to be displayed;
  • the third processing unit 303 is configured to use the display width required by the determined WebKit browser to display the webpage to be displayed as the display area width of the WebKit browser to display the webpage to be displayed.
  • the mimetype value of the webpage to be displayed when the mimetype value of the webpage to be displayed is obtained, and the mimtype value is used to determine that the webpage to be displayed is a wap type, the maximum view width based on the WebKit browser, the display width of the display screen of the display terminal, and The minimum required width of the web page layout to be displayed determines the display width required by the WebKit browser to display the web page to be displayed, and the display width is used as the display area width of the WebKit browser to display the web page to be displayed, thereby being able to use the WebKit browser. Can effectively identify wap type web pages and determine the appropriate ones The browser displays the width of the area and displays the wap page.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the present invention can be embodied in the form of a computer program product embodied on one or more computer-usable storage interfaces (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
  • computer-usable storage interfaces including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

提供了一种基于WebKit浏览器的wap页面显示方法。该方法包括以下步骤:获取待显示网页的媒体类型参数值;确定待显示网页为wap类型时,基于WebKit浏览器的最大视图宽度、显示终端显示屏的显示宽度以及待显示网页页面布局所需最小宽度确定WebKit浏览器显示待显示网页所需的显示宽度;将该显示宽度确定为WebKit浏览器的显示区域宽度,以显示待显示网页。还提供了一种基于WebKit浏览器的wap页面显示装置。本方法和装置用于采用Android系统的显示终端,在使用WebKit浏览器时能够有效识别wap类型网页,并确定合适的浏览器显示区域宽度。

Description

一种基于 Webkit浏览器的 wap页面显示方法及装置 本申请要求在 2011年 10月 18日提交中国专利局、 申请号为 201110316963.9、发明名 称为 "一种基于 Webkit浏览器的 wap页面显示方法及装置"的中国专利申请的优先权,其全 部内容通过引用结合在本申请中。
技术领域
本发明涉及移动通信技术领域, 尤其涉及一种基于 WebKit浏览器的 wap页面显示方 法及装置。
背景技术
Android ^&于 Linux平台的开源手机操作系统, Android平台由操作系统、 中间件、 用户界面和应用软件组成, 平台的底层以 C语言开发的 Linux内核为基础, 只提供基本功 能, 平台的中间层包括函数库和虚拟机, 而平台的上层是各种应用软件。 在 Android平台 内部集成了基于开源 WebKit内核的全功能浏览器,可以同时支持无线应用通信协议(wap ) 网和万维网 (WWW )。
以移动终端为例, 目前在移动终端基于 WebKit浏览器访问 wap网页时, Android系统 中的 WebKit浏览器无法获知 wap页面布局所需最小宽度,只能使用默认 800像素作为 wap 类型页面布局所需最小宽度, 一般情况下, wap页面布局所需最小宽度为 200像素左右, 远小于 800像素, 而 800像素又大于显示屏的显示宽度(一般小于 480像素), 从而使得 浏览器在显示 wap网页时, 以滚动条形式在显示屏水平方向上产生大片空白区域, 降低了 用户体验。
虽然, WebKit浏览器可以通过查找网页地址(URL ) 中关键字 (如 ".wap.,,、 ".m." 等)确定当前访问页面是否为 wap页面, 然后约定浏览器显示区域的宽度为移动终端显示 屏的显示宽度, 但是, 该方法无法识别数字形式的网页地址, 例如, 网页地址 http://218.204.177.211 :8080/test/中不存在 ".wap." 等相关关键字, 则无法确定该网页是否 为 wap类型。 并且, 该方法中在页面布局所需最小宽度大于显示屏的显示宽度时, 则会造 成显示混乱。
发明内容
本发明提供一种基于 WebKit浏览器的 wap页面显示方法及装置, 用以釆用 Android 系统的显示终端在使用 WebKit浏览器时能够有效识别 wap类型网页, 并确定合适的浏览 器显示区域宽度进行 wap页面显示。
本发明实施例提供的具体技术方案如下:
一种基于 WebKit浏览器的 wap页面显示方法, 包括:
获取待显示网页的媒体类型参数值; 根据所述媒体类型参数值确定所述待显示网页为 wap类型时, 基于 WebKit浏览器的 最大视图宽度、 显示终端显示屏的显示宽度以及所述待显示网页页面布局所需最小宽度确 定 WebKit浏览器显示所述待显示网页所需的显示宽度;
将确定的所述 WebKit浏览器显示所述待显示网页所需的显示宽度作为 WebKit浏览器 的显示区域宽度, 以显示所述待显示网页。
一种基于 WebKit浏览器的 wap页面显示装置, 包括:
第一处理单元, 用于获取待显示网页的媒体类型参数值;
第二处理单元, 用于根据所述媒体类型参数值确定所述待显示网页为 wap类型时, 基 于 WebKit浏览器的最大视图宽度、 显示终端显示屏的显示宽度以及所述待显示网页页面 布局所需最小宽度确定 WebKit浏览器显示所述待显示网页所需的显示宽度;
第三处理单元, 用于将确定的所述 WebKit浏览器显示所述待显示网页所需的显示宽 度作为 WebKit浏览器的显示区域宽度, 以显示所述待显示网页。
基于上述技术方案, 本发明实施例中, 通过获取待显示网页的媒体类型参数值, 根据 该媒体类型参数值确定待显示网页为 wap类型时, 基于 WebKit浏览器的最大视图宽度、 显示终端显示屏的显示宽度以及待显示网页页面布局所需最小宽度确定 WebKit浏览器显 示待显示网页所需的显示宽度, 并将该所需的显示宽度作为 WebKit浏览器的显示区域宽 度, 以显示待显示网页, 从而使得在使用 WebKit浏览器时能够有效识别 wap类型网页, 并确定合适的浏览器显示区域宽度进行 wap页面显示。
附图说明
图 1为本发明实施例中基于 WebKit浏览器的 wap页面显示方法流程图;
图 2为本发明实施例中获取 mimetype值时的对象调用关系示意图;
图 3为本发明实施例中基于 WebKit浏览器的 wap页面显示装置结构图。
具体实施方式
为了使得釆用 Android系统的显示终端 (尤其是移动终端), 在使用 WebKit浏览器时 能够有效识别 wap类型网页, 并确定合适的浏览器显示区域宽度进行 wap页面显示, 本发 明实施例提供了一种基于 WebKit浏览器的 wap页面显示方法。
下面结合附图对本发明优选的实施方式进行详细说明。
在 Android系统中, 当 WebKit浏览器的界面构造或显示区域尺寸状态发生变化时,例 如在浏览器界面尺寸变化时, 会调用 WebKit浏览器中网页视图核心对象 WebViewCore的 视图尺寸改变函数 viewSizeChanged (在 Java编程语言中, 方法是实现功能的最小单位, 本实施例为表述方便, 统一将方法称为函数), 本实施例中将基于 WebKit浏览器的 wap页 面显示方法的具体实现代码加入 viewSizeChanged函数中。 实际应用中, 也可将该具体实 现代码设置于 WebKit浏览器之外, 再设置调用关系即可。 如附图 1所示, 本发明实施例中, 基于 WebKit浏览器进行 wap页面显示的详细方法 流程如下:
步骤 101: 获取待显示网页的媒体类型参数 ( mimetype )值。
本实施例中, 通过调用框架装载对象 FrameLoader 中的媒体类型参数返回 ( responseMIMEType ) 函数获取待显示网页的 mimetype值。
具体地, 在获取待显示网页的 mimetype 值后, 判断该 mimetype 值是否为 "text/vnd.wap.wml" ,若是,则确定该待显示网页为 wap类型。若 mimetype值为 "text/html" 则待显示网页为 html类型。
本实施例中,通过调用 WebKit浏览器中 FrameLoader对象的 responseMIMEType函数 获取待显示网页的媒体类型参数值, 该媒体类型参数值由 responseMIMEType函数从服务 器返回的待显示网页的网页数据中获得。
实际应用中, 如附图 2所示, 通过相互关联的对象调用 WebKit浏览器中 FrameLoader 对象中的 responseMIMEType函数, 例如, 首先调用 WebKit浏览器中 Web ViewCore对象, 通过该对象中的主框架媒体类型获取函数 nativeGetMainFrameMimeType ( )调用本地 Web 视图核心对象 NativeWeb ViewCore, 再通过 NativeWeb ViewCore对象中的主框类型获取函 数 GetMainFrameType ( ) 调用 FrameLoader 对象, 通过 Frameloader 对象中的 responseMIMEType ( ) 函数逐级返回 mimetype值。
步骤 102: 根据 mimetype值确定待显示网页为 wap类型时, 基于 WebKit浏览器的最 大视图宽度( maxviewport )、 显示终端显示屏的显示宽度以及待显示网页页面布局所需最 小宽度( minpreftvidth )确定 WebKit浏览器显示待显示网页所需的显示宽度。
具体地, 在根据 mimetype值确定待显示网页为 wap类型之后, 确定 WebKit浏览器显 示待显示网页所需的显示宽度之前,通过显示终端 Android系统的应用程序编程接口( API ) 获得显示终端显示屏的显示宽度, 以及通过 WebKit浏览器开放的页面布局最小宽度获取 接口 GetContentMinPrefWidth获得待显示网页页面布局所需最小宽度。 其中, WebKit浏览 器的最大视图宽度为预定值, 如 800像素。
例如, 以移动终端为例, 通过 Android系统的 API接口获得移动终端显示屏的显示宽 度时, 具体代码可表示为: DisplayMetrics.DENSITY_DEVICE*2, 其中, DisplayMetrics是 Android系统 API提供的一个显示参数相关的类, DENSITY DEVICE是该类的一个静态变 量, 表示当前显示设备的逻辑密度(density )值, 将该值乘 2即得到当前显示设备显示宽 度相应的像素数目。
本实施例中, 基于 WebKit浏览器的最大视图宽度、 显示终端显示屏的显示宽度以及 待显示网页页面布局所需最小宽度确定 WebKit浏览器显示待显示网页所需的显示宽度时, 具体为: 选取显示终端显示屏的显示宽度和待显示网页页面布局所需最小宽度中的最大 值, 并进一步选取该最大值与 WebKit浏览器的最大视图宽度中的最小值, 将该最小值确 定为 WebKit浏览器显示待显示网页所需的显示宽度。
步骤 103: 将确定的 WebKit浏览器显示待显示网页所需的显示宽度作为 WebKit浏览 器的显示区域宽度, 以显示待显示网页。
例如,以移动终端为例,在设置于 WebKit浏览器 Web ViewCore对象的 viewSizeChanged ( ... ) 函数中的代码可用伪码表示如下:
Private void viewSizeChanged ( int w, int h, int textwrap Width, float scale, int anchorX, int anchorY, boolean ignoreHeight )
mimetype=获取的待显示网页的 mimetype值;
if mimetype等于 "text/vnd.wap.wml"
width=min ( WebKit浏览器的最大视图宽度, max (移动终端显示屏的显示宽度, 待显示网页页面布局所需最小宽度))
endif
将 width值通知底层显示模块
基于上述原理,如附图 3所示,本发明实施例还提供了一种基于 WebKit浏览器的 wap 页面显示装置, 由于该装置解决问题的原理与本发明实施例基于 WebKit浏览器的 wap页 面显示的方法相似, 因此该装置的具体实施可参见上述方法的实施, 重复之处不再赘述, 该装置主要包括以下处理单元:
第一处理单元 301 , 用于获取待显示网页的媒体类型参数值;
第二处理单元 302, 用于根据媒体类型参数值确定待显示网页为 wap 类型时, 基于 WebKit浏览器的最大视图宽度、显示终端显示屏的显示宽度以及待显示网页页面布局所需 最 、宽度确定 WebKit浏览器显示待显示网页所需的显示宽度;
第三处理单元 303 ,用于将确定的 WebKit浏览器显示待显示网页所需的显示宽度作为 WebKit浏览器的显示区域宽度, 以显示待显示网页。
基于上述技术方案, 本发明实施例中, 通过获取待显示网页的 mimetype值, 根据该 mimetype值确定待显示网页为 wap类型时, 基于 WebKit浏览器的最大视图宽度、 显示终 端显示屏的显示宽度以及待显示网页页面布局所需最小宽度确定 WebKit浏览器显示待显 示网页所需的显示宽度, 将该显示宽度作为 WebKit浏览器的显示区域宽度, 以显示待显 示网页, 从而能够在使用 WebKit浏览器时能够有效识别 wap类型网页, 并确定合适的浏 览器显示区域宽度, 进行 wap页面显示。
本领域内的技术人员应明白, 本发明的实施例可提供为方法、 系统、 或计算机程序产 品。 因此, 本发明可釆用完全硬件实施例、 完全软件实施例、 或结合软件和硬件方面的实 施例的形式。 而且, 本发明可釆用在一个或多个其中包含有计算机可用程序代码的计算机 可用存储介盾 (包括但不限于磁盘存储器、 CD-ROM、 光学存储器等)上实施的计算机程 序产品的形式。
本发明是参照根据本发明实施例的方法、 设备(系统)、 和计算机程序产品的流程图 和 /或方框图来描述的。 应理解可由计算机程序指令实现流程图和 /或方框图中的每一流 程和 /或方框、 以及流程图和 /或方框图中的流程和 /或方框的结合。 可提供这些计算机 程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器 以产生一个机器, 使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用 于实现在流程图一个流程或多个流程和 /或方框图一个方框或多个方框中指定的功能的 装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方 式工作的计算机可读存储器中, 使得存储在该计算机可读存储器中的指令产生包括指令装 置的制造品, 该指令装置实现在流程图一个流程或多个流程和 /或方框图一个方框或多个 方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计算机 或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理, 从而在计算机或其他 可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和 /或方框图一个 方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例, 但本领域内的技术人员一旦得知了基本创造性概 念, 则可对这些实施例作出另外的变更和修改。 所以, 所附权利要求意欲解释为包括优选 实施例以及落入本发明范围的所有变更和修改。
显然, 本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和 范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在内。

Claims

权 利 要 求
1、 一种基于 WebKit浏览器的 wap页面显示方法, 其特征在于, 包括:
获取待显示网页的媒体类型参数值;
根据所述媒体类型参数值确定所述待显示网页为无线应用通信协议 wap类型时,基于 WebKit浏览器的最大视图宽度、显示终端显示屏的显示宽度以及所述待显示网页页面布局 所需最小宽度确定 WebKit浏览器显示所述待显示网页所需的显示宽度;
将确定的所述 WebKit浏览器显示所述待显示网页所需的显示宽度作为 WebKit浏览器 的显示区域宽度, 以显示所述待显示网页。
2、 如权利要求 1 所述的方法, 其特征在于, 获取待显示网页的媒体类型参数值, 包 括:
通过调用 WebKit 浏览器中框架装载对象 FrameLoader 的媒体类型参数返回函数 responseMIMEType获取所述待显示网页的媒体类型参数值, 所述媒体类型参数值由所述 responseMIMEType函数从服务器返回的所述待显示网页的网页数据中获得。
3、 如权利要求 2 所述的方法, 其特征在于, 根据所述媒体类型参数值确定所述待显 示网页为 wap类型时, 包括:
判断该媒体类型参数值是否为 "text/vnd.wap.wml" ,若是,则确定该待显示网页为 wap 类型。
4、 如权利要求 1、 2或 3所述的方法, 其特征在于, 确定 WebKit浏览器显示所述待 显示网页所需的显示宽度之前, 还包括:
通过显示终端 Android系统的应用程序编程接口获得显示终端显示屏的显示宽度, 以 及通过 WebKit浏览器开放的页面布局最小宽度获取接口 GetContentMinPrefWidth获得所 述待显示网页页面布局所需最小宽度。
5、 如权利要求 4所述的方法, 其特征在于, 基于 WebKit浏览器的最大视图宽度、 显 示终端显示屏的显示宽度以及所述待显示网页页面布局所需最小宽度确定所述 WebKit浏 览器显示所述待显示网页所需的显示宽度, 包括:
选取所述显示终端显示屏的显示宽度和所述待显示网页页面布局所需最小宽度中的 最大值, 并进一步选取该最大值与所述 WebKit浏览器的最大视图宽度中的最小值, 将该 最 、值确定为所述 WebKit浏览器显示所述待显示网页所需的显示宽度。
6、 一种基于 WebKit浏览器的 wap页面显示装置, 其特征在于, 包括:
第一处理单元, 用于获取待显示网页的媒体类型参数值;
第二处理单元, 用于根据所述媒体类型参数值确定所述待显示网页为无线应用通信协 议 wap类型时, 基于 WebKit浏览器的最大视图宽度、 显示终端显示屏的显示宽度以及所 述待显示网页页面布局所需最小宽度确定 WebKit浏览器显示所述待显示网页所需的显示 宽度;
第三处理单元, 用于将确定的所述 WebKit浏览器显示所述待显示网页所需的显示宽 度作为 WebKit浏览器的显示区域宽度, 以显示所述待显示网页。
7、如权利要求 6所述的装置,其特征在于,所述第一处理单元具体用于通过调用 WebKit 浏览器中 FrameLoader对象的媒体类型参数返回函数 responseMIMEType获取所述待显示 网页的媒体类型参数值, 所述媒体类型参数值由所述 responseMIMEType函数从服务器返 回的所述待显示网页的网页数据中获得。
8、 如权利要求 7 所述的装置, 其特征在于, 所述第二处理单元用于根据所述媒体类 型参数值确定所述待显示网页为 wap 类型时, 判断该媒体类型参数值是否为
"text/vnd.wap.wml" , 若是, 则确定该待显示网页为 wap类型。
9、 如权利要求 6、 7或 8所述的装置, 其特征在于, 所述第二处理单元还用于在确定 WebKit浏览器显示所述待显示网页所需的显示宽度之前,通过显示终端 Android系统的应 用程序编程接口获得显示终端显示屏的显示宽度, 以及通过 WebKit浏览器开放的页面布 局最小宽度获取接口 GetContentMinPrefWidth获得所述待显示网页页面布局所需最小宽 度。
10、 如权利要求 9所述的装置, 其特征在于, 所述第二处理单元具体用于选取所述显 示终端显示屏的显示宽度和所述待显示网页页面布局所需最小宽度中的最大值, 并进一步 选取该最大值与所述 WebKit浏览器的最大视图宽度中的最小值, 将该最小值确定为所述 WebKit浏览器显示所述待显示网页所需的显示宽度。
PCT/CN2012/077233 2011-10-18 2012-06-20 一种基于Webkit浏览器的wap页面显示方法及装置 WO2013056562A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2011103169639A CN102360294A (zh) 2011-10-18 2011-10-18 一种基于WebKit浏览器的wap页面显示方法及装置
CN201110316963.9 2011-10-18

Publications (1)

Publication Number Publication Date
WO2013056562A1 true WO2013056562A1 (zh) 2013-04-25

Family

ID=45585627

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/077233 WO2013056562A1 (zh) 2011-10-18 2012-06-20 一种基于Webkit浏览器的wap页面显示方法及装置

Country Status (2)

Country Link
CN (1) CN102360294A (zh)
WO (1) WO2013056562A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102360294A (zh) * 2011-10-18 2012-02-22 青岛海信移动通信技术股份有限公司 一种基于WebKit浏览器的wap页面显示方法及装置
CN103685379B (zh) * 2012-09-12 2018-04-20 腾讯科技(深圳)有限公司 基于webkit内核浏览器的文件上传方法及装置
CN103049430A (zh) * 2012-12-27 2013-04-17 南京新与力文化传播有限公司 一种基于idf格式文件的页面显示方法
CN103324438A (zh) * 2013-06-24 2013-09-25 北京奇虎科技有限公司 一种浏览器的翻页方法、装置及电子设备
CN104461537B (zh) * 2014-12-08 2017-11-28 浙江网新恩普软件有限公司 一种基于浏览器内核的多业务集成系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727495A (zh) * 2009-12-31 2010-06-09 优视科技有限公司 一种用于移动通讯设备终端的网页页面缩放管理系统及其应用方法
US20100180192A1 (en) * 2009-01-09 2010-07-15 Cerner Innovation, Inc. Dynamically configuring a presentation layer associated with a webpage delivered to a client device
CN102187296A (zh) * 2008-09-08 2011-09-14 高通股份有限公司 将基于多面板电子装置的屏幕大小或屏幕分辨率的参数发送到服务器
CN102360294A (zh) * 2011-10-18 2012-02-22 青岛海信移动通信技术股份有限公司 一种基于WebKit浏览器的wap页面显示方法及装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060184609A1 (en) * 2005-02-16 2006-08-17 Li Deng Simplified scheme of rich content messaging from PC to mobile devices
CN101150803B (zh) * 2007-10-24 2011-08-24 优视科技有限公司 微浏览器处理网络数据的方法、微浏览器及其服务器
CN102056150B (zh) * 2010-12-01 2013-08-07 北京迅捷英翔网络科技有限公司 手机终端策略适配装置及方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102187296A (zh) * 2008-09-08 2011-09-14 高通股份有限公司 将基于多面板电子装置的屏幕大小或屏幕分辨率的参数发送到服务器
US20100180192A1 (en) * 2009-01-09 2010-07-15 Cerner Innovation, Inc. Dynamically configuring a presentation layer associated with a webpage delivered to a client device
CN101727495A (zh) * 2009-12-31 2010-06-09 优视科技有限公司 一种用于移动通讯设备终端的网页页面缩放管理系统及其应用方法
CN102360294A (zh) * 2011-10-18 2012-02-22 青岛海信移动通信技术股份有限公司 一种基于WebKit浏览器的wap页面显示方法及装置

Also Published As

Publication number Publication date
CN102360294A (zh) 2012-02-22

Similar Documents

Publication Publication Date Title
US11934630B2 (en) Hybrid mobile interactions for native apps and web apps
US8407584B1 (en) Stable and secure use of content scripts in browser extensions
US8949739B2 (en) Creating and maintaining images of browsed documents
US11934629B2 (en) Action tool bar for mobile applications
US8612418B2 (en) Mobile web browser for pre-loading web pages
US8365203B2 (en) Method for creating a native application for mobile communications device in real-time
TWI604368B (zh) Data processing method and device
WO2014134934A1 (zh) 一种双WebView展示定制页面的方法及系统
WO2019007327A1 (zh) 视频播放方法、装置、计算设备以及存储介质
WO2018036544A1 (zh) 浏览器在独立窗口中播放视频的方法、装置及存储介质
CN106339414A (zh) 网页渲染方法及装置
WO2014161357A1 (zh) 浏览器资源显示方法和装置、计算机可读存储介质
WO2013056562A1 (zh) 一种基于Webkit浏览器的wap页面显示方法及装置
WO2014029321A1 (en) Method, device and mobile terminal for restoring page
CN107977137B (zh) 应用页面的对象展示方法、装置和设备
CN106649497B (zh) 一种网页展示方法及装置
WO2013085595A1 (en) Selective image loading in mobile browsers
US20230281025A1 (en) Application Interface Layout Method and Electronic Device
WO2014071779A1 (zh) 预打开网页的方法、装置及移动终端
CN110362766B (zh) 一种页面显示控制方法及终端
CN108038150B (zh) 网页打开方法、装置及终端设备
CN106649299A (zh) 一种网页区块懒加载的方法和装置
WO2012035069A1 (en) Methods and apparatus for expandable window border
CN110618811B (zh) 信息呈现方法和装置
CN107480218A (zh) 网页显示方法及装置、电子设备、存储介质

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: 12841978

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12841978

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 25/06/2014)

122 Ep: pct application non-entry in european phase

Ref document number: 12841978

Country of ref document: EP

Kind code of ref document: A1