Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7612433B2 - Information processing device, information processing method, and program - Google Patents
[go: Go Back, main page]

JP7612433B2 - Information processing device, information processing method, and program - Google Patents

Information processing device, information processing method, and program Download PDF

Info

Publication number
JP7612433B2
JP7612433B2 JP2021009332A JP2021009332A JP7612433B2 JP 7612433 B2 JP7612433 B2 JP 7612433B2 JP 2021009332 A JP2021009332 A JP 2021009332A JP 2021009332 A JP2021009332 A JP 2021009332A JP 7612433 B2 JP7612433 B2 JP 7612433B2
Authority
JP
Japan
Prior art keywords
area
web page
display
display area
content
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
JP2021009332A
Other languages
Japanese (ja)
Other versions
JP2022113246A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2021009332A priority Critical patent/JP7612433B2/en
Publication of JP2022113246A publication Critical patent/JP2022113246A/en
Application granted granted Critical
Publication of JP7612433B2 publication Critical patent/JP7612433B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Description

本発明は、情報処理装置、情報処理方法、及びプログラムに関する。 The present invention relates to an information processing device, an information processing method, and a program.

スマートフォン、タブレット端末などの携帯機器にもWebブラウザが搭載され、携帯機器でのWebブラウザを用いたWebページの閲覧が一般的に行われている。ユーザがWebブラウザに対してWebページのURLを指定すると、Webブラウザは指定されたURLにアクセスしてHTML文書等のWebコンテンツを取得し、Webページを表示する。HTML文書の描画結果はWebブラウザの表示領域を超えるサイズになることもある。その場合、スマートフォンやタブレットのWebブラウザでは、ドラッグやスワイプ等のユーザ操作によりスクロールすることでWebページの所望の表示範囲を閲覧することができる。 Mobile devices such as smartphones and tablet terminals are also equipped with web browsers, and it is common to view web pages using the web browsers on mobile devices. When a user specifies the URL of a web page to the web browser, the web browser accesses the specified URL, obtains web content such as an HTML document, and displays the web page. The resulting HTML document may be larger than the display area of the web browser. In such cases, the web browser on the smartphone or tablet allows the user to scroll by dragging, swiping, or other user operations to view the desired display range of the web page.

しかし、ドラッグやスワイプをする位置によってはWebページのスクロールが実行されない場合がある。Webページは“iframe”、“img”、“canvas”等のタグにより、他のHTML文書、画像、図形等を埋め込んで表示し、JavaScript(登録商標)でそのコンテンツに対するユーザ操作を規定することができる。本明細書では、これらのコンテンツを、ベースになるHTML文書に対する内部コンテンツとも呼ぶ。ドラッグやスワイプに対する動作を規定している内部コンテンツの表示領域でドラッグやスワイプをすると、Webページに対する操作ではなく内部コンテンツに対する操作として認識される。例えば、地図を提供する外部サイトが内部コンテンツとしてHTML文書に埋め込まれている場合、地図上でスワイプやドラッグをするとWebページのスクロールは実行されずに、地図上の表示位置を変える処理になる。 However, depending on the position where the drag or swipe is performed, the web page may not scroll. A web page can display other HTML documents, images, figures, etc. embedded using tags such as "iframe", "img", and "canvas", and user operations on that content can be specified using JavaScript (registered trademark). In this specification, these contents are also referred to as internal content for the base HTML document. When dragging or swiping is performed in the display area of the internal content that specifies the actions for dragging or swiping, it is recognized as an operation on the internal content, not an operation on the web page. For example, if an external site that provides a map is embedded in the HTML document as internal content, swiping or dragging on the map will not scroll the web page, but will result in a process of changing the display position on the map.

内部コンテンツがWebブラウザの表示領域の大部分を占める場合、Webページのスクロールが困難になることがある。ドラッグによってスクロールする場合、ドラッグを離した位置にWebページをスクロールさせるための領域がある。しかし、慣性スクロールのように、ユーザの指が離れてもスクロールが継続する場合、スクロール後のWebブラウザの表示領域が内部コンテンツにより覆われる状態になることがあった。この状態におけるスワイプやドラッグは内部コンテンツへの操作として扱われるため、Webページのスクロールが困難になる。それに対する方法として、Webページ上の内部コンテンツの操作を無効化し、内部コンテンツは別画面、例えばブラウザの別タブで表示して内部コンテンツの操作は別タブの方で受け付けるという技術が提案されている(特許文献1)。 When the internal content occupies most of the display area of the web browser, it can become difficult to scroll the web page. When scrolling by dragging, there is an area for scrolling the web page to the position where the drag is released. However, when scrolling continues even after the user's finger is released, as in inertial scrolling, the display area of the web browser after scrolling can become covered by the internal content. In this state, swiping or dragging is treated as an operation on the internal content, making it difficult to scroll the web page. As a solution to this problem, a technology has been proposed that disables operations on the internal content on the web page and displays the internal content on a separate screen, for example, in a separate tab of the browser, and accepts operations on the internal content in the separate tab (Patent Document 1).

国際公開第2018/025316号International Publication No. 2018/025316

しかしながら、特許文献1に記載の技術のように内部コンテンツを別タブで表示すると、1つのWebページを複数のタブで扱うことにより、ユーザの利便性が低下することがある。例えば、ユーザが複数のタブを切り替える操作が増えたり、タブの数に制限があり上限数利用している場合には既に別のWebページを表示していたタブの表示が内部コンテンツ表示で更新されてしまったりする。 However, when internal content is displayed in a separate tab as in the technology described in Patent Document 1, handling one web page in multiple tabs can reduce user convenience. For example, the user may have to switch between multiple tabs more frequently, or if there is a limit to the number of tabs and the upper limit is being used, the display of a tab that was already displaying a different web page may be updated to display the internal content.

本発明は、このような事情に鑑みてなされたものであり、ユーザの利便性を低下させることなく、ユーザがWebページをスクロール可能なようにWebページを表示できるようにすることを目的とする。 The present invention has been made in consideration of these circumstances, and aims to enable a user to display a web page in a manner that allows the user to scroll the web page without reducing user convenience.

本発明に係る情報処理装置は、指示操作の入力を受付けるコンテンツを有するWebページを、タッチ操作により指示操作の入力を受付ける表示部に表示させる表示制御手段と、前記Webページの前記コンテンツを含む領域を前記表示部に表示させる場合、前記コンテンツを示す領域とは異なり、該Webページをスクロールするための操作領域を所定以上のサイズとするよう前記表示部における前記Webページの表示を制御する制御手段と、前記Webページのユーザ操作に応じた前記表示部における表示領域であって、前記Webページの第1の表示領域が所定の条件を満たすか否かを判定する判定手段とを有し、前記判定手段は、前記第1の表示領域における前記コンテンツを示す領域に基づいて、前記第1の表示領域において前記操作領域が所定以上のサイズとなるか否かを判定し、前記制御手段は、前記第1の表示領域では前記操作領域が前記所定以上のサイズにならない場合、前記所定以上のサイズの前記操作領域を含む第2の表示領域で前記Webページを表示するよう制御することを特徴とする。 The information processing device of the present invention comprises a display control means for displaying a web page having content that accepts input of instruction operations on a display unit that accepts input of instruction operations by touch operations, a control means for controlling the display of the web page on the display unit so that, when an area including the content of the web page is displayed on the display unit, an operation area for scrolling the web page is a predetermined size or larger, different from the area showing the content, and a determination means for determining whether a first display area of the web page, which is a display area on the display unit in response to a user operation of the web page, satisfies a predetermined condition, wherein the determination means determines whether the operation area in the first display area will be a predetermined size or larger based on the area showing the content in the first display area, and the control means controls to display the web page in a second display area including the operation area of the predetermined size or larger if the operation area in the first display area does not have the predetermined size or larger .

本発明によれば、ユーザの利便性を低下させることなく、ユーザがWebページをスクロール可能なようにWebページを表示することができる。 According to the present invention, a web page can be displayed so that the user can scroll the web page without reducing user convenience.

情報処理装置のハードウェア構成例を示す図である。FIG. 2 is a diagram illustrating an example of a hardware configuration of an information processing device. 情報処理装置の機能構成例を示す図である。FIG. 2 is a diagram illustrating an example of a functional configuration of an information processing device. Webブラウザの描画処理を説明する図である。FIG. 2 is a diagram illustrating a drawing process of a web browser. Webコンテンツの例を示す図である。FIG. 1 is a diagram illustrating an example of Web content. 描画結果とWebブラウザの表示領域の例を説明する図である。11A and 11B are diagrams illustrating an example of a rendering result and a display area of a Web browser. 描画結果とWebブラウザの表示領域の例を説明する図である。11A and 11B are diagrams illustrating an example of a rendering result and a display area of a Web browser. 描画結果とWebブラウザの表示領域の例を説明する図である。11A and 11B are diagrams illustrating an example of a rendering result and a display area of a Web browser. 描画結果とWebブラウザの表示領域の座標系を説明する図である。11A and 11B are diagrams illustrating a coordinate system of a rendering result and a display area of a Web browser. 情報処理装置の処理例を示すフローチャートである。13 is a flowchart illustrating an example of processing by the information processing device.

以下、本発明の実施形態を図面に基づいて説明する。なお、以下に説明する実施形態は、特許請求の範囲に関わる本発明を限定するものではなく、また、本実施形態で説明されている特徴の組み合わせてのすべてが本発明の解決手段に必須のものとは限らない。なお、同一な構成については、同じ符号を付して説明する。 The following describes an embodiment of the present invention with reference to the drawings. Note that the embodiment described below does not limit the present invention as it relates to the scope of the claims, and not all of the combinations of features described in the present embodiment are necessarily essential to the solution of the present invention. Note that the same components are described with the same reference numerals.

図1は、本発明の一実施形態における情報処理装置のハードウェア構成例を示すブロック図である。本実施形態における情報処理装置100は、コントローラ部110、操作部120、表示部130、記憶部140、及び通信部150を有する。 FIG. 1 is a block diagram showing an example of the hardware configuration of an information processing device according to one embodiment of the present invention. The information processing device 100 according to this embodiment has a controller unit 110, an operation unit 120, a display unit 130, a storage unit 140, and a communication unit 150.

コントローラ部110は、情報処理装置全体の制御を司る。コントローラ部110は、CPU(Central Processing Unit)111、ROM(Read Only Memory)112、及びRAM(Random Access Memory)113を有する。CPU111は、情報処理装置100における各処理部の処理を実行する。ROM112には、CPU111が実行する各種プログラムや、プログラムを実行する際に必要とするデータ等が記憶されている。RAM113は、例えばSRAM、DRAM等で構成され、プログラム制御変数等を格納するためのものである。また、各種ワーク用バッファもRAM113に格納される。 The controller unit 110 controls the entire information processing device. The controller unit 110 has a CPU (Central Processing Unit) 111, a ROM (Read Only Memory) 112, and a RAM (Random Access Memory) 113. The CPU 111 executes the processing of each processing unit in the information processing device 100. The ROM 112 stores various programs executed by the CPU 111 and data required when executing the programs. The RAM 113 is composed of, for example, an SRAM, a DRAM, etc., and is used to store program control variables, etc. Various work buffers are also stored in the RAM 113.

