JP7612433B2 - Information processing device, information processing method, and program - Google Patents
Information processing device, information processing method, and program Download PDFInfo
- 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
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).
しかしながら、特許文献1に記載の技術のように内部コンテンツを別タブで表示すると、1つのWebページを複数のタブで扱うことにより、ユーザの利便性が低下することがある。例えば、ユーザが複数のタブを切り替える操作が増えたり、タブの数に制限があり上限数利用している場合には既に別のWebページを表示していたタブの表示が内部コンテンツ表示で更新されてしまったりする。
However, when internal content is displayed in a separate tab as in the technology described in
本発明は、このような事情に鑑みてなされたものであり、ユーザの利便性を低下させることなく、ユーザが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.
以下、本発明の実施形態を図面に基づいて説明する。なお、以下に説明する実施形態は、特許請求の範囲に関わる本発明を限定するものではなく、また、本実施形態で説明されている特徴の組み合わせてのすべてが本発明の解決手段に必須のものとは限らない。なお、同一な構成については、同じ符号を付して説明する。 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
コントローラ部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
操作部120は、キーボード、タッチパネル、マウス等で構成され、ユーザが各種入力操作を行うためのものである。表示部130は、LCD、LEDディスプレイ等でユーザに表示通知するためのものである。記憶部140は、ハードディスク等で構成され、文書や画像等のファイルデータを格納するためのものである。通信部150は、ネットワークに接続するためのインタフェースである。接続方法としてはLAN、無線LAN等がある。
The
本実施形態における情報処理装置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
図2は、本実施形態における情報処理装置100の機能構成例を模式的に示すブロック図である。情報処理装置100は、表示制御部201、判定部202、及び制御部203を有する。なお、各部はROM112に保存されたプログラムによって制御される。
FIG. 2 is a block diagram showing a schematic example of the functional configuration of the
表示制御部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
また、表示制御部201は、描画結果の表示領域の制御を行う。表示制御部201は、操作部120であるタッチパネルからWebページに対するドラッグの入力があると、ドラッグした方向及び移動量に従って、Webブラウザに表示する描画結果の表示領域を変更する。また、表示制御部201は、操作部120からの入力がスワイプである場合には、ユーザによるタッチパネルへの接触(タッチ)が離れた後もスクロールが続くように描画結果の表示領域を変更する。表示制御部201は、スワイプの操作速度を取得して、速度に応じて表示領域をスワイプ方向に逐次変更し、徐々に表示領域の移動量を少なくしていき、最終的に移動量を0にして表示領域を決定する。
The
判定部202は、表示制御部201が決定しようとする表示領域内にWebページをスクロールするための操作領域が所定以上のサイズで含まれているか否かを判定する。Webページをスクロールするための操作領域とは、Webページをスクロールするための操作、ここではドラックやスワイプに対してJavaScript等でWebページのスクロール以外の別の処理が割り当てられていない領域のことである。別の処理が割り当てられている部分でドラッグやスワイプをしてもWebページのスクロールは発生しない。判定部202は、Webページをスクロールするための操作領域を所定以上含んでいる場合、その表示位置に表示領域を決定すると判定する。また、判定部202は、Webページをスクロールするための操作領域が所定サイズよりも小さい場合、表示領域の変更が必要であると判定する。
The
制御部203は、判定部202が表示領域の変更が必要であると判定した場合に、表示領域にWebページをスクロールするための操作領域を所定以上含むように表示領域を変更する、移動方向及び移動量を算出する。算出された移動方向及び移動量は、表示制御部201に伝達され、表示制御部201は、指定された移動方向及び移動量をもとにして、描画結果中の表示領域を変更する。
When the
図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
図4(B)に示すCSSスタイルシート410は、<h1>要素に対する装飾を示しており、横幅300px(ピクセル)、高さ50pxの矩形を3pxの破線で囲んだ矩形で装飾することを示している。
The
図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として機能し、タッチ操作により指示操作の入力を受付けるタッチパネル上で、動作を規定する領域に対してユーザの指等の接触が終了されたときに発生するイベントである。
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
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>要素を描画した箇条書き表示した状態でスクロールが止まったように表現することができる。
表示領域が領域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
図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
そこで、本実施形態では、例えば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
図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
なお、表示領域の補正は、一旦、通常の慣性スクロールが停止する位置を表示した後に行ってもいいし、慣性スクロール中にスクロールが停止する位置を予測し、最終的に補正後の表示領域でスクロールが停止するように見せてもよい。一旦、慣性スクロールが停止した後、算出した補正量に基づき表示領域を補正すれば、ユーザが見た目に表示領域の補正がなされたことが分かるようになる。一方、慣性スクロール中に、通常の慣性スクロールが停止するときの表示領域の位置、及びそれに基づく補正量を算出し、補正量を加味した位置にスクロールを停止したときの表示領域を決定すれば、補正をユーザに感じさせないような表示にすることができる。 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
その状態を回避するため、本実施形態では、例えば図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
表示領域711は、<canvas>要素の描画部分702の上端から上方の位置に、Webページをスワイプするための所定のサイズの領域が確保されるように表示領域を補正している例である。また、表示領域712は、<iframe>要素の描画部分703の下端より下方の位置に、Webページをスワイプするための所定サイズの領域が確保されるように表示領域を補正している例である。
表示領域711に補正するか、表示領域712に補正するかは、慣性スクロールが通常停止するはずであった表示領域704からの補正量に基づいて判断してもよい。本来停止する位置からの距離が小さい方がユーザにとっては自然に見えるため、例えば、表示領域704を表示領域711や表示領域712の位置に移動する補正量を算出して、補正量が小さい方に表示領域を補正する。また、事前に行ったスクロール方向を優先して補正する表示領域を決定してもよい。慣性スクロールが一旦、表示領域704で停止し、その後、表示領域を補正した位置にずらすようにユーザに見せる場合、スクロールが進む方向に補正した方がユーザにとって自然に見えるため、表示領域712の位置に表示領域を補正する。
Whether to correct to
図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
このような場合には、情報処理装置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
図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
本実施形態における情報処理装置100の処理例を図9に示すフローチャートを参照して説明する。図9に示す処理は、描画結果中の表示領域が変わるときに実行される。例えば、WebページのWebコンテンツを初めて読み込んで描画結果を生成して表示領域を確定するとき、又は、ユーザのWebページ再読み込みの指示により再描画して、改めて表示領域を算出したときに、図9に示す処理が実行される。または、ユーザによって慣性スクロールや描画結果の拡大縮小操作などが行われて表示領域が変更する時点で、図9に示す処理が実行される。なお、スクロールは、ユーザのスワイプ操作以外にもJavaScriptのscroll関数、scrollBy関数、scrollTo関数などにより指示される場合もある。
An example of processing of the
ステップ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
また、表示制御部201は、例えば、src属性によって特定のURLが指定されている要素を、スワイプでWebページのスクロールとは別の動作を行う内部コンテンツと判定する。図4(A)に示した<iframe>要素は、src属性値で地図サービスのURLが指定されている。各種の地図サービスでは、それぞれのサービス毎に地図に表示する緯度、経度の変更や拡大、縮小を指示する操作を定義しており、例えば、スワイプに対して緯度、経度の変更を割り当てているものもある。このような地図サービスがsrc属性で指定されていると、<iframe>要素の描画領域におけるスワイプはWebページのスクロールではなく、例えば、地図の緯度や経度の変更として処理される。このようにスワイプ操作に対して別の操作を割り当てているサービスのURLを予めリストとして保持しておき、<iframe>のsrc属性で指定されたURLがこのリストにあるか否かを判定する。これにより、スワイプでWebページのスクロールとは別の処理を行う内部コンテンツであるか否かを判定する。
In addition, the
なお、ステップ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
具体例を図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
ステップS903では、判定部202が、表示領域内にWebページのスクロールを指示するためのスワイプ領域が含まれているか否かを判定する。表示領域内にWebページのスクロールを指示するためのスワイプ領域が含まれていると判定部202が判定した場合(ステップS903においてYES)、ステップS904に進む。表示領域内にWebページのスクロールを指示するためのスワイプ領域が含まれていないと判定部202が判定した場合(ステップS903においてNO)、ステップS905に進む。
In step S903, the
図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
ステップS904では、制御部203が、最終的に決定した位置に表示領域を定める。図8に示した座標の場合、左上座標を(xd,yd)とし、幅Wd及び高さHdとする矩形を表示領域として設定する。そして、表示制御部201が、描画結果の表示領域をWebブラウザに表示する。
In step S904, the
ステップS905では、制御部203が、Webページをスクロールするために最低限必要となる領域を表示領域内に表示するための表示領域の補正量を算出して、ステップS906に進む。制御部203は、通常表示する表示領域を上下左右のどの方向にどの量、移動すればWebページをスクロールするために最低限必要となる領域の幅Ws、高さHsの矩形領域が表示領域内に表示されるかを算出する。
In step S905, the
図8に示したように1つの内部コンテンツ803を含む場合、制御部203は、以下の値を算出する。x方向の補正量をdxとし、y方向の補正量をdyとする。
・表示領域の上端に幅Wd、高さHd以上の領域を確保する場合:
dy≦(yc-Hs)
・表示領域の下端に幅Wd、高さHd以上の領域を確保する場合:
dy≧(Hs-Hd+yc+Hc)
・表示領域の左端に幅Wd、高さHd以上の領域を確保する場合:
dx≦(xc-Ws)
・表示領域の右端に幅Wd、高さHd以上の領域を確保する場合:
dx≧(Ws-Wd+xc+Wc)
8, when one internal content 803 is included, the
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
ステップS906では、制御部203が、ステップS905において選出した補正量の中で絶対値が最小のものが所定値以下であるか否かを判定する。補正量が所定値よりも大きいと制御部203が判定した場合(ステップS906においてNO)、ステップS907に進む。補正量が所定値以下であると制御部203が判定した場合(ステップS906においてYES)、ステップS908に進む。なお、ステップS905において補正値が候補として挙がらなかった場合にもステップS907に進む。
In step S906, the
通常表示する表示領域に対して、最終的に決定する表示領域の位置が大きく異なる場合、ユーザにとって違和感のある表示となることがある。そのため、ステップ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
ステップ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
ステップS908では、表示制御部201は、制御部203がステップS906において決定した補正量、もしくは、ステップS908において新たに生成した描画結果と表示領域の座標を用いて表示領域を決定する。表示制御部201は、制御部203から表示領域の補正量を指示された場合、通常表示する表示領域に補正量を加えた領域を表示領域として決定する。表示制御部201は、制御部203から新たな描画結果と表示領域の座標を指示された場合、新たな描画結果を表示対象として指示された座標に表示領域をとる。そして、ステップS904において、表示制御部201が、描画結果の表示領域をWebブラウザに表示する。
In step S908, the
以上の処理により、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起点):
sx≦(Wd-Ws-xc)/Wc
・Webページをスクロールするために最低限必要となる幅Ws以上、高さHs以上の矩形領域をx方向、内部コンテンツの左側に作る場合の倍率sx(top、right起点):
sx≦(Wc-Ws+xc)/Wc
・Webページをスクロールするために最低限必要となる幅Ws以上、高さHs以上の矩形領域をy方向、内部コンテンツの下側に作る場合の倍率sy(top、left起点):
sy≦(Hd-Hs-yc)/Hc
・Webページをスクロールするために最低限必要となる幅Ws以上、高さHs以上の矩形領域をy方向、内部コンテンツの上側に作る場合の倍率sy(bottom、left起点):
sy≦(Hc-Hs+yc)/Hc
6A, the drawing area of the <canvas>
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ページの第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ページを前記表示部に表示させる表示制御工程と、
前記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 .
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)
| 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 |
-
2021
- 2021-01-25 JP JP2021009332A patent/JP7612433B2/en active Active
Patent Citations (1)
| 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 |