操作部120は、キーボード、タッチパネル、マウス等で構成され、ユーザが各種入力操作を行うためのものである。表示部130は、LCD、LEDディスプレイ等でユーザに表示通知するためのものである。記憶部140は、ハードディスク等で構成され、文書や画像等のファイルデータを格納するためのものである。通信部150は、ネットワークに接続するためのインタフェースである。接続方法としてはLAN、無線LAN等がある。 The operation unit 120 is made up of a keyboard, touch panel, mouse, etc., and allows the user to perform various input operations. The display unit 130 is used to display and notify the user using an LCD, LED display, etc. The storage unit 140 is made up of a hard disk, etc., and is used to store file data such as documents and images. The communication unit 150 is an interface for connecting to a network. Connection methods include LAN, wireless LAN, etc.

本実施形態における情報処理装置100は、例えばURL(Uniform Resource Locator)で指定されたWebページにアクセスし、Webコンテンツを取得、解釈して描画するWebブラウザのプログラムを実行する。Webコンテンツは、HTML文書(HTMLファイル)、JavaScript(登録商標)、CSSスタイルシート等を含む。WebブラウザのプログラムはROM112もしくは記憶部140に格納され、RAM113に読み出してCPU111が処理を実行する。Webブラウザを構成するGUIやWebコンテンツは表示部130に描画され、操作部120からの入力に伴いユーザからの指示を受付ける。ネットワーク経由でWebコンテンツを取得する場合、通信部150を介して処理される。 In this embodiment, the information processing device 100 executes a web browser program that accesses a web page specified by, for example, a uniform resource locator (URL) and acquires, interprets, and renders web content. The web content includes HTML documents (HTML files), JavaScript (registered trademark), CSS style sheets, and the like. The web browser program is stored in the ROM 112 or the storage unit 140, and is read into the RAM 113 and processed by the CPU 111. The GUI and web content that constitute the web browser are rendered on the display unit 130, and accepts instructions from the user along with input from the operation unit 120. When web content is acquired via a network, it is processed via the communication unit 150.

図2は、本実施形態における情報処理装置100の機能構成例を模式的に示すブロック図である。情報処理装置100は、表示制御部201、判定部202、及び制御部203を有する。なお、各部はROM112に保存されたプログラムによって制御される。 FIG. 2 is a block diagram showing a schematic example of the functional configuration of the information processing device 100 in this embodiment. The information processing device 100 has a display control unit 201, a determination unit 202, and a control unit 203. Each unit is controlled by a program stored in the ROM 112.

表示制御部201は、Webページを表示部130に表示する処理を行う。表示制御部201は、操作部120の入力により指定されたURLに通信部150を介してアクセスして得られた、HTML文書、CSSスタイルシート、JavaScript等のWebコンテンツから描画結果を生成してWebブラウザに表示する。図3に、Webブラウザがコンテンツを解析する流れを示す。HTMLパーサ302は、HTML文書301の構文解析を行い、DOMツリー303を生成する。CSSパーサ305は、CSSスタイルシート304の構文解析を行い、HTML文書301の装飾情報であるスタイルルールをツリー表現したCSSOMツリー306を生成する。次に、DOMツリー303とCSSOMツリー306をもとにDOMツリー303に視覚的な表現を取り入れたレンダーツリー307を生成する。そして、レンダーツリー307の描画情報をもとに、各HTML文書に含まれるコンテンツの配置を決定するレイアウト処理308を行う。次に、レイアウト処理308を行ったレンダーツリー307を、Webブラウザの画面表示に用いるバッファ領域であるサーフェスに描画することによって、描画結果(Webページ)を表示する(描画309)。また、表示制御部201は、Webページの表示において、HTML文書が含む各要素の描画位置の座標を管理する。 The display control unit 201 performs processing to display a Web page on the display unit 130. The display control unit 201 accesses the URL specified by input from the operation unit 120 via the communication unit 150, and generates a rendering result from Web content such as an HTML document, a CSS style sheet, and JavaScript, and displays it on the Web browser. Figure 3 shows the flow of the Web browser analyzing the content. The HTML parser 302 performs syntax analysis of the HTML document 301 and generates a DOM tree 303. The CSS parser 305 performs syntax analysis of the CSS style sheet 304 and generates a CSSOM tree 306 that represents the style rules, which are the decorative information of the HTML document 301, in a tree format. Next, a render tree 307 is generated based on the DOM tree 303 and the CSSOM tree 306, incorporating visual expressions into the DOM tree 303. Then, a layout process 308 is performed to determine the layout of the content included in each HTML document based on the drawing information of the render tree 307. Next, the render tree 307 that has been subjected to the layout process 308 is drawn on a surface that is a buffer area used for screen display of the web browser, thereby displaying the drawing result (web page) (drawing 309). Furthermore, the display control unit 201 manages the coordinates of the drawing position of each element included in the HTML document when displaying the web page.

また、表示制御部201は、描画結果の表示領域の制御を行う。表示制御部201は、操作部120であるタッチパネルからWebページに対するドラッグの入力があると、ドラッグした方向及び移動量に従って、Webブラウザに表示する描画結果の表示領域を変更する。また、表示制御部201は、操作部120からの入力がスワイプである場合には、ユーザによるタッチパネルへの接触(タッチ)が離れた後もスクロールが続くように描画結果の表示領域を変更する。表示制御部201は、スワイプの操作速度を取得して、速度に応じて表示領域をスワイプ方向に逐次変更し、徐々に表示領域の移動量を少なくしていき、最終的に移動量を0にして表示領域を決定する。 The display control unit 201 also controls the display area of the drawing result. When a drag input is received from the touch panel of the operation unit 120 on the web page, the display control unit 201 changes the display area of the drawing result displayed in the web browser according to the drag direction and movement amount. When the input from the operation unit 120 is a swipe, the display control unit 201 changes the display area of the drawing result so that scrolling continues even after the user releases contact (touch) with the touch panel. The display control unit 201 acquires the operation speed of the swipe, and sequentially changes the display area in the swipe direction according to the speed, gradually reducing the amount of movement of the display area, and finally sets the amount of movement to 0 to determine the display area.

判定部202は、表示制御部201が決定しようとする表示領域内にWebページをスクロールするための操作領域が所定以上のサイズで含まれているか否かを判定する。Webページをスクロールするための操作領域とは、Webページをスクロールするための操作、ここではドラックやスワイプに対してJavaScript等でWebページのスクロール以外の別の処理が割り当てられていない領域のことである。別の処理が割り当てられている部分でドラッグやスワイプをしてもWebページのスクロールは発生しない。判定部202は、Webページをスクロールするための操作領域を所定以上含んでいる場合、その表示位置に表示領域を決定すると判定する。また、判定部202は、Webページをスクロールするための操作領域が所定サイズよりも小さい場合、表示領域の変更が必要であると判定する。 The determination unit 202 determines whether the display area to be determined by the display control unit 201 includes an operation area for scrolling a web page of a predetermined size or more. The operation area for scrolling a web page refers to an area to which no other processing other than scrolling a web page is assigned by JavaScript or the like for operations for scrolling a web page, in this case dragging or swiping. Dragging or swiping in an area to which another processing is assigned does not cause scrolling of the web page. If the determination unit 202 includes an operation area for scrolling a web page of a predetermined size or more, it determines that the display area should be determined at that display position. Furthermore, if the operation area for scrolling a web page is smaller than the predetermined size, the determination unit 202 determines that a change of the display area is necessary.

制御部203は、判定部202が表示領域の変更が必要であると判定した場合に、表示領域にWebページをスクロールするための操作領域を所定以上含むように表示領域を変更する、移動方向及び移動量を算出する。算出された移動方向及び移動量は、表示制御部201に伝達され、表示制御部201は、指定された移動方向及び移動量をもとにして、描画結果中の表示領域を変更する。 When the determination unit 202 determines that the display area needs to be changed, the control unit 203 calculates a direction and amount of movement to change the display area so that the display area includes a predetermined or larger operation area for scrolling the web page. The calculated direction and amount of movement are transmitted to the display control unit 201, and the display control unit 201 changes the display area in the drawing result based on the specified direction and amount of movement.

図4は、Webブラウザが読み込むWebコンテンツの例を示す図である。図4(A)はHTML文書の例を示し、図4(B)はCSSスタイルシートの例を示し、図4(C)はJavaScriptの例を示している。 Figure 4 shows examples of web content that a web browser loads. Figure 4(A) shows an example of an HTML document, Figure 4(B) shows an example of a CSS style sheet, and Figure 4(C) shows an example of JavaScript.

図4(A)に示すHTML文書400は、HTMLの見出しの要素である<h1>要素、<h2>要素、箇条書きを示す<li>要素(401)、内部コンテンツとして<canvas>要素(402)、及び<iframe>要素(403)を有する例である。内部コンテンツの<canvas>要素(402)、及び<iframe>要素(403)は指示操作の入力を受付けるコンテンツの一例である。<canvas>要素(402)は、後述する図4(C)に示すJavaScriptで動作を規定されている。<iframe>要素(403)は、src属性で指定されたコンテンツをWebページに埋め込んで表示する。本例では、外部の地図サービスが提供する地図を埋め込んで表示している例とする。地図を提供するWebサービスは一般的に存在し、そのような地図サービスでは指定した地図の範囲を他のWebサイトで埋め込み表示できるようにしている。指定した地域を表示するためのHTML要素をWebページに含ませることで、外部の地図サービスが提供する地図をWebページに埋め込むことができる。<iframe>要素や<script>要素などで埋め込む。ここでは、<iframe>要素(403)で地図の表示を埋め込むものとする。Webブラウザで表示された地図上でスワイプすると表示している地図の緯度や経度を変更することができ、ピンチイン、ピンチアウトで地図の拡大/縮小の操作をすることができる。 The HTML document 400 shown in FIG. 4A is an example having an <h1> element, an <h2> element, an <li> element (401) that indicates a bulleted list, and an internal content <canvas> element (402) and an <iframe> element (403). The internal content <canvas> element (402) and <iframe> element (403) are examples of content that accepts input of instruction operations. The operation of the <canvas> element (402) is regulated by JavaScript shown in FIG. 4C, which will be described later. The <iframe> element (403) embeds and displays content specified by the src attribute in a Web page. In this example, a map provided by an external map service is embedded and displayed. Web services that provide maps are common, and such map services allow the specified map range to be embedded and displayed on other Web sites. By including HTML elements for displaying a specified area in a web page, a map provided by an external map service can be embedded in the web page. The embedding is done using the <iframe> element, <script> element, etc. In this example, the map display is embedded using the <iframe> element (403). By swiping on the map displayed in the web browser, the latitude and longitude of the displayed map can be changed, and by pinching in and out, the map can be zoomed in and out.

図4(B)に示すCSSスタイルシート410は、<h1>要素に対する装飾を示しており、横幅300px(ピクセル)、高さ50pxの矩形を3pxの破線で囲んだ矩形で装飾することを示している。 The CSS style sheet 410 shown in Figure 4 (B) shows the decoration for the <h1> element, indicating that a rectangle 300px (pixels) wide and 50px high is to be decorated with a rectangle surrounded by a dashed line of 3px.

図4(C)に示すJavaScript420は、HTML文書400に含まれている<canvas>要素(402)に対する動作を規定したJavaScriptの例である。window.onloadに対する関数(421)、touchstartイベントに対する関数(422)、touchmoveイベントに対する関数(423)、touchendイベントに対する関数(424)を定義している。touchstartイベントは、操作部120及び表示部130として機能し、タッチ操作により指示操作の入力を受付けるタッチパネル上で、動作を規定する領域に対してユーザの指等の接触が開始されたときに発生するイベントである。また、touchmoveイベントは、操作部120及び表示部130として機能し、タッチ操作により指示操作の入力を受付けるタッチパネル上で、動作を規定する領域に対してユーザの指等が接触中に発生するイベントである。touchendイベントは、操作部120及び表示部130として機能し、タッチ操作により指示操作の入力を受付けるタッチパネル上で、動作を規定する領域に対してユーザの指等の接触が終了されたときに発生するイベントである。 JavaScript 420 shown in FIG. 4C is an example of JavaScript that specifies the operation for the <canvas> element (402) included in the HTML document 400. It defines a function (421) for window.onload, a function (422) for the touchstart event, a function (423) for the touchmove event, and a function (424) for the touchend event. The touchstart event is an event that occurs when the user's finger or the like starts to contact an area that specifies the operation on a touch panel that functions as the operation unit 120 and the display unit 130 and accepts input of instruction operations by touch operations. The touchmove event is an event that occurs while the user's finger or the like is in contact with an area that specifies the operation on a touch panel that functions as the operation unit 120 and the display unit 130 and accepts input of instruction operations by touch operations. The touchend event is an event that occurs when the user's finger or the like stops touching an area that defines an operation on a touch panel that functions as the operation unit 120 and the display unit 130 and accepts instruction operation input by touch operation.

window.onloadに対する関数(421)では、idが“canvas1”である<canvas>要素において各操作が発生した場合に実行する関数をaddEventListener登録している。この例では、touchstart、touchmove、touchendに対応する操作が発生した場合に実行する関数をaddEventListener登録している。また、<canvas>要素の領域に描画するための2次元コンテキストを取得している。スワイプやドラッグが行われると、touchstart、touchmove、touchendなどのイベントが発行される。そのため、<canvas>要素の描画領域でユーザがスワイプやドラッグを行うと、<canvas>要素をターゲットにしてイベントが発行され、各イベントに対する関数が呼び出されて、関数に定義された処理が実行される。 In the function (421) for window.onload, the function to be executed when each operation occurs in the <canvas> element with id "canvas1" is registered in addEventListener. In this example, the function to be executed when the operations corresponding to touchstart, touchmove, and touchend occur is registered in addEventListener. In addition, a two-dimensional context for drawing in the area of the <canvas> element is obtained. When a swipe or drag is performed, events such as touchstart, touchmove, and touchend are issued. Therefore, when a user swipes or drags in the drawing area of the <canvas> element, an event is issued with the <canvas> element as the target, a function for each event is called, and the processing defined in the function is executed.

touchstartイベントに対する関数(422)では、touchstartが発生した座標の取得と、touchstartした状態を保存するためのフラグ(flag)へtrueを代入している。 The function (422) for the touchstart event gets the coordinates where touchstart occurred and assigns true to a flag to save the touchstart state.

touchmoveイベントに対する関数(423)では、2次元コンテキスト内の座標としてtouchmoveの座標を取得する。そして、moveTo、lineTo、strokeの各関数にて、touchstartした座標もしくは、前回touchmoveした座標との間に線を描いている。 The function (423) for the touchmove event obtains the coordinates of the touchmove as coordinates in the 2D context. Then, the moveTo, lineTo, and stroke functions draw a line between the touchstart coordinates or the previous touchmove coordinates.

touchendイベントに対する関数(424)では、描画が終了したことを保持するため、フラグ(flag)にfalseを代入している。 The function (424) for the touchend event assigns false to the flag to indicate that drawing has finished.

図5は、図4(A)に示したHTML文書400、図4(B)に示したCSSスタイルシート410、及び図4(C)に示したJavaScript420に基づいてWebページを描画した結果を示している。 Figure 5 shows the result of rendering a web page based on the HTML document 400 shown in Figure 4 (A), the CSS style sheet 410 shown in Figure 4 (B), and the JavaScript 420 shown in Figure 4 (C).

500はHTML文書全体を描画した描画結果である。図4(A)に示した<h1>要素、<h2>要素、及び<li>要素(401)を描画した部分が501であり、<h1>要素の「Web page」が図4(B)に示したCSSスタイルシートに従い破線で囲まれた表示になる。<li>で囲まれたテキスト、「Sample1」、「Sample2」は箇条書きとして表示される。502は図4(A)に示した<canvas>要素(402)の描画結果であり、属性値であるwidth及びheightで指定されたサイズで描画されている。503は図4(A)に示した<iframe>要素(403)の描画結果であり、同じく<iframe>要素の属性値であるwidth及びheightで指定されたサイズで描画されている。 500 is the rendering result of rendering the entire HTML document. 501 is the portion where the <h1> element, <h2> element, and <li> element (401) shown in FIG. 4A are rendered, and the <h1> element's "Web page" is displayed surrounded by a dashed line according to the CSS style sheet shown in FIG. 4B. The text surrounded by <li>, "Sample1" and "Sample2", are displayed as bullet points. 502 is the rendering result of the <canvas> element (402) shown in FIG. 4A, which is rendered at a size specified by the attribute values width and height. 503 is the rendering result of the <iframe> element (403) shown in FIG. 4A, which is also rendered at a size specified by the attribute values width and height of the <iframe> element.

領域504は描画結果の中でWebブラウザに表示する領域(ある時点においてユーザが視認可能な表示領域)を示している。描画結果の中で表示する表示範囲は変更可能となっており、表示制御部201は、描画結果内の表示領域504を変更することでWebページのスクロールを表現する。例えば、ユーザが表示領域504にて上方向にスワイプすると、表示制御部201は、スワイプの移動量や加速度に応じて、下方向にスクロールするように表示領域を変更する。例えば、図5(B)に示すように最終的に領域511の位置に表示領域を定めると、<li>要素を描画した箇条書き表示した状態でスクロールが止まったように表現することができる。 Area 504 indicates the area of the drawing result that is displayed in the web browser (the display area that is visible to the user at a certain point in time). The display range displayed in the drawing result is changeable, and the display control unit 201 expresses scrolling of the web page by changing the display area 504 in the drawing result. For example, when the user swipes upward in the display area 504, the display control unit 201 changes the display area so that it scrolls downward according to the amount of movement and acceleration of the swipe. For example, by finally determining the display area to be at the position of area 511 as shown in FIG. 5(B), it is possible to express that the scrolling has stopped with the <li> elements drawn and displayed as bullet points.

表示領域が領域511である場合、<canvas>要素の描画部分502以外の表示領域でスワイプすると、更にスクロールすることができる。しかしながら、<canvas>要素の描画部分502でスワイプをすると、図4(C)に示したJavaScriptで規定されているように線を描画する操作として解釈するためにWebページのスクロールをすることはできない。表示領域が領域512である場合、<canvas>要素の描画部分502の下端から<iframe>要素の描画部分503の上端までの部分にスワイプをする領域があれば、スワイプ等をすることによりWebページをスクロールすることができる。一方で、スワイプする領域がなければ、Webページをスクロールすることができない。同じく、表示領域が領域513である場合、<iframe>要素の描画部分503の下端から表示領域の下端までの部分にスワイプをする領域がなければ、Webページのスクロールができない状態になる。本実施形態では、Webページをスクロールすることができる領域を表示領域に含めて表示することによって、常にユーザがWebページをスクロールできるようにし、Webページのスクロールができない状態になることを回避する。 When the display area is area 511, swiping in a display area other than the drawing part 502 of the <canvas> element allows further scrolling. However, when swiping in the drawing part 502 of the <canvas> element, the web page cannot be scrolled because it is interpreted as an operation to draw a line as specified in the JavaScript shown in FIG. 4C. When the display area is area 512, if there is a swipe area from the bottom end of the drawing part 502 of the <canvas> element to the top end of the drawing part 503 of the <iframe> element, the web page can be scrolled by swiping. On the other hand, if there is no swipe area, the web page cannot be scrolled. Similarly, when the display area is area 513, if there is no swipe area from the bottom end of the drawing part 503 of the <iframe> element to the bottom end of the display area, the web page cannot be scrolled. In this embodiment, the area in which the web page can be scrolled is displayed in the display area, allowing the user to always scroll the web page and avoiding a situation in which the web page cannot be scrolled.

図6は、図5(A)に示した描画結果(Webページ)500において、スクロールした結果として、通常表示される表示領域(図6(A)、図6(C))と本実施形態による最終的な表示領域(図6(B)、図6(D))を説明する図である。 Figure 6 is a diagram illustrating the display area that is normally displayed (Figures 6(A) and 6(C)) and the final display area according to this embodiment (Figures 6(B) and 6(D)) as a result of scrolling the rendering result (web page) 500 shown in Figure 5(A).

図6(A)に示す例において、表示領域601は、ほとんどが<canvas>要素の描画部分502に覆われており、Webページをスクロールすることが困難な状態にある。慣性スクロールした結果、このような表示領域601となって表示されることがある。例えば、図5(A)に示した表示領域504内で上方向にスワイプすると、そのスワイプの速度に応じて慣性スクロールが開始される。そして、最終的に徐々に速度が落ちるように表示領域の変位が小さくなり、スワイプをする領域をほとんど持たない表示領域601で描画結果が表示されることがある。この状態において、更にWebページのスクロールをするのは困難である。<canvas>要素の描画部分502でスワイプをすると、<canvas>要素に割り当てられた別の操作が実行される。本実施形態では、<canvas>要素に対してtouchstart、touchmove、touchendイベントが発行されて<canvas>要素の描画部分502に線を描画する処理が実行される。何度スワイプをしても線を描画する指示にしかならないため、Webページをスクロールするためには<canvas>要素の描画部分502以外の領域でスワイプをする必要がある。しかしながら、表示領域601の上端から<canvas>要素の描画部分502の上端の間の範囲は狭くてスワイプをすることができないため、Webページをスクロールすることができない。 In the example shown in FIG. 6A, most of the display area 601 is covered by the drawing portion 502 of the <canvas> element, making it difficult to scroll the web page. As a result of inertial scrolling, the display area 601 may be displayed as shown above. For example, when swiping upward within the display area 504 shown in FIG. 5A, inertial scrolling is started according to the speed of the swipe. Then, the displacement of the display area may gradually decrease as the speed gradually decreases, and the drawing result may be displayed in the display area 601 with almost no area to swipe. In this state, it is difficult to further scroll the web page. When swiping on the drawing portion 502 of the <canvas> element, another operation assigned to the <canvas> element is executed. In this embodiment, touchstart, touchmove, and touchend events are issued to the <canvas> element, and a process of drawing a line in the drawing portion 502 of the <canvas> element is executed. No matter how many times you swipe, it only results in an instruction to draw a line, so in order to scroll the web page, you need to swipe in an area other than the drawing portion 502 of the <canvas> element. However, the range between the top end of the display area 601 and the top end of the drawing portion 502 of the <canvas> element is too narrow to swipe, so the web page cannot be scrolled.

そこで、本実施形態では、例えばWebページをスクロールするためにスワイプをすることができる領域を含むように表示領域を制御する。情報処理装置100は、Webページのスクロールを停止する位置の表示領域の状態を解析し、表示領域内にWebページに対する操作が行える所定のサイズ(高さ×幅)の領域が存在するか否かを判定する。表示領域内にWebページに対する操作が行える所定のサイズ(高さ×幅)の領域が存在しないと判定した場合、Webページをスクロールするためにスワイプできる所定のサイズの領域が確保される位置に表示領域を補正する。 Therefore, in this embodiment, the display area is controlled to include an area where, for example, a swipe can be used to scroll a web page. The information processing device 100 analyzes the state of the display area at the position where scrolling of the web page is to be stopped, and determines whether or not an area of a predetermined size (height x width) where operations on the web page can be performed exists within the display area. If it is determined that an area of a predetermined size (height x width) where operations on the web page can be performed does not exist within the display area, the display area is corrected to a position where an area of a predetermined size that can be swiped to scroll the web page is secured.

図6(A)に示した例の場合、情報処理装置100は、表示領域を上方または下方に移動することにより<canvas>要素の描画部分502の上部または下部にWebページをスワイプする領域を含んだ状態にすることができる。少ない補正量でWebページをスワイプする領域を確保するのであれば、図6(B)に示すように表示領域602を上方に補正し、<canvas>要素の描画部分502の上部にWebページをスワイプ可能な領域が含まれる位置に表示領域を決定する。また、図6(C)に示すように表示領域603の位置で慣性スクロールが停止しようとした場合、表示領域を下方に補正した方が表示領域の補正量は少ない。そのため、情報処理装置100は、図6(D)に示すように表示領域604を下方に補正し、<canvas>要素の描画部分502の下部にWebページをスワイプ可能な領域が含まれる位置に表示領域を決定する。このように、Webページをスワイプする領域を含む表示領域になるように制御することで、ユーザがWebページを常にスクロール可能にし、Webページのスクロールができない状態になることを回避することができる。 In the example shown in FIG. 6(A), the information processing device 100 can move the display area upward or downward to include an area for swiping the web page at the top or bottom of the drawing part 502 of the <canvas> element. If the area for swiping the web page is to be secured with a small correction amount, the display area 602 is corrected upward as shown in FIG. 6(B), and the display area is determined to be at a position where the area where the web page can be swiped is included at the top of the drawing part 502 of the <canvas> element. Also, when the inertial scrolling is about to stop at the position of the display area 603 as shown in FIG. 6(C), the correction amount of the display area is smaller when the display area is corrected downward. Therefore, the information processing device 100 corrects the display area 604 downward as shown in FIG. 6(D), and determines the display area to be at a position where the area where the web page can be swiped is included at the bottom of the drawing part 502 of the <canvas> element. In this way, by controlling the display area of the web page to include the area to be swiped, the user can always scroll the web page, and it is possible to avoid a situation where the web page cannot be scrolled.

なお、表示領域の補正は、一旦、通常の慣性スクロールが停止する位置を表示した後に行ってもいいし、慣性スクロール中にスクロールが停止する位置を予測し、最終的に補正後の表示領域でスクロールが停止するように見せてもよい。一旦、慣性スクロールが停止した後、算出した補正量に基づき表示領域を補正すれば、ユーザが見た目に表示領域の補正がなされたことが分かるようになる。一方、慣性スクロール中に、通常の慣性スクロールが停止するときの表示領域の位置、及びそれに基づく補正量を算出し、補正量を加味した位置にスクロールを停止したときの表示領域を決定すれば、補正をユーザに感じさせないような表示にすることができる。 The display area may be corrected after the position where normal inertial scrolling would stop is displayed, or the position where scrolling will stop during inertial scrolling may be predicted and the scrolling may finally appear to stop at the corrected display area. If the display area is corrected based on the calculated correction amount once inertial scrolling has stopped, the user will be able to see that the display area has been corrected. On the other hand, if the position of the display area when normal inertial scrolling stops during inertial scrolling and the correction amount based on this are calculated, and the display area when scrolling stops at a position taking the correction amount into account is determined, a display can be created that does not make the correction noticeable to the user.

図7は、表示領域が<canvas>要素、<iframe>要素の2つの描画結果を含み、それら要素の描画部分の間にWebページをスワイプ可能な領域がない例を示している。図7(A)は慣性スクロールが通常停止する表示領域を示している。図7(B)及び図7(C)はWebページをスクロールするためのスワイプ可能な領域を確保するように補正した表示領域の例を示している。 Figure 7 shows an example where the display area includes two rendering results, a <canvas> element and an <iframe> element, and there is no area between the rendering parts of these elements where a web page can be swiped. Figure 7(A) shows the display area where inertial scrolling normally stops. Figures 7(B) and 7(C) show examples of a display area that has been corrected to ensure a swipeable area for scrolling a web page.

700はHTML文書全体を描画した描画結果である。701は、図4(A)に示した<h1>要素、<h2>要素、及び<li>要素の描画部分である。図7(A)において、表示領域704は、<canvas>要素の描画部分702と<iframe>要素の描画部分703で広く覆われている。この表示領域704でスワイプをすると、<canvas>要素や<iframe>要素に割り当てられた、線の描画や地図の移動等の処理が行われる。Webページのスクロールをするには、<canvas>要素の描画部分702や<iframe>要素の描画部分703ではない領域が必要である。しなしながら、<canvas>要素の描画部分702と<iframe>要素の描画部分703との間にWebページをスクロールするための十分な領域、言い換えればユーザ操作がWebページに対する操作として扱われる領域が含まれていない。そのため、図7(A)に示す表示領域704となった場合、Webページをスクロールすることができない状態になる。 700 is the rendering result of rendering the entire HTML document. 701 is the rendering portion of the <h1> element, <h2> element, and <li> element shown in FIG. 4(A). In FIG. 7(A), the display area 704 is largely covered by the rendering portion 702 of the <canvas> element and the rendering portion 703 of the <iframe> element. When this display area 704 is swiped, processing such as drawing a line and moving the map assigned to the <canvas> element and <iframe> element is performed. To scroll a web page, an area other than the rendering portion 702 of the <canvas> element and the rendering portion 703 of the <iframe> element is required. However, there is not enough space between the drawing area 702 of the <canvas> element and the drawing area 703 of the <iframe> element to scroll the web page; in other words, there is no space in which user operations are treated as operations on the web page. Therefore, when the display area 704 shown in FIG. 7A appears, the web page cannot be scrolled.

その状態を回避するため、本実施形態では、例えば図7(B)に示す表示領域711や表示領域712の位置に表示領域を補正することにより、Webページをスクロールするためのスワイプ可能な領域を確保する。情報処理装置100は、慣性スクロールが通常停止する表示領域、この例の場合には表示領域704に、Webページのスクロールを指示するスワイプ領域がないと判断した場合、表示領域702や表示領域703の位置に補正する。 To avoid this state, in this embodiment, a swipeable area for scrolling the web page is secured by correcting the display area to the position of display area 711 or display area 712 shown in FIG. 7B. If the information processing device 100 determines that there is no swipe area for instructing web page scrolling in the display area where inertial scrolling normally stops, in this example, display area 704, then it corrects the position to display area 702 or display area 703.

表示領域711は、<canvas>要素の描画部分702の上端から上方の位置に、Webページをスワイプするための所定のサイズの領域が確保されるように表示領域を補正している例である。また、表示領域712は、<iframe>要素の描画部分703の下端より下方の位置に、Webページをスワイプするための所定サイズの領域が確保されるように表示領域を補正している例である。 Display area 711 is an example of a display area corrected so that an area of a specified size for swiping a web page is secured above the top end of the drawing portion 702 of the <canvas> element. Display area 712 is an example of a display area corrected so that an area of a specified size for swiping a web page is secured below the bottom end of the drawing portion 703 of the <iframe> element.

表示領域711に補正するか、表示領域712に補正するかは、慣性スクロールが通常停止するはずであった表示領域704からの補正量に基づいて判断してもよい。本来停止する位置からの距離が小さい方がユーザにとっては自然に見えるため、例えば、表示領域704を表示領域711や表示領域712の位置に移動する補正量を算出して、補正量が小さい方に表示領域を補正する。また、事前に行ったスクロール方向を優先して補正する表示領域を決定してもよい。慣性スクロールが一旦、表示領域704で停止し、その後、表示領域を補正した位置にずらすようにユーザに見せる場合、スクロールが進む方向に補正した方がユーザにとって自然に見えるため、表示領域712の位置に表示領域を補正する。 Whether to correct to display area 711 or display area 712 may be determined based on the amount of correction from display area 704 where the inertial scrolling would normally stop. Since a smaller distance from the original stopping position appears more natural to the user, for example, the correction amount for moving display area 704 to the position of display area 711 or display area 712 is calculated, and the display area is corrected to the position with the smaller correction amount. Also, the display area to be corrected may be determined by giving priority to the scroll direction performed in advance. If the inertial scrolling is temporarily stopped in display area 704 and then the display area is to be shown to the user as being shifted to the corrected position, the correction in the direction of the scroll will appear more natural to the user, so the display area is corrected to the position of display area 712.

図7(C)は、<canvas>要素の描画部分702と<iframe>要素の描画部分703との間にWebページをスクロールするためのスワイプ可能な領域を確保するように描画結果を変更する例を示している。<iframe>要素の描画部分703の開始位置を下方にずらした描画結果と、表示領域721を表している。図7(B)に示した、表示領域704を表示領域711や表示領域712の位置に表示領域を補正する場合、補正量が大きくなる。または、内部コンテンツが複数個、隙間を空けずに表示されるようなWebコンテンツである場合、描画結果において上端及び下端に表示される内部コンテンツ以外の内部コンテンツは表示できないことになる。例えば、埋め込み地図を示す<iframe>要素が10個、隙間を空けずに縦方向に配置されたWebコンテンツがあったとする。慣性スクロールで通常停止したときの表示領域が5番目と6番目の地図にまたがった表示領域になるとき、表示領域の移動による補正では、表示領域は1番目の地図とその上方を含む領域、もしくは、10番目の地図とその下方を含む領域に補正されることになる。そのため、最終的な表示領域がその他の地図を含む位置になることがない。 Figure 7 (C) shows an example of changing the drawing result so as to secure a swipeable area for scrolling a Web page between the drawing part 702 of the <canvas> element and the drawing part 703 of the <iframe> element. The drawing result in which the start position of the drawing part 703 of the <iframe> element is shifted downward and the display area 721 are shown. When the display area 704 shown in Figure 7 (B) is corrected to the position of the display area 711 or the display area 712, the amount of correction becomes large. Alternatively, in the case of Web content in which multiple internal contents are displayed without gaps, the internal contents other than the internal contents displayed at the top and bottom ends in the drawing result cannot be displayed. For example, suppose there is Web content in which 10 <iframe> elements showing embedded maps are arranged vertically without gaps. When the display area when inertial scrolling normally stops is a display area that spans the fifth and sixth maps, the display area is corrected by moving the display area to include the first map and the area above it, or the tenth map and the area below it. Therefore, the final display area will not be in a position that includes other maps.

このような場合には、情報処理装置100は、表示領域内にWebページをスクロールするためのスワイプ可能な領域を有するように再描画して描画結果を作り直して表示領域を決定する。例えば、表示領域704に存在する、<canvas>要素及び<iframe>要素の描画部分702、703以外の領域を広げた描画結果を再描画で作成する。具体的には、情報処理装置100は、<canvas>要素の描画部分702と<iframe>要素の描画部分703との間の領域にWebページをスワイプするための所定サイズの領域を有するようにHTML文書を変更して再描画を行う。Webページをスワイプするために必要なサイズをもとに、<canvas>要素の描画部分702と<iframe>要素の描画部分703との間に不足している領域サイズを算出する。そして、そのサイズの領域を表示するための要素、例えば、<div style="margin-top:算出サイズ;"></div>を<canvas>要素と<iframe>要素との間に挿入したHTML文書をもとに描画結果を作成する。そして、新しく作成した描画結果に対して、表示領域704と同じ座標に表示領域を決定する。これにより、図7(C)に示すように<canvas>要素の描画部分702と<iframe>要素の描画部分703との間に、Webページをスクロールするためのスワイプ可能な領域をもつ表示領域721となる。 In such a case, the information processing device 100 redraws the display area so that it has a swipeable area for scrolling the web page, recreates the drawing result, and determines the display area. For example, the information processing device 100 redraws the display area 704 to create a drawing result in which the area other than the drawing parts 702 and 703 of the <canvas> element and the <iframe> element that exist in the display area 704 is expanded. Specifically, the information processing device 100 changes the HTML document and redraws it so that the area between the drawing part 702 of the <canvas> element and the drawing part 703 of the <iframe> element has an area of a predetermined size for swiping the web page. Based on the size required for swiping the web page, the size of the area that is insufficient between the drawing part 702 of the <canvas> element and the drawing part 703 of the <iframe> element is calculated. Then, a drawing result is created based on an HTML document in which an element for displaying an area of that size, for example, <div style="margin-top:calculated size;"></div>, is inserted between the <canvas> element and the <iframe> element. Then, for the newly created drawing result, a display area is determined to be at the same coordinates as display area 704. As a result, as shown in FIG. 7C, display area 721 is created between drawing portion 702 of the <canvas> element and drawing portion 703 of the <iframe> element, with a swipeable area for scrolling the web page.

図8は、Webページの描画結果、表示領域、内部コンテンツの座標を説明する図である。Webページの描画結果に1つの内部コンテンツが含まれている様子を示している。図8において、801は幅Wp、高さHpを持つWebページの描画結果である。802は、幅Wd、高さHdを持つ表示領域である。表示領域802は、描画結果801の左上端を原点として右方向及び下方向をそれぞれx座標及びy座標の正とする座標系において、矩形の左上端を(xd,yd)、右下端を(xd+Wd,yd+Hd)で位置を表現する。803は、幅Wc、高さHcを持つ内部コンテンツである。内部コンテンツ803は、表示領域802の左上端を原点として右方向及び下方向をそれぞれx座標及びy座標の正とする座標系において、矩形の左上端を(xc,yc)、右下端を(xc+Wc,yc+Hc)で位置を表現する。また、描画結果中の表示領域802の移動を表現する際、x方向の移動量をdx、y方向の移動量をdyで表す。そして、Webページをスクロールするために最低限必要となる領域である矩形804の幅をWs、高さをHsとする。以後、この座標系を用いて表示領域の補正について説明する。 FIG. 8 is a diagram for explaining the coordinates of the rendering result, display area, and internal contents of a Web page. It shows a state in which one internal content is included in the rendering result of a Web page. In FIG. 8, 801 is the rendering result of a Web page having a width Wp and a height Hp . 802 is a display area having a width Wd and a height Hd . In the display area 802, the position of the upper left end of the rectangle is expressed as ( xd , yd ) and the lower right end as (xd + Wd , yd + Hd ) in a coordinate system in which the upper left end of the rendering result 801 is the origin and the right direction and the lower direction are positive x coordinates and y coordinates, respectively. 803 is an internal content having a width Wc and a height Hc . In a coordinate system in which the upper left corner of the display area 802 is the origin and the right and bottom directions are positive x and y coordinates, respectively, the position of the internal content 803 is expressed as ( xc , yc ) for the upper left corner of the rectangle and ( xc + Wc , yc + Hc ) for the lower right corner. When expressing the movement of the display area 802 in the drawing result, the amount of movement in the x direction is expressed as dx , and the amount of movement in the y direction is expressed as dy . The width and height of the rectangle 804, which is the minimum area required to scroll a Web page, are expressed as Ws and Hs, respectively. Hereinafter, correction of the display area will be described using this coordinate system.

本実施形態における情報処理装置100の処理例を図9に示すフローチャートを参照して説明する。図9に示す処理は、描画結果中の表示領域が変わるときに実行される。例えば、WebページのWebコンテンツを初めて読み込んで描画結果を生成して表示領域を確定するとき、又は、ユーザのWebページ再読み込みの指示により再描画して、改めて表示領域を算出したときに、図9に示す処理が実行される。または、ユーザによって慣性スクロールや描画結果の拡大縮小操作などが行われて表示領域が変更する時点で、図9に示す処理が実行される。なお、スクロールは、ユーザのスワイプ操作以外にもJavaScriptのscroll関数、scrollBy関数、scrollTo関数などにより指示される場合もある。 An example of processing of the information processing device 100 in this embodiment will be described with reference to the flowchart shown in FIG. 9. The processing shown in FIG. 9 is executed when the display area in the drawing result changes. For example, the processing shown in FIG. 9 is executed when the Web content of a Web page is loaded for the first time, a drawing result is generated, and the display area is determined, or when the display area is recalculated after redrawing in response to a user's instruction to reload the Web page. Alternatively, the processing shown in FIG. 9 is executed when the display area is changed by the user performing inertial scrolling or a zoom operation of the drawing result. Note that scrolling may be instructed by a JavaScript scroll function, scrollBy function, scrollTo function, or the like, in addition to a user's swipe operation.

ステップS901では、表示制御部201は、WebページにおいてスワイプでWebページのスクロールとは別の処理を行う内部コンテンツを抽出した後、ステップS902に進む。表示制御部201は、Webページに含まれる各要素の情報に基づいて、スワイプでWebページのスクロールとは別の処理を行う内部コンテンツであるか否かを判定する。表示制御部201は、例えば、JavaScriptを解析してスワイプで発生するイベントが別処理に割り当てられているかどうかによって判定する。例えば、<canvas>要素に対する処理を規定した図4(C)に示したJavaScriptでは、スワイプにより発生するtouchstart、touchmove、touchendの各イベントを取得することが記述されている。そして、取得したイベントに対する座標を用いてlineTo、strokeで線を描画している。この場合、表示制御部201は、この<canvas>要素を、スワイプで動作し、スワイプ操作に応じてWebページのスクロールとは別の処理を行う内部コンテンツと判定する。このようにスワイプ操作で発生するイベントを把握しておき、そのイベントに対する処理が別途規定されているか否かによって、スワイプでWebページのスクロールとは別の処理を行う内部コンテンツであるか否かを判定する。 In step S901, the display control unit 201 extracts internal content that performs a process other than scrolling the web page by swiping on the web page, and then proceeds to step S902. The display control unit 201 determines whether the internal content performs a process other than scrolling the web page by swiping based on information on each element included in the web page. For example, the display control unit 201 analyzes JavaScript to determine whether an event generated by swiping is assigned to a different process. For example, the JavaScript shown in FIG. 4C, which specifies the process for the <canvas> element, describes the acquisition of each event of touchstart, touchmove, and touchend that occurs by swiping. Then, a line is drawn with lineTo and stroke using the coordinates for the acquired event. In this case, the display control unit 201 determines that this <canvas> element is internal content that operates with a swipe and performs a process other than webpage scrolling in response to the swipe operation. In this way, the display control unit 201 grasps the event that occurs with the swipe operation, and determines whether or not the internal content performs a process other than webpage scrolling with a swipe depending on whether or not the process for that event is separately specified.

また、表示制御部201は、例えば、src属性によって特定のURLが指定されている要素を、スワイプでWebページのスクロールとは別の動作を行う内部コンテンツと判定する。図4(A)に示した<iframe>要素は、src属性値で地図サービスのURLが指定されている。各種の地図サービスでは、それぞれのサービス毎に地図に表示する緯度、経度の変更や拡大、縮小を指示する操作を定義しており、例えば、スワイプに対して緯度、経度の変更を割り当てているものもある。このような地図サービスがsrc属性で指定されていると、<iframe>要素の描画領域におけるスワイプはWebページのスクロールではなく、例えば、地図の緯度や経度の変更として処理される。このようにスワイプ操作に対して別の操作を割り当てているサービスのURLを予めリストとして保持しておき、<iframe>のsrc属性で指定されたURLがこのリストにあるか否かを判定する。これにより、スワイプでWebページのスクロールとは別の処理を行う内部コンテンツであるか否かを判定する。 In addition, the display control unit 201 determines that an element in which a specific URL is specified by the src attribute is an internal content that performs an operation other than scrolling a web page by swiping. The <iframe> element shown in FIG. 4A has the URL of a map service specified by the src attribute value. Various map services define operations for changing the latitude and longitude displayed on the map and for enlarging or reducing the size of the map for each service, and some map services assign changes to latitude and longitude to swipes, for example. When such a map service is specified by the src attribute, a swipe in the drawing area of the <iframe> element is processed as, for example, a change in the latitude or longitude of the map, rather than scrolling a web page. In this way, the URLs of services that assign different operations to swipe operations are stored in advance as a list, and it is determined whether the URL specified by the src attribute of <iframe> is in this list. This determines whether the internal content performs a process other than scrolling a web page by swiping.

なお、ステップS901の処理は、スワイプが発生して表示領域が変わる時点で毎回実行するのではなく、Webコンテンツを最初に読み込んだ際にHTML文書やJavaScript等を解析して対象となる内部コンテンツを抽出しておくようにしてもよい。 The process of step S901 does not have to be executed every time a swipe occurs and the display area changes, but may be executed by analyzing the HTML document, JavaScript, etc., when the web content is first loaded and extracting the target internal content.

ステップS902では、判定部202が、表示制御部201から入手した内部コンテンツの情報及び表示領域の情報に基づいて、スワイプでWebページのスクロールとは別の処理を行う内部コンテンツが表示領域内にあるか否かを判定する。スワイプでWebページのスクロールとは別の処理を行う内部コンテンツが表示領域内にあると判定部202が判定した場合(ステップS902においてYES)、ステップS903に進む。スワイプでWebページのスクロールとは別の処理を行う内部コンテンツが表示領域内にないと判定部202が判定した場合(ステップS902においてNO)、ステップS904に進む。 In step S902, the determination unit 202 determines whether or not there is internal content in the display area that performs a process other than webpage scrolling by swiping, based on the internal content information and display area information obtained from the display control unit 201. If the determination unit 202 determines that there is internal content in the display area that performs a process other than webpage scrolling by swiping (YES in step S902), the process proceeds to step S903. If the determination unit 202 determines that there is no internal content in the display area that performs a process other than webpage scrolling by swiping (NO in step S902), the process proceeds to step S904.

具体例を図8に示した座標に基づいて説明する。矩形の内部コンテンツ803の左上座標、右下座標を用いて表示領域802内にあるか判断する。内部コンテンツ803について、「上端のy座標(yc)≦Hd」かつ、「0≦下端のy座標(yc+Hc)」かつ、「左端のx座標(xc)≦Wd」かつ、「0≦右端のx座標(xc+Wc)」であるか判定する。該当する場合、内部コンテンツ803が表示領域802内にあると判定する。例えば、図6(A)に示した表示領域601の場合、内部コンテンツである<canvas>要素502の上端のy座標(yc)はHd以下の値であり、下端のy座標(yc+Hc)はプラスの値である。また、左端のx座標(xc)は0であり、Wd以下の値であり、右端のx座標(xc+Wc)はWcであり、プラスの値である。したがって、内部コンテンツである<canvas>要素502の左上座標、右下座標は条件を満たすため、判定部202は、<canvas>要素502が表示領域601内にあると判定する。 A specific example will be described based on the coordinates shown in FIG. 8. The top left and bottom right coordinates of the rectangular internal content 803 are used to determine whether it is within the display area 802. For the internal content 803, it is determined whether "the y coordinate of the top edge ( yc )≦ Hd ", "0≦the y coordinate of the bottom edge ( yc + Hc )", "the x coordinate of the left edge ( xc )≦ Wd ", and "0≦the x coordinate of the right edge ( xc + Wc )". If so, it is determined that the internal content 803 is within the display area 802. For example, in the case of the display area 601 shown in FIG. 6A, the y coordinate ( yc ) of the top edge of the <canvas> element 502, which is the internal content, is equal to or less than Hd , and the y coordinate ( yc + Hc ) of the bottom edge is a positive value. In addition, the x-coordinate ( xc ) of the left edge is 0, which is a value less than or equal to Wd , and the x-coordinate ( xc + Wc ) of the right edge is Wc , which is a positive value. Therefore, the upper left coordinate and the lower right coordinate of the <canvas> element 502, which is the internal content, satisfy the conditions, and the determination unit 202 determines that the <canvas> element 502 is within the display area 601.

ステップS903では、判定部202が、表示領域内にWebページのスクロールを指示するためのスワイプ領域が含まれているか否かを判定する。表示領域内にWebページのスクロールを指示するためのスワイプ領域が含まれていると判定部202が判定した場合(ステップS903においてYES)、ステップS904に進む。表示領域内にWebページのスクロールを指示するためのスワイプ領域が含まれていないと判定部202が判定した場合(ステップS903においてNO)、ステップS905に進む。 In step S903, the determination unit 202 determines whether or not the display area includes a swipe area for instructing scrolling of a web page. If the determination unit 202 determines that the display area includes a swipe area for instructing scrolling of a web page (YES in step S903), the process proceeds to step S904. If the determination unit 202 determines that the display area does not include a swipe area for instructing scrolling of a web page (NO in step S903), the process proceeds to step S905.

図8に示した座標の場合、表示領域802内にステップS902において表示領域内にあると判定した内部コンテンツ以外の領域として、Webページをスクロールするために最低限必要となる幅Ws以上、高さHs以上の矩形領域が存在するか否かを判定する。図8に示した例のように、1つの内部コンテンツ803が含まれている場合、判定部202は、内部コンテンツ803の上下左右のいずれかの領域に(Ws×Hs)のサイズの領域が含まれるか否かを判定する。つまり、判定部202は、「yc≧Hs」、「Hd-(yc+Hc)≧Hs」、「xc≧Ws」、「Wd-(xc+Wc)≧Ws」のいずれかの条件を満たすか否かを判定する。図6(A)に示した表示領域601の場合、表示領域601の上部に内部コンテンツ以外の領域があるが、yc<Hsの例であるため、Webページをスクロールするために最低限必要となる領域がないと判定する。 In the case of the coordinates shown in FIG. 8, it is determined whether or not a rectangular area with a width of W s or more and a height of H s or more, which is the minimum required area for scrolling a Web page, exists within the display area 802 as an area other than the internal content determined to be within the display area in step S902. As in the example shown in FIG. 8, when one internal content 803 is included, the determination unit 202 determines whether or not an area with a size of (W s ×H s ) is included in any of the areas on the top, bottom, left, and right of the internal content 803. In other words, the determination unit 202 determines whether or not any of the conditions "y c ≧H s ", "H d - (y c +H c ) ≧H s ", "x c ≧W s ", and "W d - (x c +W c ) ≧W s " is satisfied. In the case of the display area 601 shown in FIG. 6(A), although there is an area other than the internal content at the top of the display area 601, it is determined that there is no area that is the minimum required area for scrolling a Web page, since this is an example of y c <H s .

ステップS904では、制御部203が、最終的に決定した位置に表示領域を定める。図8に示した座標の場合、左上座標を(xd,yd)とし、幅Wd及び高さHdとする矩形を表示領域として設定する。そして、表示制御部201が、描画結果の表示領域をWebブラウザに表示する。 In step S904, the control unit 203 determines the display area at the finally determined position. In the case of the coordinates shown in Fig. 8, a rectangle with the upper left coordinates set to ( xd , yd ) and width Wd and height Hd is set as the display area. The display control unit 201 then displays the display area of the drawing result on the Web browser.

ステップS905では、制御部203が、Webページをスクロールするために最低限必要となる領域を表示領域内に表示するための表示領域の補正量を算出して、ステップS906に進む。制御部203は、通常表示する表示領域を上下左右のどの方向にどの量、移動すればWebページをスクロールするために最低限必要となる領域の幅Ws、高さHsの矩形領域が表示領域内に表示されるかを算出する。 In step S905, the control unit 203 calculates a correction amount for the display area to display within the display area the area that is the minimum area required for scrolling the Web page, and proceeds to step S906. The control unit 203 calculates how much the normally displayed display area needs to be moved in each direction (up, down, left, right) in order to display within the display area a rectangular area with the minimum area required for scrolling the Web page, the width Ws and the height Hs .

図8に示したように1つの内部コンテンツ803を含む場合、制御部203は、以下の値を算出する。x方向の補正量をdxとし、y方向の補正量をdyとする。
・表示領域の上端に幅Wd、高さHd以上の領域を確保する場合:
y≦(yc-Hs
・表示領域の下端に幅Wd、高さHd以上の領域を確保する場合:
y≧(Hs-Hd+yc+Hc
・表示領域の左端に幅Wd、高さHd以上の領域を確保する場合:
x≦(xc-Ws
・表示領域の右端に幅Wd、高さHd以上の領域を確保する場合:
x≧(Ws-Wd+xc+Wc
8, when one internal content 803 is included, the control unit 203 calculates the following values: The amount of correction in the x direction is dx , and the amount of correction in the y direction is dy .
When reserving an area of width W d and height H d or more at the top edge of the display area:
d y ≦ (y c - H s )
- When reserving an area of width W d and height H d or more at the bottom edge of the display area:
d y ≧ (H s −H d +y c +H c )
- To secure an area of width W d and height H d or more on the left edge of the display area:
d x ≦ (x c - W s )
- To secure an area with width W d and height H d or more on the right edge of the display area:
d x ≧ (W s −W d +x c +W c )

さらに、制御部203は、算出した補正量について、表示領域を移動した場合に表示領域が描画結果内に収まり、かつ、補正によって得られる表示領域にスワイプで別の処理を行う内部コンテンツの領域が入らない条件に合う補正値を選ぶ。例えば、図6(A)に示した表示領域601である場合、表示領域と描画結果の幅がほぼ同じであるため、左右方向にWsの幅をとるための補正をすると、Webページの描画結果を越えてしまう。また、<canvas>要素502と<iframe>要素503との間にHsの高さがない場合、補正後の表示領域の下端に幅Wd、高さHd以上の領域を確保することができない。そのため、この場合には採用する補正量の候補は上方向のみになる。また、例えば、図7(A)に示した表示領域704のように、2つの内部コンテンツ702、703が連なって存在する場合でも同様に補正量を算出して、条件に合う補正値を選ぶ。この場合、図7(B)に示した表示領域711又は表示領域712が表示領域の補正する候補になる。なお、補正量を算出した結果、条件にあう補正値が候補として挙がらなかった場合でもステップS906に進む。 Furthermore, the control unit 203 selects a correction value that satisfies the condition that the display area fits within the drawing result when the display area is moved, and the area of the internal content that performs another process by swiping does not enter the display area obtained by the correction. For example, in the case of the display area 601 shown in FIG. 6A, the display area and the drawing result have almost the same width, so if a correction is made to obtain a width of W s in the left-right direction, it will exceed the drawing result of the web page. Also, if there is no height of H s between the <canvas> element 502 and the <iframe> element 503, an area of width W d and height H d or more cannot be secured at the bottom end of the display area after correction. Therefore, in this case, the only candidate for the correction amount to be adopted is the upward direction. Also, for example, even if two internal contents 702 and 703 exist in a row, such as the display area 704 shown in FIG. 7A, the correction amount is calculated in the same way and a correction value that satisfies the condition is selected. In this case, the display area 711 or the display area 712 shown in FIG. 7B becomes a candidate for correction of the display area. Note that even if no candidate correction value that meets the conditions is found as a result of calculating the correction amount, the process proceeds to step S906.

ステップS906では、制御部203が、ステップS905において選出した補正量の中で絶対値が最小のものが所定値以下であるか否かを判定する。補正量が所定値よりも大きいと制御部203が判定した場合(ステップS906においてNO)、ステップS907に進む。補正量が所定値以下であると制御部203が判定した場合(ステップS906においてYES)、ステップS908に進む。なお、ステップS905において補正値が候補として挙がらなかった場合にもステップS907に進む。 In step S906, the control unit 203 determines whether the correction amount selected in step S905 has the smallest absolute value and is equal to or smaller than a predetermined value. If the control unit 203 determines that the correction amount is greater than the predetermined value (NO in step S906), the process proceeds to step S907. If the control unit 203 determines that the correction amount is equal to or smaller than the predetermined value (YES in step S906), the process proceeds to step S908. Note that the process also proceeds to step S907 if no correction value was selected as a candidate in step S905.

通常表示する表示領域に対して、最終的に決定する表示領域の位置が大きく異なる場合、ユーザにとって違和感のある表示となることがある。そのため、ステップS905において選出した補正量の絶対値が最小のものについて、所定値以下であるか否かを判定する。例えば、図6(A)に示した表示領域601である場合、上方向への補正量が小さく、所定値以下と判定されてステップS908に進む。また、例えば、図7(A)に示した表示領域704のような場合、各内部コンテンツについて補正値を算出した結果、採用する補正量の候補は上方向に移動して表示領域711の位置にするか、下方向に移動して表示領域712の位置にするかの二択になる。例えば、補正量の絶対値が小さい表示領域711への補正量を所定値と比較し、所定値より大きいと判定するとステップS907に進む。 If the position of the display area to be finally determined is significantly different from the display area that is normally displayed, the display may be unnatural to the user. Therefore, for the display area selected in step S905, the absolute value of the correction amount selected is judged to be equal to or less than a predetermined value. For example, in the case of the display area 601 shown in FIG. 6(A), the amount of correction in the upward direction is small and is judged to be equal to or less than a predetermined value, and the process proceeds to step S908. Also, for example, in the case of the display area 704 shown in FIG. 7(A), as a result of calculating the correction value for each internal content, the candidate correction amount to be adopted is either to move it upward to the position of the display area 711, or to move it downward to the position of the display area 712. For example, the correction amount for the display area 711, which has a small absolute value of the correction amount, is compared with a predetermined value, and if it is judged to be greater than the predetermined value, the process proceeds to step S907.

ステップS907では、制御部203が、表示領域内にWebページをスクロールするために最低限必要となる幅Ws以上、高さHs以上の矩形領域を有するように描画結果を変更する。通常の表示領域が図7(A)に示した表示領域704である場合、制御部203は、内部コンテンツである<canvas>要素702、<iframe>要素703の間、又は左右の位置に幅Ws以上、高さHs以上の矩形領域を持つように描画結果を変更する。図7(A)に示した表示領域704の場合、内部コンテンツの左右に新たに幅Ws以上、高さHs以上の領域を作るよりも、<canvas>要素702と<iframe>要素703との間に幅Ws以上、高さHs以上の矩形領域を作る方が少ない変更で済む。そのため、制御部203は、<canvas>要素702と<iframe>要素703の描画結果の間の距離と、幅Ws、高さHsとに基づいて、Webページをスクロールする領域を確保するために不足している高さを算出する。そして、その領域を表示するための要素、<div style="margin-top:算出サイズ;"></div>を<canvas>要素と<iframe>要素との間に挿入したHTML文書を生成して、表示制御部201にて描画結果を作成する。このようにして新たな描画結果上に表示領域を確定する。表示領域内に表示される内部コンテンツ間に幅Ws、高さHsの領域をとったので、通常の表示領域の座標を変更することなく左上の座標を(xd,yd)とする表示領域に確定する。もし、<canvas>要素の右側に新たに少なくとも幅Ws、高さHsの領域を有するようにHTML文書を変更したのであれば、左上の座標を(xd+Ws,yd)とする表示領域に確定する。即ち、制御部203は、Webページを描画するためのHTML文書には記述がないタグを追加した(または、タグの内容を書き換えた)HTML文書を新たに作成する。そして、制御部203は、所定サイズ以上の操作領域を表示させるため、生成したHTML文書に従ったWebページの描画を行う。 In step S907, the control unit 203 changes the drawing result so that it has a rectangular area with a width of Ws or more and a height of Hs or more, which are the minimum required for scrolling the Web page, within the display area. When the normal display area is the display area 704 shown in Fig. 7A, the control unit 203 changes the drawing result so that it has a rectangular area with a width of Ws or more and a height of Hs or more between the <canvas> element 702 and the <iframe> element 703, which are the internal contents, or on the left and right. In the case of the display area 704 shown in Fig. 7A, creating a rectangular area with a width of Ws or more and a height of Hs or more between the <canvas> element 702 and the <iframe> element 703 requires less modification than creating a new area with a width of Ws or more and a height of Hs or more on the left and right of the internal contents. Therefore, the control unit 203 calculates the height that is insufficient to secure an area for scrolling the Web page based on the distance between the rendering results of the <canvas> element 702 and the <iframe> element 703, the width W s , and the height H s . Then, an HTML document is generated in which an element for displaying that area, <div style="margin-top:calculated size;"></div>, is inserted between the <canvas> element and the <iframe> element, and the rendering result is created by the display control unit 201. In this way, the display area is determined on the new rendering result. Since an area of width W s and height H s is allocated between the internal contents displayed in the display area, the display area is determined to have the upper left coordinates (x d , y d ) without changing the coordinates of the normal display area. If the HTML document is modified to include a new area of at least width Ws and height Hs to the right of the <canvas> element, the display area is determined to have the upper left coordinates ( xd + Ws , yd ). That is, the control unit 203 creates a new HTML document to which tags not described in the HTML document for drawing a Web page are added (or the contents of the tags are rewritten). Then, the control unit 203 draws a Web page according to the generated HTML document in order to display an operation area of a predetermined size or larger.

ステップS908では、表示制御部201は、制御部203がステップS906において決定した補正量、もしくは、ステップS908において新たに生成した描画結果と表示領域の座標を用いて表示領域を決定する。表示制御部201は、制御部203から表示領域の補正量を指示された場合、通常表示する表示領域に補正量を加えた領域を表示領域として決定する。表示制御部201は、制御部203から新たな描画結果と表示領域の座標を指示された場合、新たな描画結果を表示対象として指示された座標に表示領域をとる。そして、ステップS904において、表示制御部201が、描画結果の表示領域をWebブラウザに表示する。 In step S908, the display control unit 201 determines the display area using the correction amount determined by the control unit 203 in step S906, or the coordinates of the newly generated drawing result and display area in step S908. When the display control unit 201 is instructed by the control unit 203 to correct the display area, it determines the area obtained by adding the correction amount to the display area that is normally displayed, as the display area. When the display control unit 201 is instructed by the control unit 203 to provide new drawing results and the coordinates of the display area, it takes the display area at the instructed coordinates with the new drawing results as the display target. Then, in step S904, the display control unit 201 displays the display area of the drawing results on the web browser.

以上の処理により、Webページの表示状態が所定の条件を満たさない場合には、Webページをスクロールするために最低限必要となる幅Ws以上、高さHs以上の矩形領域を表示領域に確保することで、Webページのスクロールを常に行えるようになる。 By the above processing, when the display state of the Web page does not satisfy the predetermined conditions, a rectangular area having a width of at least Ws and a height of at least Hs , which is the minimum required for scrolling the Web page, is secured in the display area, thereby making it possible to always scroll the Web page.

なお、ステップS907においては、新たに<div>要素を追加することによりWebページをスクロールするために最低限必要となる幅Ws以上、高さHs以上の矩形領域を表示領域に確保する例を示した。しかし、これに限らず内部コンテンツを縮小することにより、Webページをスクロールするために最低限必要となる領域を確保するようにしてもよい。 In step S907, an example has been shown in which a rectangular area with a width of Ws or more and a height of Hs or more, which are the minimum required for scrolling a Web page, is secured in the display area by adding a new <div> element. However, the present invention is not limited to this, and the minimum required area for scrolling a Web page may be secured by reducing the internal content.

例えば、図6(A)に示した表示領域601である場合、内部コンテンツである<canvas>要素502の描画領域を縮小して、Webページをスクロールするために最低限必要となる幅Ws以上、高さHs以上の矩形領域を表示領域に持つようにする。例えば、幅Wc、高さHcの<canvas>要素、幅Wd、高さHdの表示領域、及びWebページをスクロールするために最低限必要となる幅Ws、高さHsの矩形領域を用いて、以下のように<canvas>要素の縮小率を算出する。
・Webページをスクロールするために最低限必要となる幅Ws以上、高さHs以上の矩形領域をx方向、内部コンテンツの右側に作る場合の倍率sx(top、left起点):
x≦(Wd-Ws-xc)/Wc
・Webページをスクロールするために最低限必要となる幅Ws以上、高さHs以上の矩形領域をx方向、内部コンテンツの左側に作る場合の倍率sx(top、right起点):
x≦(Wc-Ws+xc)/Wc
・Webページをスクロールするために最低限必要となる幅Ws以上、高さHs以上の矩形領域をy方向、内部コンテンツの下側に作る場合の倍率sy(top、left起点):
y≦(Hd-Hs-yc)/Hc
・Webページをスクロールするために最低限必要となる幅Ws以上、高さHs以上の矩形領域をy方向、内部コンテンツの上側に作る場合の倍率sy(bottom、left起点):
y≦(Hc-Hs+yc)/Hc
6A, the drawing area of the <canvas> element 502, which is an internal content, is reduced so that the display area has a rectangular area with a width Ws or more and a height Hs or more that are the minimum required for scrolling a Web page. For example, using a <canvas> element with a width Wc and a height Hc , a display area with a width Wd and a height Hd , and a rectangular area with a width Ws and a height Hs that are the minimum required for scrolling a Web page, the reduction ratio of the <canvas> element is calculated as follows:
Magnification s x (starting points top and left) when creating a rectangular area of at least width W s and height H s required for scrolling a Web page to the right of the internal content in the x direction:
s x ≦ (W d - W s - x c )/W c
Magnification s x (starting points top and right) when creating a rectangular area of at least width W s and height H s required for scrolling a Web page to the left of the internal content in the x direction:
s x ≦ (W c - W s + x c )/W c
Magnification s y (starting points top and left) when creating a rectangular area with a width of at least W s and a height of at least H s required for scrolling a Web page below the internal content in the y direction:
s y ≦(H d - H s - y c )/H c
Magnification s y (bottom, left starting point) when creating a rectangular area with a width of at least W s and a height of at least H s required for scrolling a Web page above the internal content in the y direction:
s y ≦ (H c - H s + y c )/H c

そして、例えば、大きい倍率の方の値を使用して、<canvas>要素を縮小して表示するようにHTML文書を変更したのち描画結果を作り直す。4つの縮小率のうち、最大値になる縮小率を採用する。sx(top、left起点)であれば、以下のように<canvas>要素にスケールを変換するstyle属性を追加して<canvas>要素の描画部分を縮小表示して、Webページをスクロールするために最低限必要となる領域を確保する。top、leftを起点にして、x方向、y方向にsx倍する例である。
<canvas width="W1" height="H1"
style="transform: scale(sx, sx);transform-origin: top left;"></canvas>
top、leftを起点にしているので<canvas>要素の描画領域の右側にWebページをスクロースする領域を表示する。
Then, for example, the larger magnification value is used to modify the HTML document so that the <canvas> element is displayed in a reduced size, and then the drawing result is recreated. Of the four reduction ratios, the maximum reduction ratio is adopted. If it is s x (starting from top and left), a style attribute that converts the scale is added to the <canvas> element as shown below to reduce and display the drawing portion of the <canvas> element, and the minimum area required for scrolling the Web page is secured. This is an example of multiplying by s x in the x and y directions, starting from top and left.
<canvas width="W1"height="H1"
style="transform: scale(s x , s x );transform-origin: top left;"></canvas>
Since the top and left are the starting points, the area for scrolling the Web page is displayed to the right of the drawing area of the <canvas> element.

なお、ステップS907においてHTML文書を変更して描画結果を扱うが、スクロールなどによって表示領域が変わり、元のHTML文書の描画結果でWebページをスワイプする領域がある位置になった場合、HTML文書変更後の描画結果は不要となる。そのため、HTML文書変更する場合、元の描画結果も保持しておく。そして、変更後の描画結果を表示している際に表示領域の移動が発生した場合、変更前の描画結果に対する表示領域の移動状態を管理しておき、その情報をもとに図9に示したフローを開始する。このようにすることで、ステップS907においてHTML文書を変更した描画結果は、Webページにスクロールする領域がない状況に限られたものになる。 Note that in step S907, the HTML document is modified to handle the rendering result, but if the display area changes due to scrolling or the like, and the rendering result of the original HTML document is in a position where there is an area for swiping the web page, the rendering result after the HTML document is modified becomes unnecessary. Therefore, when the HTML document is modified, the original rendering result is also retained. Then, if the display area moves while the modified rendering result is being displayed, the movement state of the display area relative to the rendering result before the modification is managed, and the flow shown in FIG. 9 is started based on that information. In this way, the rendering result after the HTML document is modified in step S907 is limited to situations where there is no area on the web page to scroll.

(本発明の他の実施形態)
本発明は、前述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読み出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
Other Embodiments of the Invention
The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiment is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) for implementing one or more of the functions.

なお、前記実施形態は、何れも本発明を実施するにあたっての具体化のほんの一例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。 The above embodiments are merely examples of the implementation of the present invention, and the technical scope of the present invention should not be interpreted in a limiting manner based on these. In other words, the present invention can be implemented in various forms without departing from its technical concept or main features.

100:情報処理装置 110:コントローラ部 111:CPU 112:ROM 113:RAM 120:操作部 130:表示部 140:記憶部 150:通信部 201:表示制御部 202:判定部 203:制御部 100: Information processing device 110: Controller unit 111: CPU 112: ROM 113: RAM 120: Operation unit 130: Display unit 140: Storage unit 150: Communication unit 201: Display control unit 202: Determination unit 203: Control unit

Claims (7)

指示操作の入力を受付けるコンテンツを有するWebページを、タッチ操作により指示操作の入力を受付ける表示部に表示させる表示制御手段と、
前記Webページの前記コンテンツを含む領域を前記表示部に表示させる場合、前記コンテンツを示す領域とは異なり、該Webページをスクロールするための操作領域を所定以上のサイズとするよう前記表示部における前記Webページの表示を制御する制御手段と
前記Webページのユーザ操作に応じた前記表示部における表示領域であって、前記Webページの第1の表示領域が所定の条件を満たすか否かを判定する判定手段とを有し、
前記判定手段は、前記第1の表示領域における前記コンテンツを示す領域に基づいて、前記第1の表示領域において前記操作領域が所定以上のサイズとなるか否かを判定し、
前記制御手段は、前記第1の表示領域では前記操作領域が前記所定以上のサイズにならない場合、前記所定以上のサイズの前記操作領域を含む第2の表示領域で前記Webページを表示するよう制御することを特徴とする情報処理装置。
a display control means for displaying a web page having a content for accepting input of an instruction operation on a display unit for accepting input of the instruction operation by a touch operation;
a control means for controlling display of the web page on the display unit so that, when an area including the content of the web page is displayed on the display unit, an operation area for scrolling the web page is set to a size equal to or larger than a predetermined size, which is different from an area showing the content ;
a determination means for determining whether a first display area of the Web page on the display unit in response to a user operation of the Web page satisfies a predetermined condition;
the determining means determines whether or not the operation area in the first display area has a size equal to or larger than a predetermined size based on an area showing the content in the first display area;
The information processing device is characterized in that the control means controls the web page to be displayed in a second display area including the operation area of a size equal to or larger than the specified size when the operation area in the first display area does not become a size equal to or larger than the specified size.
前記操作領域は、前記Webページにおける前記コンテンツ以外の領域であることを特徴とする請求項に記載の情報処理装置。 The information processing apparatus according to claim 1 , wherein the operation area is an area other than the content on the Web page. 前記制御手段は、前記操作領域を前記所定以上のサイズとするよう前記表示部における前記Webページの表示を制御する場合、前記所定以上のサイズの前記操作領域が表示される移動方向及び移動量を算出し、複数の移動方向のうち移動量が少ない方向へ前記Webページの表示領域を移動させることを特徴とする請求項1又は2に記載の情報処理装置。 The information processing device according to claim 1 or 2, characterized in that when the control means controls the display of the Web page on the display unit so as to make the operation area a size equal to or larger than the specified size, the control means calculates a movement direction and amount of movement in which the operation area of the specified size or larger is displayed, and moves the display area of the Web page in a direction among multiple movement directions with the smallest amount of movement. 前記制御手段は、前記所定以上のサイズの前記操作領域を、前記Webページを描画するためのHTMLファイルには規定されていない描画を行うことで表示させることを特徴とする請求項1に記載の情報処理装置。 The information processing device according to claim 1, characterized in that the control means displays the operation area having a size equal to or larger than the predetermined size by performing drawing that is not defined in the HTML file for drawing the web page. 前記制御手段は、前記コンテンツを縮小表示して所定以上のサイズの前記操作領域を表示させることを特徴とする請求項1~の何れか1項に記載の情報処理装置。 5. The information processing apparatus according to claim 1 , wherein the control means reduces the display of the content to display the operation area having a size equal to or larger than a predetermined size. タッチ操作により指示操作の入力を受付ける表示部を有する情報処理装置の情報処理方法であって、
指示操作の入力を受付けるコンテンツを有するWebページを前記表示部に表示させる表示制御工程と、
前記Webページの前記コンテンツを含む領域を前記表示部に表示させる場合、前記コンテンツを示す領域とは異なり、該Webページをスクロールするための操作領域を所定以上のサイズとするよう前記表示部における前記Webページの表示を制御する制御工程と、
前記Webページのユーザ操作に応じた前記表示部における表示領域であって、前記Webページの第1の表示領域が所定の条件を満たすか否かを判定する判定工程とを有し、
前記判定工程にて、前記第1の表示領域における前記コンテンツを示す領域に基づいて、前記第1の表示領域において前記操作領域が所定以上のサイズとなるか否かを判定し、
前記制御工程にて、前記第1の表示領域では前記操作領域が前記所定以上のサイズにならない場合、前記所定以上のサイズの前記操作領域を含む第2の表示領域で前記Webページを表示するよう制御することを特徴とする情報処理方法。
An information processing method for an information processing device having a display unit that accepts input of an instruction operation by a touch operation, comprising:
a display control step of causing the display unit to display a web page having content for accepting input of an instruction operation;
a control step of controlling display of the web page on the display unit so that, when an area including the content of the web page is displayed on the display unit, an operation area for scrolling the web page is set to a size equal to or larger than a predetermined size, which is different from an area showing the content;
a determination step of determining whether a first display area of the Web page on the display unit in response to a user operation of the Web page satisfies a predetermined condition,
In the determining step, it is determined whether or not the operation area in the first display area has a size equal to or larger than a predetermined size based on an area showing the content in the first display area;
An information processing method characterized in that, in the control process, if the operation area in the first display area does not become a size larger than the specified size, the web page is controlled to be displayed in a second display area including the operation area of a size larger than the specified size .
タッチ操作により指示操作の入力を受付ける表示部を有する情報処理装置のコンピュータに、
指示操作の入力を受付けるコンテンツを有するWebページを前記表示部に表示させる表示制御ステップと、
前記Webページの前記コンテンツを含む領域を前記表示部に表示させる場合、前記コンテンツを示す領域とは異なり、該Webページをスクロールするための操作領域を所定以上のサイズとするよう前記表示部における前記Webページの表示を制御する制御ステップと、
前記Webページのユーザ操作に応じた前記表示部における表示領域であって、前記Webページの第1の表示領域が所定の条件を満たすか否かを判定する判定ステップとを実行させ
前記判定ステップにて、前記第1の表示領域における前記コンテンツを示す領域に基づいて、前記第1の表示領域において前記操作領域が所定以上のサイズとなるか否かを判定し、
前記制御ステップにて、前記第1の表示領域では前記操作領域が前記所定以上のサイズにならない場合、前記所定以上のサイズの前記操作領域を含む第2の表示領域で前記Webページを表示するよう制御するプログラム。
A computer of an information processing device having a display unit that accepts input of an instruction operation by a touch operation,
a display control step of displaying, on the display unit, a web page having content for accepting input of an instruction operation;
a control step of controlling display of the web page on the display unit so that, when an area including the content of the web page is displayed on the display unit, an operation area for scrolling the web page is set to a size equal to or larger than a predetermined size, which is different from an area showing the content;
a determination step of determining whether a first display area of the Web page on the display unit in response to a user operation of the Web page satisfies a predetermined condition ;
In the determining step, it is determined whether or not the operation area in the first display area has a size equal to or larger than a predetermined size based on an area showing the content in the first display area;
A program that controls, in the control step, to display the web page in a second display area that includes an operation area of a size equal to or larger than the specified size if the operation area in the first display area does not become a size equal to or larger than the specified size .
JP2021009332A 2021-01-25 2021-01-25 Information processing device, information processing method, and program Active JP7612433B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021009332A JP7612433B2 (en) 2021-01-25 2021-01-25 Information processing device, information processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021009332A JP7612433B2 (en) 2021-01-25 2021-01-25 Information processing device, information processing method, and program

Publications (2)

Publication Number Publication Date
JP2022113246A JP2022113246A (en) 2022-08-04
JP7612433B2 true JP7612433B2 (en) 2025-01-14

Family

ID=82657925

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021009332A Active JP7612433B2 (en) 2021-01-25 2021-01-25 Information processing device, information processing method, and program

Country Status (1)

Country Link
JP (1) JP7612433B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018025316A1 (en) 2016-08-01 2018-02-08 富士通株式会社 Page display program, page display device, and page display method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018025316A1 (en) 2016-08-01 2018-02-08 富士通株式会社 Page display program, page display device, and page display method

Also Published As

Publication number Publication date
JP2022113246A (en) 2022-08-04

Similar Documents

Publication Publication Date Title
CN100426206C (en) improving the display of large objects on small displays
US8302029B2 (en) Presentation of large objects on small displays
JP4533943B2 (en) Information processing apparatus, display control method, and program
EP2284679A2 (en) User interface systems and methods for manipulating and viewing digital documents
US8743150B2 (en) Display processing device and display control method
US9773072B2 (en) Systems and methods for developing adaptive layouts for electronic content
KR20130116241A (en) Branded browser frame
JP5738895B2 (en) Enhanced application display capabilities
CN111078035A (en) A Drawing Method Based on HTML5 Canvas
JP5981175B2 (en) Drawing display device and drawing display program
JP4776995B2 (en) Computer apparatus and control method and program thereof
JP2013033308A (en) Information processor, information processor control method, and program
JP4874363B2 (en) Web page display method using browser plug-in
JP7612433B2 (en) Information processing device, information processing method, and program
JP2014056357A (en) Information processing program, display control device, display control system and display method
CN113096217B (en) Picture generation method and device, electronic equipment and storage medium
JP2004318269A (en) Image display device, image display method, and image display system
CN111814087B (en) Dynamic layout method and device of Web window, electronic equipment and readable storage medium
JP5066877B2 (en) Image display device, image display method, and program
JP7631056B2 (en) Information processing device, control method, program, and storage medium
CN119414952A (en) Signal source image cropping method, device and electronic device based on Android device
CN121786285A (en) Page self-adaptive scaling method and device, equipment and medium thereof
JP2014127082A (en) Image display device
CN113608659A (en) Multi-window adjusting method, readable storage medium and electronic device
JP2003157442A (en) Output processing method, output processing device, output processing program, and recording medium storing output processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240112

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240730

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240731

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240930

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20241126

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20241225

R150 Certificate of patent or registration of utility model

Ref document number: 7612433

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150