JP2014191756A - Display change program, display change method and display change device - Google Patents

Display change program, display change method and display change device Download PDF

Info

Publication number
JP2014191756A
JP2014191756A JP2013068952A JP2013068952A JP2014191756A JP 2014191756 A JP2014191756 A JP 2014191756A JP 2013068952 A JP2013068952 A JP 2013068952A JP 2013068952 A JP2013068952 A JP 2013068952A JP 2014191756 A JP2014191756 A JP 2014191756A
Authority
JP
Japan
Prior art keywords
style
condition
rule
display screen
display
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.)
Granted
Application number
JP2013068952A
Other languages
Japanese (ja)
Other versions
JP6142620B2 (en
Inventor
Kenji Oki
憲二 大木
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2013068952A priority Critical patent/JP6142620B2/en
Publication of JP2014191756A publication Critical patent/JP2014191756A/en
Application granted granted Critical
Publication of JP6142620B2 publication Critical patent/JP6142620B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

PROBLEM TO BE SOLVED: To change into a style which does not satisfy a condition of a display screen width in the case where a display screen width set as a condition is not suitable for an actual condition and a user feels that the style is not suitable, or the like.SOLUTION: A display change program is adapted to execute processing for acquiring rewrite information in the case where a style change instruction is received in the state where a content screen is displayed by applying a condition satisfaction style satisfying a condition of a display screen width to a computer 1 among a plurality of styles specified with the display screen width as a condition, and rewriting a condition for each of the plurality of styles to "truth" or "false" on the basis of the rewrite information so as to apply any other style than the condition satisfaction style.

Description

本発明は、表示変更プログラム、表示変更方法及び表示変更装置に関する。   The present invention relates to a display change program, a display change method, and a display change device.

従来、マルチデバイス対応のWebサイトの開発を行なう際には、サーバサイドで、スマートフォン、タブレット、パーソナルコンピュータ(PC:personal computer)などの各端末向けに、それぞれ異なる固定レイアウトのHTML(HyperText Markup Language)などのコンテンツ(リソース)を用意し、ユーザエージェントを見て、各端末に適したコンテンツを提供する方法が採られていた。これをSSD(Server-Side Detection)という。   Conventionally, when developing multi-device websites, HTML (HyperText Markup Language) with different fixed layouts for each terminal on the server side, such as smartphones, tablets, personal computers (PCs), etc. Such a method has been adopted in which contents (resources) such as the above are prepared and contents suitable for each terminal are provided by looking at the user agent. This is called SSD (Server-Side Detection).

近年、端末の種類が急速に増加してきており、全ての端末のそれぞれに最適化することが開発、運用の両面で困難になってきている。
そこで、サーバサイドからは同一のコンテンツを提供し、それぞれの端末側で、表示画面幅に基づいてコンテンツのスタイル(レイアウトやデザイン)を動的に変更する方法が採られるようになってきている。これをレスポンシブWebデザイン(RWD:Responsive Web Design)という。
In recent years, the types of terminals have increased rapidly, and it has become difficult to optimize for all terminals in terms of both development and operation.
Accordingly, a method has been adopted in which the same content is provided from the server side, and the style (layout or design) of the content is dynamically changed on the terminal side based on the display screen width. This is called Responsive Web Design (RWD).

特開2004−110427号公報JP 2004-110427 A 特開2010−152797号公報JP 2010-152797 A 特開2010−191739号公報JP 2010-191739 A

ところで、上述のレスポンシブWebデザインでは、コンテンツ開発者が、スマートフォン向け、タブレット向け、PC向けなど数種類のスタイル(スタイルシート)を用意し、かつ、それぞれのスタイルを適用する条件として表示画面幅を設定する。そして、それぞれの端末側で、表示画面幅の条件を満たすスタイルを適用してコンテンツ画面を表示させる。   By the way, in the responsive web design described above, the content developer prepares several types of styles (style sheets) such as for smartphones, tablets, and PCs, and sets the display screen width as a condition for applying each style. . Then, on each terminal side, the content screen is displayed by applying a style that satisfies the condition of the display screen width.

しかしながら、コンテンツ開発者がそれぞれのスタイルを適用する条件として設定した表示画面幅が実態にそぐわない場合がある。例えば、既存のスマートフォンよりも幅の広いスマートフォンが新しく登場した場合に、タブレットと認識されてしまい、タブレット向けのスタイルが適用されてしまうことがある。また、例えば、タブレットにおいて標準ブラウザ以外の独自のブラウザを使用する場合に、インラインフレームの使用などで他のUI(user interface)コンポーネントに幅を取られ、表示画面幅が狭くなり、スマートフォンと認識されてしまい、スマートフォン向けのスタイルが適用されてしまうことがある。   However, the display screen width set by the content developer as a condition for applying each style may not match the actual situation. For example, when a new smartphone that is wider than an existing smartphone appears, it may be recognized as a tablet, and a style for tablets may be applied. Also, for example, when using an original browser other than the standard browser on the tablet, the width of the UI (user interface) component is reduced due to the use of an inline frame, etc., and the display screen width is narrowed and recognized as a smartphone. The style for smartphones may be applied.

特に、コンテンツ開発者は、既存の端末又はブラウザを想定して、それぞれのスタイルを適用する条件として表示画面幅を設定することは可能であるが、コンテンツ開発後に続々と登場する新しい端末又はブラウザに対応するのは困難であり、条件として設定された表示画面幅が実態にそぐわないことが起こりうる。
また、端末が表示画面幅の条件を満たすスタイルを適用するようになっているため、条件として設定された表示画面幅が実態にそぐわず、利用者がそのスタイルが適していないと感じる場合であっても、表示画面幅の条件を満たすスタイル以外のスタイル、即ち、表示画面幅の条件を満たさないスタイルに変更することはできない。
In particular, a content developer can set the display screen width as a condition for applying each style assuming an existing terminal or browser. It is difficult to respond, and the display screen width set as a condition may not match the actual situation.
In addition, since the terminal applies a style that satisfies the conditions of the display screen width, the display screen width set as a condition does not match the actual situation, and the user feels that the style is not suitable. However, the style cannot be changed to a style other than the style satisfying the display screen width, that is, the style not satisfying the display screen width condition.

そこで、条件として設定された表示画面幅が実態にそぐわず、利用者がそのスタイルが適していないと感じる場合などに、表示画面幅の条件を満たさないスタイルに変更できるようにすることを目的とする。   Therefore, the purpose is to be able to change to a style that does not satisfy the conditions of the display screen width when the display screen width set as a condition does not match the actual situation and the user feels that the style is not suitable. To do.

本表示変更プログラムは、コンピュータに、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、書換情報を取得し、条件充足スタイル以外のスタイルが適用されるように書換情報に基づいて複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える、処理を実行させることを要件とする。   This display change program applies a style change instruction to a computer in a state where a content screen is displayed by applying a condition-satisfaction style that satisfies the conditions of the display screen width among a plurality of styles defined on the condition of the display screen width. Process, the rewrite information is acquired, and the condition for each of the multiple styles is rewritten to "true" or "false" based on the rewrite information so that a style other than the condition satisfaction style is applied. Is a requirement.

本表示変更方法は、コンピュータが、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、書換情報を取得し、条件充足スタイル以外のスタイルが適用されるように書換情報に基づいて複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える、処理を実行することを要件とする。   In this display change method, the computer is instructed to change the style when the content screen is displayed by applying a condition-satisfaction style that satisfies the conditions of the display screen width, among the multiple styles defined on the condition of the display screen width. Process, the rewrite information is acquired, and the condition for each of the multiple styles is rewritten to "true" or "false" based on the rewrite information so that a style other than the condition satisfaction style is applied. It is a requirement to do.

本表示変更装置は、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、書換情報を取得する取得部と、条件充足スタイル以外のスタイルが適用されるように書換情報に基づいて複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える書換部とを備えることを要件とする。   The display change device receives a style change instruction in a state where a content screen is displayed by applying a condition satisfying style that satisfies the condition of the display screen width among a plurality of styles defined on the condition of the display screen width. A rewriting unit that rewrites the condition for each of a plurality of styles to `` true '' or `` false '' based on the rewriting information so that a style other than the condition satisfaction style is applied. It is a requirement to prepare.

したがって、表示画面幅の条件を満たさないスタイルに変更できるという利点がある。   Therefore, there is an advantage that the style can be changed to a style that does not satisfy the condition of the display screen width.

本実施形態にかかる表示変更装置を備える端末の構成を示す図である。It is a figure which shows the structure of a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末におけるスタイル変更の概要を示す模式図である。It is a schematic diagram which shows the outline | summary of the style change in a terminal provided with the display change apparatus concerning this embodiment. (A)〜(C)は、本実施形態にかかる表示変更装置を備える端末が取得するコンテンツに対して用意されているスタイルを示す図であって、(A)はスマートフォン向けのスタイルを示しており、(B)はタブレット向けのスタイルを示しており、(C)はPC向けのスタイルを示している。(A)-(C) is a figure which shows the style prepared with respect to the content which a terminal provided with the display change apparatus concerning this embodiment acquires, Comprising: (A) shows the style for smart phones. (B) shows the style for tablets, and (C) shows the style for PCs. 本実施形態にかかる表示変更装置を備える端末が取得するコンテンツのCSSファイルに含まれるメディアクエリを示す図である。It is a figure which shows the media query contained in the CSS file of the content which a terminal provided with the display change apparatus concerning this embodiment acquires. (A)〜(C)は、本実施形態にかかる表示変更装置を備える端末におけるスタイル変更方法を説明するための模式図である。(A)-(C) are the schematic diagrams for demonstrating the style change method in a terminal provided with the display change apparatus concerning this embodiment. (A)、(B)は、本実施形態にかかる表示変更装置を備える端末におけるスタイル保存方法を説明するための模式図である。(A), (B) is a schematic diagram for demonstrating the style preservation | save method in a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末における画面表示処理を説明するためのフローチャートである。It is a flowchart for demonstrating the screen display process in a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末におけるルール抽出処理を説明するためのフローチャートである。It is a flowchart for demonstrating the rule extraction process in a terminal provided with the display change apparatus concerning this embodiment. (A)、(B)は、本実施形態にかかる表示変更装置を備える端末によるルール抽出処理におけるルールに含まれる条件の取得方法を説明するための図である。(A), (B) is a figure for demonstrating the acquisition method of the conditions contained in the rule in the rule extraction process by the terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末のルール抽出処理における「media」、「min-width」、「max-width」の抽出方法を説明するための図である。It is a figure for demonstrating the extraction method of "media", "min-width", and "max-width" in the rule extraction process of a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末のルール抽出処理において作成されるルールテーブルを示す図である。It is a figure which shows the rule table produced in the rule extraction process of a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末における書換情報生成処理を説明するためのフローチャートである。It is a flowchart for demonstrating the rewriting information generation process in a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末における書換情報生成処理によって作成される書換情報テーブルを示す図である。It is a figure which shows the rewriting information table produced by the rewriting information generation process in a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末が取得するコンテンツのCSSファイルに含まれるメディアクエリの他の例を示す図である。It is a figure which shows the other example of the media query contained in the CSS file of the content which a terminal provided with the display change apparatus concerning this embodiment acquires. 本実施形態にかかる表示変更装置を備える端末のルール抽出処理において作成されるルールテーブルの他の例を示す図である。It is a figure which shows the other example of the rule table produced in the rule extraction process of a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末における書換情報生成処理によって作成される書換情報テーブルの他の例を示す図である。It is a figure which shows the other example of the rewriting information table produced by the rewriting information generation process in a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末におけるルール書換処理を説明するためのフローチャートである。It is a flowchart for demonstrating the rule rewriting process in a terminal provided with the display change apparatus concerning this embodiment. (A)、(B)は、本実施形態にかかる表示変更装置を備える端末におけるルール書換処理によってどのようにルールが書き換えられるかを説明するための図であって、(A)は書き換え前にどのようになっているかを示しており、(B)は、書き換え後にどのようになるかを示している。(A), (B) is a figure for demonstrating how a rule is rewritten by the rule rewriting process in the terminal provided with the display change apparatus concerning this embodiment, (A) is before rewriting. It shows how it looks, and (B) shows what it looks like after rewriting. 本実施形態にかかる表示変更装置を備える端末によるルール書換処理におけるルールの書換方法を説明するための図である。It is a figure for demonstrating the rewriting method of the rule in the rule rewriting process by the terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末における画面変更表示処理を説明するためのフローチャートである。It is a flowchart for demonstrating the screen change display process in a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末におけるスタイル変更処理の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the style change process in a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末におけるスタイル変更処理の他の例を説明するためのフローチャートである。It is a flowchart for demonstrating the other example of the style change process in a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末における保存処理を説明するためのフローチャートである。It is a flowchart for demonstrating the preservation | save process in a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末による保存処理における保存方法を説明するための図である。It is a figure for demonstrating the preservation | save method in the preservation | save process by the terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末における保存処理によって作成される再アクセス時書換情報テーブルを示す図である。It is a figure which shows the rewriting information table at the time of re-access created by the preservation | save process in a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置を備える端末における再アクセス時書換処理を説明するためのフローチャートである。It is a flowchart for demonstrating the rewriting process at the time of re-access in a terminal provided with the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置の端末への実装方法を説明するための図である。It is a figure for demonstrating the mounting method to the terminal of the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置の端末への実装方法を説明するための図である。It is a figure for demonstrating the mounting method to the terminal of the display change apparatus concerning this embodiment. 本実施形態にかかる表示変更装置の端末への他の実装方法を説明するための図である。It is a figure for demonstrating the other mounting method to the terminal of the display change apparatus concerning this embodiment.

以下、図面により、本発明の実施の形態にかかる表示変更プログラム、表示変更方法及び表示変更装置について、図1〜図30を参照しながら説明する。
本実施形態にかかる表示変更装置は、図2に示すように、例えばスマートフォン、タブレット、PCなどの端末1に備えられ、例えばHTMLファイル及びメディアクエリ(Media Query)を含むCSS(Cascading Style Sheet)ファイルからなるレスポンシブWebデザイン対応のコンテンツを提供するWebサイト(Webサーバ)70からコンテンツを取得する場合に、条件として設定された表示画面幅が実態にそぐわず、利用者がメディアクエリにしたがって適用されたスタイル(レイアウト)が適していないと感じたときに、端末1を操作して、動的にスタイルを切り替えられるようにするものである。つまり、コンテンツ開発時ではなく、利用者の閲覧時に、適したスタイルを選択できるようにするものである。なお、コンテンツを、Webコンテンツともいう。また、コンテンツには、例えばWebアプリケーションが提供するものも含まれる。
Hereinafter, a display change program, a display change method, and a display change device according to an embodiment of the present invention will be described with reference to FIGS.
As shown in FIG. 2, the display change device according to the present embodiment is provided in a terminal 1 such as a smartphone, a tablet, or a PC, for example, a CSS (Cascading Style Sheet) file including an HTML file and a media query (Media Query), for example. When acquiring content from a Web site (Web server) 70 that provides responsive Web design compatible content, the display screen width set as a condition does not match the actual situation, and the user is applied according to the media query When the style (layout) is not suitable, the terminal 1 is operated so that the style can be dynamically switched. That is, it is possible to select a suitable style at the time of browsing by the user, not at the time of content development. The content is also referred to as Web content. The content also includes content provided by, for example, a Web application.

本実施形態では、レスポンシブWebデザイン対応のコンテンツは、例えば、HTMLファイルとCSSファイルとからなり、CSSファイルが、CSS3で仕様として規定された、表示画面幅などの条件によって適用するスタイル(スタイルシート)を切り替えるために用いられるメディアクエリを含んでいる。このメディアクエリでは、表示画面幅を条件として複数のスタイルが規定されている。つまり、メディアクエリでは、スマートフォン向け、タブレット向け、PC向けなど数種類のスタイル(スタイルシート)が、それぞれのスタイルを適用する条件としての表示画面幅に対応づけて規定されている。このメディアクエリは、ルール(Rule)の集合(R0,...,Rn)として構成される。これはJavaScript(登録商標)オブジェクトとして取得可能である。また、メディアクエリの各ルールは、「真」(True)又は「偽」(False)のいずれかに評価される式であって、メディアタイプや表示画面幅などの条件(式)、スタイル(スタイルルール;CSS;CSSルール)を含む。そして、このようなレスポンシブWebデザイン対応のコンテンツを取得した端末に備えられているブラウザは、メディアクエリの各ルールの真偽(True or False)を評価し、「真」(True)と評価したスタイルを適用し、「偽」(False)と評価したスタイルは適用しないで、コンテンツ画面を表示させる。つまり、レスポンシブWebデザイン対応のコンテンツを取得した端末に備えられているブラウザは、表示画面幅の条件を満たすスタイルを適用して、コンテンツ画面を表示させる。なお、ブラウザをWebブラウザともいう。また、コンテンツ画面をWebページともいう。   In the present embodiment, the content corresponding to responsive web design is composed of, for example, an HTML file and a CSS file, and the CSS file is a style (style sheet) applied according to conditions such as a display screen width defined as a specification in CSS3. Contains media queries used to switch between. In this media query, a plurality of styles are defined on the condition of the display screen width. That is, in the media query, several types of styles (style sheets) such as those for smartphones, tablets, and PCs are defined in association with display screen widths as conditions for applying each style. This media query is configured as a set of rules (R0,..., Rn). This can be acquired as a JavaScript (registered trademark) object. Each rule of media query is an expression that evaluates to either “True” or “False”, and is a condition (expression) such as media type or display screen width, style (style) Rules; CSS; CSS rules). The browser provided in the terminal that has acquired such responsive web design-compatible content evaluates the true or false of each rule of the media query, and the style evaluated as “true”. Is applied, and the content screen is displayed without applying the style evaluated as “False”. That is, the browser provided in the terminal that has acquired the content corresponding to the responsive web design displays the content screen by applying the style that satisfies the condition of the display screen width. The browser is also referred to as a web browser. The content screen is also referred to as a web page.

例えば図3に示すように、スマートフォン向けのスタイルS0、タブレット向けのスタイルS1、PC向けのスタイルS2の3つのスタイルを用意しているレスポンシブWebデザイン対応のコンテンツでは、CSSファイルが、例えば図4に示すようなメディアクエリを含む。
ここでは、メディアクエリは、@media以降に記述されているルールの集合、即ち、スマートフォン向けのスタイルS0に対するルール、タブレット向けのスタイルS1に対するルール、PC向けのスタイルS2に対するルールの集合として構成されている。なお、ここでは、@media規則でメディアクエリを記述する場合を例に挙げて説明しているが、@import規則やHTML文書でのlink要素などで用いられるmedia属性値などの他のメディア指定できる箇所でメディアクエリを記述しても良い。
For example, as shown in FIG. 3, in the content corresponding to the responsive web design in which three styles of the style S0 for the smartphone, the style S1 for the tablet, and the style S2 for the PC are prepared, the CSS file is shown in FIG. Contains a media query as shown.
Here, the media query is configured as a set of rules described after @media, that is, a rule for the style S0 for smartphones, a rule for the style S1 for tablets, and a rule for the style S2 for PCs. Yes. Here, the case where a media query is described by the @media rule is described as an example, but other media designations such as a media attribute value used in a link element in an @import rule or an HTML document can be specified. A media query may be described at a location.

このうち、スマートフォン向けのスタイルS0に対するルールは、メディアタイプとして「screen」、条件として「(min-width:0px)and(max-width:320px)」、スタイルとして「スマートフォン向けCSS」を含む。このルールは、ブラウザに対し、ブラウザの表示画面幅が0ピクセル以上320ピクセル以下の場合に、スマートフォン向けCSSを適用するように指示する。また、タブレット向けのスタイルS1に対するルールは、メディアタイプとして「screen」、条件として「(min-width:321px)and(max-width:768px)」、スタイルとして「タブレット向けCSS」を含む。このルールは、ブラウザに対し、ブラウザの表示画面幅が321ピクセル以上768ピクセル以下の場合に、タブレット向けCSSを適用するように指示する。また、PC向けのスタイルS2に対するルールは、メディアタイプとして「screen」、条件として「(min-width:769px)」、スタイルとして「PC向けCSS」を含む。このルールは、ブラウザに対し、ブラウザの表示画面幅が769ピクセル以上の場合に、PC向けCSSを適用するように指示する。この例では、コンテンツ開発者は、0ピクセル以上320ピクセル以下の表示画面幅を持つものをスマートフォンと想定し、321ピクセル以上768ピクセル以下の表示画面幅を持つものをタブレットと想定し、769ピクセル以上の表示画面幅を持つものをPCと想定し、320ピクセル、768ピクセルを、それぞれ、ブレークポイント(閾値)として、スタイルを切り替えるようにしている。なお、ブラウザの表示画面を、ブラウザの表示領域又はブラウザのウィンドウともいう。また、スマートフォンやタブレットなどの端末では、ブラウザ(モバイルブラウザ)の表示画面のサイズが固定であり、任意にリサイズすることができないため、ブラウザの表示画面幅と端末の画面幅とは一致する。また、ここでは、ブラウザの表示画面幅に基づいてスタイルを切り替えるようにしているが、ブラウザの表示画面幅の代わりに端末の画面幅を用いても良い。   Among these, the rules for the smartphone style S0 include “screen” as the media type, “(min-width: 0px) and (max-width: 320px)” as the condition, and “CSS for smartphone” as the style. This rule instructs the browser to apply CSS for smartphones when the display screen width of the browser is 0 pixel or more and 320 pixels or less. The rules for the tablet style S1 include “screen” as the media type, “(min-width: 321px) and (max-width: 768px)” as the condition, and “CSS for tablet” as the style. This rule instructs the browser to apply the tablet-oriented CSS when the display screen width of the browser is not less than 321 pixels and not more than 768 pixels. Further, the rules for the PC style S2 include “screen” as the media type, “(min-width: 769px)” as the condition, and “CSS for PC” as the style. This rule instructs the browser to apply the CSS for PC when the browser display screen width is 769 pixels or more. In this example, the content developer assumes a smartphone having a display screen width of 0 to 320 pixels as a smartphone, assumes a tablet having a display screen width of 321 to 768 pixels as a tablet, and 769 pixels or more. The display screen width is assumed to be a PC, and the style is switched using 320 pixels and 768 pixels as break points (threshold values), respectively. The browser display screen is also referred to as a browser display area or a browser window. Further, in a terminal such as a smartphone or a tablet, the size of the display screen of the browser (mobile browser) is fixed and cannot be arbitrarily resized, so the display screen width of the browser matches the screen width of the terminal. Here, the style is switched based on the display screen width of the browser, but the screen width of the terminal may be used instead of the display screen width of the browser.

そして、例えば、このようなレスポンシブWebデザイン対応のコンテンツを取得した端末に備えられているブラウザの表示画面幅が330ピクセルであるとすると、これは321ピクセル以上768ピクセル以下の条件を満たす。このため、ブラウザは、タブレット向けCSSを適用して、コンテンツ画面を表示させる。つまり、ブラウザは、タブレット向けのスタイルS1に対するルールを「真」(True)と評価し、スマートフォン向けのスタイルS0に対するルール及びPC向けのスタイルS2に対するルールを「偽」(False)と評価し、「真」(True)と評価したタブレット向けのスタイルS1を適用して、コンテンツ画面を表示させる。   For example, if the display screen width of the browser provided in the terminal that has acquired the content corresponding to such responsive Web design is 330 pixels, this satisfies the condition of 321 to 768 pixels. For this reason, a browser applies CSS for tablets and displays a content screen. That is, the browser evaluates the rule for the style S1 for the tablet as “true”, evaluates the rule for the style S0 for the smartphone and the rule for the style S2 for the PC as “false”, The style S1 for tablets evaluated as “True” is applied to display the content screen.

しかしながら、コンテンツ開発者がそれぞれのスタイルを適用する条件として設定した表示画面幅が実態にそぐわず、利用者が上述のようにして表示したコンテンツ画面のスタイルが適していないと感じる場合がある。
特に、コンテンツ開発者は、既存の端末又はブラウザを想定して、それぞれのスタイルを適用する条件として表示画面幅を設定することは可能であるが、コンテンツ開発後に続々と登場する新しい端末又はブラウザに対応するのは困難であり、条件として設定された表示画面幅が実態にそぐわず、利用者がそのスタイルが適していないと感じる場合がある。
However, the display screen width set by the content developer as a condition for applying each style may not match the actual situation, and the user may feel that the style of the content screen displayed as described above is not suitable.
In particular, a content developer can set the display screen width as a condition for applying each style assuming an existing terminal or browser. It is difficult to respond, and the display screen width set as a condition is not suitable for the actual situation, and the user may feel that the style is not suitable.

また、端末が表示画面幅の条件を満たすスタイルを適用するようになっているため、条件として設定された表示画面幅が実態にそぐわず、利用者がそのスタイルが適していないと感じる場合であっても、表示画面幅の条件を満たすスタイル以外のスタイル、即ち、表示画面幅の条件を満たさないスタイルに変更することはできない。
例えば、スマートフォンやタブレットなどの端末では、ブラウザの表示画面幅(又は端末の画面幅)に基づいて、表示画面幅の条件を満たすスタイルが一義的に適用されてしまう。このため、利用者がそのスタイルが適していないと感じる場合であっても、表示画面幅の条件を満たすスタイル以外のスタイル、即ち、表示画面幅の条件を満たさないスタイルに変更することはできない。
In addition, since the terminal applies a style that satisfies the conditions of the display screen width, the display screen width set as a condition does not match the actual situation, and the user feels that the style is not suitable. However, the style cannot be changed to a style other than the style satisfying the display screen width, that is, the style not satisfying the display screen width condition.
For example, in a terminal such as a smartphone or a tablet, a style that satisfies the condition of the display screen width is uniquely applied based on the display screen width of the browser (or the screen width of the terminal). For this reason, even if the user feels that the style is not suitable, it cannot be changed to a style other than the style that satisfies the condition of the display screen width, that is, the style that does not satisfy the condition of the display screen width.

このようなスマートフォンやタブレットなどの端末では、利用者は、ブラウザの表示画面のサイズ(ウィンドウサイズ)を任意に変えることができないのに対し、PCなどの端末では、利用者は、ブラウザの表示画面のサイズ(ウィンドウサイズ)を任意に変えることができる。このため、利用者がブラウザの表示画面のサイズを変えた場合に、適用されるスタイルが切り替わるようにすることも可能である。つまり、利用者が、ブラウザの表示画面のサイズを端末の画面サイズに一致させている場合には、PC向けのスタイルが適用され、ブラウザの表示画面のサイズを端末の画面サイズよりも小さくした場合には、その程度に応じて、タブレット向けのスタイルやスマートフォン向けのスタイルが適用されるようにすることも可能である。しかしながら、このような場合も、ブラウザの表示画面幅の条件を満たすスタイルが適用されるにすぎず、利用者がそのスタイルが適していないと感じる場合に、表示画面幅の条件を満たすスタイル以外のスタイル、即ち、表示画面幅の条件を満たさないスタイルに変更することはできない。   In such a terminal such as a smartphone or a tablet, the user cannot arbitrarily change the size (window size) of the browser display screen, whereas in the terminal such as a PC, the user cannot change the browser display screen. The size (window size) can be changed arbitrarily. For this reason, when the user changes the size of the display screen of the browser, the applied style can be switched. In other words, if the user matches the size of the browser display screen to the screen size of the terminal, the PC-oriented style is applied and the browser display screen size is made smaller than the terminal screen size. Depending on the degree, a style for tablets and a style for smartphones can be applied. However, in such a case, only the style that satisfies the display screen width of the browser is applied, and when the user feels that the style is not suitable, the style other than the style that satisfies the display screen width is applied. It is not possible to change to a style that does not satisfy the condition of the display screen width.

そこで、本実施形態では、条件として設定された表示画面幅が実態にそぐわず、利用者がメディアクエリにしたがって適用されたスタイルが適していないと感じる場合に、端末1を操作して、他のスタイル、即ち、表示画面幅の条件を満たさないスタイルに変更できるようにしている。
ここでは、図5(A)に示すように、端末画面1A上に上述のようにしてコンテンツ画面が表示された状態で、例えばフリック(画面を指ではじく動作)などの利用者からの指示を受けた場合、図5(B)に示すように、例えば「Change」ボタンや「Save」ボタンを含むダイアログボックス1Bを表示させる。そして、利用者が現在のスタイルが適していないと感じ、ダイアログボックス1B内の「Change」ボタンを押した場合、即ち、スタイル変更指示を受けた場合、図5(C)に示すように、他のスタイル、即ち、表示画面幅の条件を満たさないスタイルに切り替えるようにしている。ここでは、上述のようにして、表示画面幅の条件を満たすスタイルとして、タブレット向けのスタイルS1が適用されたコンテンツ画面から、例えばPC向けのスタイルS2が適用されたコンテンツ画面(スタイル変更画面)に切り替えるようにしている。
Therefore, in this embodiment, when the display screen width set as a condition is not suitable for the actual situation and the user feels that the style applied according to the media query is not suitable, the terminal 1 is operated to The style can be changed to a style that does not satisfy the condition of the display screen width.
Here, as shown in FIG. 5A, in the state where the content screen is displayed on the terminal screen 1A as described above, for example, an instruction from the user such as flick (flicking the screen with a finger) is given. When received, a dialog box 1B including, for example, a “Change” button and a “Save” button is displayed as shown in FIG. When the user feels that the current style is not appropriate and presses the “Change” button in the dialog box 1B, that is, when a style change instruction is received, as shown in FIG. The style is switched to a style that does not satisfy the condition of the display screen width. Here, as described above, as a style satisfying the condition of the display screen width, a content screen to which a style S1 for tablets is applied is changed to a content screen (style change screen) to which a style S2 for PC is applied. I try to switch.

そして、再度、利用者が「Change」ボタンを押した場合、PC向けのスタイルS2が適用されたコンテンツ画面から、例えばスマートフォン向けのスタイルS0が適用されたコンテンツ画面(スタイル変更画面)に切り替えるようにしている。
このように、利用者が「Change」ボタンを押すたびに、PC向けのスタイルS2、スマートフォン向けのスタイルS0、タブレット向けのスタイルS1を順に適用し、スタイルを切り替えるようにしている。
When the user presses the “Change” button again, the content screen to which the style S2 for PC is applied is switched to the content screen (style change screen) to which the style S0 for smartphone is applied, for example. ing.
In this way, each time the user presses the “Change” button, the style S2 for PC, the style S0 for smartphone, and the style S1 for tablet are sequentially applied to switch the style.

なお、ここでは、ボタン押下をスタイル切替イベント(スタイル変更イベント)として用いているが、これに限られるものではなく、端末1のブラウザが認識できるイベントを用いれば良い。例えば、タップやフリックなどを用いても良いし、端末1の加速度変更時に呼ばれるdevicemotionイベントをトリガとして端末1を振る動作でスタイルを切り替えるようにしても良い。   Here, button press is used as a style switching event (style change event). However, the present invention is not limited to this, and an event that can be recognized by the browser of the terminal 1 may be used. For example, a tap or flick may be used, or the style may be switched by an operation of shaking the terminal 1 triggered by a devicemotion event called when the acceleration of the terminal 1 is changed.

また、本実施形態では、利用者が、図6(A)に示すように、端末画面1A上に例えばPC向けのスタイルS2が適用されたコンテンツ画面が表示された状態で、図6(B)に示すように、ダイアログボックス1Bを表示させ、ダイアログボックス1B内の「Save」ボタンを押した場合、即ち、スタイル保存指示を受けた場合、その時に適用されているスタイルにするために必要な情報(後述の書換情報)とWebサイトのアドレスとを対応づけてローカルストレージ(ハードディスク;記憶部)に格納するようにしている。   In the present embodiment, as shown in FIG. 6A, the user displays a content screen to which a style S2 for PC, for example, is displayed on the terminal screen 1A, as shown in FIG. When the dialog box 1B is displayed and the “Save” button in the dialog box 1B is pressed, that is, when a style saving instruction is received, information necessary for the style applied at that time is displayed. (Rewriting information to be described later) and a website address are associated with each other and stored in a local storage (hard disk; storage unit).

そして、再度、利用者がその端末1でそのWebサイトにアクセスした場合、そのWebサイトのアドレスに基づいて、ローカルストレージから保存指示を受けたスタイルにするために必要な情報(後述の書換情報)を取得し、これに基づいてスタイルを適用してコンテンツ画面を表示させるようにしている。
これらを実現すべく、本実施形態では、例えばスマートフォン、タブレット、PCなどの端末1を、後述の表示変更装置を備えるものとしている。なお、端末1を、利用端末、通信端末、情報端末などともいう。
Then, when the user accesses the website again with the terminal 1, information necessary for making the style received the save instruction from the local storage based on the address of the website (rewrite information described later) And applying a style based on this to display the content screen.
In order to realize these, in the present embodiment, for example, a terminal 1 such as a smartphone, a tablet, or a PC is provided with a display change device described later. Note that the terminal 1 is also referred to as a use terminal, a communication terminal, an information terminal, or the like.

ここでは、後述の表示変更装置を備える端末1は、以下のように構成される。
まず、端末1のハードウェア構成について、図7を参照しながら説明する。
端末1は、コンピュータであり、そのハードウェア構成は、例えば図7に示すように、CPU(Central Processing Unit)102、メモリ101、通信制御部109、入力装置106、表示制御部103、表示装置104、記憶装置105、可搬型記録媒体108のドライブ装置107を備え、これらがバス110によって相互に接続された構成になっている。なお、本装置のハードウェア構成はこれに限られるものではない。例えば可搬型記録媒体108のドライブ装置107を備えないものであっても良い。
Here, the terminal 1 provided with the display change apparatus mentioned later is comprised as follows.
First, the hardware configuration of the terminal 1 will be described with reference to FIG.
The terminal 1 is a computer, and its hardware configuration is, for example, as shown in FIG. 7, a CPU (Central Processing Unit) 102, a memory 101, a communication control unit 109, an input device 106, a display control unit 103, and a display device 104. , A storage device 105, and a drive device 107 for a portable recording medium 108, which are connected to each other via a bus 110. Note that the hardware configuration of the present apparatus is not limited to this. For example, the portable recording medium 108 may not include the drive device 107.

ここで、CPU102は、コンピュータ全体を制御するものであり、プログラムをメモリ101に読み出して実行し、表示変更装置を備える端末1に必要な処理を行なうものである。
メモリ101は、例えばRAMなどの主記憶装置であり、プログラムの実行、データの書き換え等を行なう際に、プログラム又はデータを一時的に格納するものである。
Here, the CPU 102 controls the entire computer, reads the program into the memory 101 and executes it, and performs processing necessary for the terminal 1 including the display change device.
The memory 101 is a main storage device such as a RAM, and temporarily stores a program or data when executing a program, rewriting data, or the like.

通信制御部109(通信インターフェース)は、例えばLANやインターネットなどのネットワークを介して、他の装置と通信するために用いられるものである。この通信制御部109は、コンピュータに元から組み込まれていても良いし、後からコンピュータに取り付けられたNIC(Network Interface Card)でも良い。
入力装置106は、例えば、タッチパネル、プッシュボタン、マウスなどのポインティングデバイス、キーボードなどである。
The communication control unit 109 (communication interface) is used to communicate with other devices via a network such as a LAN or the Internet. The communication control unit 109 may be incorporated in the computer from the beginning, or may be a NIC (Network Interface Card) attached to the computer later.
The input device 106 is, for example, a touch panel, a push button, a pointing device such as a mouse, a keyboard, or the like.

表示装置104は、例えば液晶ディスプレイなどの表示装置である。
表示制御部103は、例えばコンテンツ画面などを表示装置104に表示させるための制御を行なうものである。
記憶装置105は、例えばハードディスクドライブ(HDD)やSSDなどの補助記憶装置であり、各種のプログラム及び各種のデータが格納されている。特に、本実施形態では、記憶装置105には、ブラウザプログラムや表示変更プログラムが格納されている。なお、メモリ101として、例えばROM(Read Only Memory)を備え、これに各種のプログラムや各種のデータを格納しておいても良い。
The display device 104 is a display device such as a liquid crystal display.
The display control unit 103 performs control for displaying, for example, a content screen on the display device 104.
The storage device 105 is an auxiliary storage device such as a hard disk drive (HDD) or an SSD, and stores various programs and various data. In particular, in the present embodiment, the storage device 105 stores a browser program and a display change program. As the memory 101, for example, a ROM (Read Only Memory) may be provided, and various programs and various data may be stored therein.

ドライブ装置107は、例えばフラッシュメモリ等の半導体メモリ、光ディスク、光磁気ディスク等の可搬型記録媒体108の記憶内容にアクセスするためのものである。
このようなハードウェア構成を備える端末1において、CPU102が、例えば記憶装置105に格納されているブラウザプログラムをメモリ101に読み出して実行することで、ブラウザの各機能、即ち、図1に示す画面表示部2が実現される。また、端末1において、CPU102が、例えば記憶装置105に格納されている表示変更プログラムをメモリ101に読み出して実行することで、表示変更装置の各機能、即ち、図1に示すスタイル変更部3が実現される。なお、ここでは、表示変更プログラムは、ブラウザが解釈できる言語(ここではJavaScript)で記述されている。そして、ブラウザはJavascriptエンジンを備える。
The drive device 107 is for accessing the storage contents of a portable recording medium 108 such as a semiconductor memory such as a flash memory, an optical disk, or a magneto-optical disk.
In the terminal 1 having such a hardware configuration, the CPU 102 reads out, for example, a browser program stored in the storage device 105 to the memory 101 and executes it, whereby each function of the browser, that is, the screen display shown in FIG. Part 2 is realized. Further, in the terminal 1, the CPU 102 reads out and executes, for example, the display change program stored in the storage device 105 into the memory 101, so that each function of the display change device, that is, the style change unit 3 shown in FIG. Realized. Here, the display change program is described in a language (JavaScript here) that can be interpreted by the browser. The browser has a Javascript engine.

つまり、本実施形態では、端末1は、図1に示すように、画面表示部(ブラウザ)2と、スタイル変更部(表示変更装置)3とを備え、これらによって画面表示処理及び表示変更処理(表示変更方法)が行なわれるようになっている。ここで、画面表示処理は、CPU102がメインメモリ101に読み込まれたブラウザプログラムに従って実行する処理であり、表示変更処理は、CPU102がメインメモリ101に読み込まれた表示変更プログラムに従って実行する処理(表示変更方法)である。   That is, in the present embodiment, the terminal 1 includes a screen display unit (browser) 2 and a style change unit (display change device) 3 as shown in FIG. Display change method). Here, the screen display process is a process executed by the CPU 102 in accordance with the browser program read into the main memory 101, and the display change process is a process (display change) executed by the CPU 102 in accordance with the display change program read into the main memory 101. Method).

ここで、画面表示部2は、解析部4と、描画部5とを備え、それぞれにおいて、以下のような処理が行なわれる。
解析部4は、Webサイトから取得したコンテンツを解析する。ここでは、解析部4は、Webサイトから取得したHTMLファイル及びCSSファイルを解析し、DOM(Document Object Model)ツリー及びスタイルルールとしてメモリ101上に保持する(図8のステップS10参照)。ここで、メモリ101上のDOMツリーを保持している部分をDOMツリー保持部101Aといい、メモリ101上のスタイルルールを保持している部分をスタイルルール保持部101Bという。なお、DOMツリーやスタイルルールの仕様は、W3CのDocument Object Model Level 2 Style Specification(DOM2SS)に規定されている。
Here, the screen display unit 2 includes an analysis unit 4 and a drawing unit 5, and each of the following processes is performed.
The analysis unit 4 analyzes the content acquired from the website. Here, the analysis unit 4 analyzes the HTML file and the CSS file acquired from the website, and stores them in the memory 101 as a DOM (Document Object Model) tree and a style rule (see step S10 in FIG. 8). Here, the part holding the DOM tree on the memory 101 is called a DOM tree holding unit 101A, and the part holding the style rule on the memory 101 is called a style rule holding unit 101B. Note that the specifications of the DOM tree and style rules are defined in W3C Document Object Model Level 2 Style Specification (DOM2SS).

描画部5は、メモリ101上に保持されたDOMツリー及びスタイルルールに基づいてコンテンツ画面を描画する(図8のステップS20参照)。つまり、描画部5は、DOMツリーにスタイルルールを適用してコンテンツ画面を描画する。なお、描画部5は、スタイルルールが書き換えられると、再度、書き換えられたスタイルルールをDOMツリーに適用してコンテンツ画面を描画する(図8のステップS30、S40参照)。   The drawing unit 5 draws the content screen based on the DOM tree and style rules held on the memory 101 (see step S20 in FIG. 8). That is, the drawing unit 5 draws the content screen by applying the style rule to the DOM tree. When the style rule is rewritten, the drawing unit 5 again applies the rewritten style rule to the DOM tree to draw the content screen (see steps S30 and S40 in FIG. 8).

本実施形態では、CSSファイルは、例えば上述のようなメディアクエリ(図4参照)を含む。なお、ここでは、端末1に備えられているブラウザの表示画面幅は例えば330ピクセルとする。
このため、画面表示部2は、CSSファイルに含まれるメディアクエリを解析し、メモリ101上に保持されているスタイルルールをDOMツリーに適用する際に、ブラウザの表示画面幅である330ピクセルは、321ピクセル以上768ピクセル以下という条件を満たすとして、タブレット向けCSSを適用して、コンテンツ画面を表示させる。つまり、画面表示部2は、タブレット向けのスタイルS1に対するルールを「真」(True)と評価し、スマートフォン向けのスタイルS0に対するルール及びPC向けのスタイルS2に対するルールを「偽」(False)と評価し、「真」(True)と評価したタブレット向けのスタイルS1を適用して、コンテンツ画面を表示させる。
In the present embodiment, the CSS file includes a media query as described above (see FIG. 4), for example. Here, the display screen width of the browser provided in the terminal 1 is, for example, 330 pixels.
For this reason, when the screen display unit 2 analyzes the media query included in the CSS file and applies the style rule stored in the memory 101 to the DOM tree, the display pixel width 330 pixels of the browser is Assuming that the condition of 321 pixels or more and 768 pixels or less is satisfied, the content screen is displayed by applying CSS for tablets. In other words, the screen display unit 2 evaluates the rule for the style S1 for tablets as “True”, and evaluates the rule for the style S0 for smartphones and the rule for the style S2 for PC as “False”. Then, the style S1 for tablets evaluated as “True” is applied to display the content screen.

このように、画面表示部2は、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイル(ここではタブレット向けのスタイルS1)を適用してコンテンツ画面を表示させる。
スタイル変更部3は、スタイル変更指示を受けた場合に、適用されるスタイルが変更されるようにする。つまり、スタイル変更部3は、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、条件充足スタイル以外のスタイルが適用されるように複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える。
As described above, the screen display unit 2 applies the condition satisfaction style (here, the style S1 for a tablet) that satisfies the condition of the display screen width among the plurality of styles defined on the condition of the display screen width as a content screen. Is displayed.
The style changing unit 3 changes the applied style when receiving a style change instruction. In other words, the style changing unit 3 issues a style change instruction in a state where the content screen is displayed by applying a condition satisfying style that satisfies the condition of the display screen width among a plurality of styles defined on the condition of the display screen width. When received, the condition for each of the plurality of styles is rewritten to “true” or “false” so that a style other than the condition satisfaction style is applied.

このため、スタイル変更部3は、ルール抽出部6と、書換情報生成部7と、ルール書換部8とを備え、それぞれにおいて、以下のような処理が行なわれる。
ルール抽出部6は、メモリ101(ここではスタイルルール保持部101B)から、CSSファイルのメディアクエリを解析して得られた全てのスタイルに対するルールに含まれる条件を取得し、表示画面幅に関する条件を抽出し、ルールテーブル(図12参照)に格納する。
For this reason, the style changing unit 3 includes a rule extracting unit 6, a rewriting information generating unit 7, and a rule rewriting unit 8, each of which performs the following processing.
The rule extraction unit 6 acquires conditions included in the rules for all styles obtained by analyzing the media query of the CSS file from the memory 101 (here, the style rule holding unit 101B), and sets the conditions regarding the display screen width. Extract and store in the rule table (see FIG. 12).

ここでは、まず、ルール抽出部6は、メモリ101(ここではスタイルルール保持部101B)から、CSSファイルのメディアクエリを解析して得られた全てのスタイルに対するルールに含まれる条件を取得する(図9のステップA10参照)。ここで、W3CのDOM2SSにおいてCSSのオブジェクトモデルやインタフェースが規定されており、メディアクエリを扱える端末1のブラウザにはこの仕様が実装されているため、メモリ101上に保持されている全てのスタイルに対するルールに含まれる条件は、この仕様に基づいたアクセスによって取得可能である。ここで、CSSファイルのメディアクエリが、図10(A)に示すようなスマートフォン向けのスタイルS0に対するルールを含む場合、このCSSファイルのメディアクエリに含まれているスマートフォン向けのスタイルS0に対するルールを解析して得られたルールに含まれる条件(ここではDOM2SSで規定されているtypeがMEDIA_RULEであるcssRuleオブジェクト集合のMediaText)は、図10(B)に示すようなコードによって取得可能である。ここでは、CSSファイルのメディアクエリに含まれているスマートフォン向けのスタイルS0に対するルールを解析して得られたルールに含まれる条件として、「only screen and (min-width:0px) and (max-width:320px)」が取得される。なお、図10(B)では、参考のために、下側にログ出力も表示している。同様に、CSSファイルのメディアクエリに含まれているタブレット向けのスタイルS1に対するルールを解析して得られたルールに含まれる条件及びPC向けのスタイルS2に対するルールを解析して得られたルールに含まれる条件も取得可能である。ここでは、CSSファイルのメディアクエリに含まれているタブレット向けのスタイルS1に対するルールを解析して得られたルールに含まれる条件として、「only screen and (min-width:321px) and (max-width:768px)」が取得され、PC向けのスタイルS2に対するルールを解析して得られたルールに含まれる条件として、「only screen and (min-width:769px)」が取得される。また、これらのルールに含まれる条件は、インデックス番号(cssRuleオブジェクト集合のインデックス番号;rule_num)に対応づけて取得される(図9のステップA10参照)。ここでは、スマートフォン向けのスタイルS0に対するルールを解析して得られたルールに含まれる条件は、インデックス番号「0」に対応づけて取得される。また、タブレット向けのスタイルS1に対するルールを解析して得られたルールに含まれる条件は、インデックス番号「1」に対応づけて取得される。また、PC向けのスタイルS2に対するルールを解析して得られたルールに含まれる条件は、インデックス番号「2」に対応づけて取得される。このようにして、CSSファイルのメディアクエリを解析して得られた全てのスタイルに対するルールに含まれる条件を取得することができる。つまり、CSSファイルのメディアクエリにおいて表示画面幅を条件として規定された複数のスタイルに対するルールの全て、即ち、表示画面幅に基づいて切り替え可能なスタイルに対するルールの全てを取得することができる。   Here, first, the rule extraction unit 6 acquires conditions included in the rules for all the styles obtained by analyzing the media query of the CSS file from the memory 101 (here, the style rule holding unit 101B) (see FIG. 9 step A10). Here, CSS object model and interface are defined in DOM2SS of W3C, and this specification is implemented in the browser of terminal 1 that can handle media queries. The condition included in the rule can be acquired by access based on this specification. Here, when the media query of the CSS file includes a rule for the style S0 for the smartphone as shown in FIG. 10A, the rule for the style S0 for the smartphone included in the media query of the CSS file is analyzed. The conditions included in the rule obtained here (here, MediaText of the cssRule object set whose type specified by DOM2SS is MEDIA_RULE) can be obtained by a code as shown in FIG. Here, as a condition included in the rule obtained by analyzing the rule for the style S0 for smartphones included in the media query of the CSS file, “only screen and (min-width: 0px) and (max-width : 320px) "is acquired. In FIG. 10B, the log output is also displayed on the lower side for reference. Similarly, the conditions included in the rules obtained by analyzing the rules for the style S1 for tablets included in the media query of the CSS file and the rules obtained by analyzing the rules for the style S2 for PCs Conditions can also be obtained. Here, as a condition included in the rule obtained by analyzing the rule for the style S1 for tablets included in the media query of the CSS file, “only screen and (min-width: 321px) and (max-width : 768px) ”is acquired, and“ only screen and (min-width: 769px) ”is acquired as a condition included in the rule obtained by analyzing the rule for the style S2 for PC. The conditions included in these rules are acquired in association with index numbers (index number of cssRule object set; rule_num) (see step A10 in FIG. 9). Here, the condition included in the rule obtained by analyzing the rule for the style S0 for smartphones is acquired in association with the index number “0”. The condition included in the rule obtained by analyzing the rule for the style S1 for tablets is acquired in association with the index number “1”. Further, the condition included in the rule obtained by analyzing the rule for the style S2 for PC is acquired in association with the index number “2”. In this way, the conditions included in the rules for all styles obtained by analyzing the media query of the CSS file can be acquired. That is, it is possible to acquire all the rules for a plurality of styles that are defined by the display screen width as a condition in the media query of the CSS file, that is, all the rules for the styles that can be switched based on the display screen width.

次いで、ルール抽出部6は、上述のようにして取得された全てのスタイルに対するルールに含まれる条件の中から、正規表現を用いて、「media」、「min-width」、「max-width」のそれぞれの値(属性値)を抽出する(図9のステップA20参照)。例えば、上述のようにして取得されたスマートフォン向けのスタイルに対するルールに含まれる条件の中から、「media」、「min-width」、「max-width」のそれぞれの値を、図11に示すようなコードによって抽出可能である。なお、図11では、参考のために、下側にログ出力も表示している。   Next, the rule extraction unit 6 uses “regular expressions” from among the conditions included in the rules for all the styles acquired as described above to perform “media”, “min-width”, “max-width”. Each value (attribute value) is extracted (see step A20 in FIG. 9). For example, the values of “media”, “min-width”, and “max-width” out of the conditions included in the rules for the smartphone style acquired as described above are as shown in FIG. Can be extracted by simple code. In FIG. 11, the log output is also displayed on the lower side for reference.

次に、ルール抽出部6は、上述のようにして全てのスタイルに対するルールに含まれる条件の中からそれぞれ抽出された「media」の値が「screen」であるか否かを順番に判定し(図9のステップA30参照)、「media」の値が「screen」であると判定した場合は、YESルートへ進み、「rule_num」、「min-width」、「max-width」のそれぞれの値をルールテーブルに格納する(図9のステップA40参照)。一方、「media」の値が「screen」でないと判定した場合は、これらの値のルールテーブルへの格納は行なわない。このようにして、図12に示すように、インデックス番号(rule_num)と表示画面幅に関する条件(最小幅「min-width」、最大幅「max-width」)とが対応づけられたルールテーブルが作成される。   Next, the rule extraction unit 6 sequentially determines whether or not the value of “media” extracted from the conditions included in the rules for all styles as described above is “screen” ( When it is determined that the value of “media” is “screen”, the process proceeds to the YES route, and the values of “rule_num”, “min-width”, and “max-width” are set. Store in the rule table (see step A40 in FIG. 9). On the other hand, when it is determined that the value of “media” is not “screen”, these values are not stored in the rule table. In this way, as shown in FIG. 12, a rule table is created in which the index number (rule_num) is associated with the condition related to the display screen width (minimum width “min-width”, maximum width “max-width”). Is done.

書換情報生成部7は、図1に示すように、様々な表示画面幅に対して、それぞれの表示画面幅に関する条件を満たすか否かの評価(「真」又は「偽」)の組み合わせとして起こり得るものを全て抽出し、これを用いて、メモリ101上のスタイルルール保持部101Bに保持されているルールに含まれる表示画面幅に関する条件を書き換える書換コードを生成し、メモリ101上の書換情報テーブル101Cに格納する。なお、書換情報テーブル101Cを書換情報保持部ともいう。   As shown in FIG. 1, the rewrite information generation unit 7 occurs as a combination of evaluations (“true” or “false”) as to whether or not a condition regarding each display screen width is satisfied for various display screen widths. All the obtained items are extracted, and by using this, a rewrite code for rewriting the condition relating to the display screen width included in the rule held in the style rule holding unit 101B on the memory 101 is generated, and the rewrite information table on the memory 101 is generated. Store in 101C. The rewrite information table 101C is also referred to as a rewrite information holding unit.

まず、書換情報生成部7は、上述のようにして作成されたルールテーブル(図12参照)を用いて、様々な表示画面幅に対して、それぞれの表示画面幅に関する条件を満たすか否かの評価(「真」又は「偽」)の組み合わせ(ルールセット;ルール集合)として起こり得るものを全て抽出する(図13のステップB10参照)。つまり、上述のようにして作成されたルールテーブル(図12参照)に格納されたインデックス番号「0」〜「2」のそれぞれに対応づけられている表示画面幅に関する条件の集合のべき集合、即ち、様々な表示画面幅に対して、インデックス番号「0」〜「2」のそれぞれに対応づけられている表示画面幅に関する条件を満たすか否かの評価(「真」又は「偽」)の2通りの組み合わせの中で起こり得るものを全て抽出する。 First, the rewrite information generation unit 7 uses the rule table (see FIG. 12) created as described above to determine whether or not a condition for each display screen width is satisfied for various display screen widths. All possible combinations (rule sets; rule sets) of evaluation (“true” or “false”) are extracted (see step B10 in FIG. 13). That is, a power set of conditions related to the display screen width associated with each of the index numbers “0” to “2” stored in the rule table (see FIG. 12) created as described above, The evaluation (“true” or “false”) of whether or not the condition regarding the display screen width associated with each of the index numbers “0” to “2” is satisfied with respect to various display screen widths (2) Extract all possible combinations of the three combinations.

例えば、まず、上述のようにして作成されたルールテーブル(図12参照)から、インデックス番号「0」、「1」、「2」のそれぞれの最小幅「min-width」及び最大幅「max-width」として設定されている値を取得し、表示画面幅x(変数)の値を変えながら、インデックス番号「0」、「1」、「2」のそれぞれの最小幅「min-width」として設定されている値と最大幅「max-width」として設定されている値とによって規定される論理式を満たす、即ち、最小幅として設定されている値以上であり、かつ、最大幅として設定されている値以下であるという条件を満たすか否かの評価を行なうことで、様々な表示画面幅に対して、それぞれの表示画面幅に関する条件を満たすか否かの評価(「真」又は「偽」)の組み合わせとして起こり得るものを全て抽出することができる。   For example, first, the minimum width “min-width” and the maximum width “max-” of the index numbers “0”, “1”, and “2” are determined from the rule table (see FIG. 12) created as described above. Get the value set as “width” and set the minimum width “min-width” for each of index numbers “0”, “1” and “2” while changing the value of display screen width x (variable) Satisfies the logical expression defined by the value set and the value set as the maximum width “max-width”, that is, is equal to or greater than the value set as the minimum width and set as the maximum width. By evaluating whether or not the condition that the value is less than or equal to a certain value is satisfied, it is possible to evaluate whether or not the condition relating to each display screen width is satisfied (“true” or “false”). ) All possible combinations It can be out.

本実施形態では、それぞれの表示画面幅に関する条件を同時に満たす表示画面幅は存在しない。このため、(1)インデックス番号「0」に対応づけられている表示画面幅に関する条件を満たし(即ち、評価「真」)、かつ、インデックス番号「1」、「2」のそれぞれに対応づけられている表示画面幅に関する条件を満たさない(即ち、評価「偽」)、(2)インデックス番号「1」に対応づけられている表示画面幅に関する条件を満たし(即ち、評価「真」)、かつ、インデックス番号「0」、「2」のそれぞれに対応づけられている表示画面幅に関する条件を満たさない(即ち、評価「偽」)、(3)インデックス番号「2」に対応づけられている表示画面幅に関する条件を満たし(即ち、評価「真」)、かつ、インデックス番号「0」、「1」のそれぞれに対応づけられている表示画面幅に関する条件を満たさない(即ち、評価「偽」)、という3つの組み合わせ(集合族)が抽出される。これらの3つの組み合わせは、それぞれ、評価「真」のインデックス番号(rule_num)を用いて、{0}、{1}、{2}と表記する。ここで、{0}、{1}、{2}は、評価「真」のインデックス番号の集合を意味し、ルールセットのインデックスという。そして、このようにして抽出された3つの組み合わせ{0}、{1}、{2}を、それぞれ、メモリ101上に保持されている書換情報テーブル101C(図14参照)のインデックス番号(set_index)「0」、「1」、「2」で指定される行の「rule_index(ルールセットのインデックス)」の欄に格納する(図13のステップB20参照)。なお、ここでは、上述のようにして抽出したルールセットのインデックス(rule_index){0}、{1}、{2}を書換情報テーブル101Cに格納するようにしているが、これらは後述の書換コードを生成するために用いるだけであるため、書換コードを生成した後は保持しておかなくても良い。   In the present embodiment, there is no display screen width that satisfies the conditions regarding each display screen width at the same time. For this reason, (1) the condition relating to the display screen width associated with the index number “0” is satisfied (that is, the evaluation is “true”), and the index numbers “1” and “2” are associated with each. (2) the condition regarding the display screen width associated with the index number “1” is satisfied (that is, the evaluation is “true”), and , The condition regarding the display screen width associated with each of the index numbers “0” and “2” is not satisfied (that is, the evaluation is “false”), and (3) the display is associated with the index number “2”. The condition regarding the screen width is satisfied (that is, the evaluation is “true”), and the condition regarding the display screen width associated with each of the index numbers “0” and “1” is not satisfied (that is, the evaluation is performed). False "), three combinations of (the ensemble) is extracted. These three combinations are expressed as {0}, {1}, and {2}, respectively, using an index number (rule_num) of evaluation “true”. Here, {0}, {1}, and {2} mean a set of index numbers with an evaluation of “true” and are referred to as ruleset indexes. Then, the three combinations {0}, {1}, {2} extracted in this way are index numbers (set_index) of the rewrite information table 101C (see FIG. 14) held in the memory 101, respectively. Stored in the “rule_index (rule set index)” column of the row designated by “0”, “1”, “2” (see step B20 in FIG. 13). Here, the ruleset indexes (rule_index) {0}, {1}, {2} extracted as described above are stored in the rewrite information table 101C. Since it is only used to generate the rewrite code, it may not be retained after the rewrite code is generated.

次に、書換情報生成部7は、上述のようにして抽出したルールセットのインデックス(rule_index){0}、{1}、{2}を用いて、メモリ101上のスタイルルール保持部101Bにインデックス番号(rule_num)に対応づけられて保持されているルールに含まれる表示画面幅に関する条件を書き換える書換コードを生成する(図13のステップB30参照)。つまり、上述のようにして抽出したルールセットのインデックス(rule_index){0}、{1}、{2}のそれぞれの中に記述されているインデックス番号(rule_num)「0」、「1」、「2」を用いて、これらに対応づけられている表示画面幅に関する条件を「真」に、記述されていないインデックス番号(rule_num)に対応づけられている表示画面幅に関する条件を「偽」に書き換える書換コードを生成する。ここでは、図14に示すように、書換コードとして、上述のようにして抽出したルールセットのインデックス(rule_index){0}に記述されているインデックス番号(rule_num)「0」を用いて、applyMQ({{0:true},{1:false},{2:false}})を生成し、ルールセットのインデックス(rule_index){1}に記述されているインデックス番号(rule_num)「1」を用いて、applyMQ({{0:false},{1:true},{2:false}})を生成し、ルールセットのインデックス(rule_index){2}に記述されているインデックス番号(rule_num)「2」を用いて、applyMQ({{0:false},{1:false},{2:true}})を生成する。そして、このようにして生成された書換コードを、それぞれ、書換情報テーブル(図14参照)のインデックス番号(set_index)「0」、「1」、「2」で指定される行の「書換コード」の欄に格納する(図13のステップB40参照)。なお、書換コードを、適用コード又は実行コードともいう。   Next, the rewrite information generation unit 7 uses the ruleset index (rule_index) {0}, {1}, {2} extracted as described above to index the style rule holding unit 101B on the memory 101. A rewrite code for rewriting a condition relating to the display screen width included in the rule associated with the number (rule_num) is generated (see step B30 in FIG. 13). That is, the index numbers (rule_num) “0”, “1”, “1” described in each of the indexes (rule_index) {0}, {1}, {2} of the rule set extracted as described above. 2 ”is used to rewrite the condition relating to the display screen width associated with these to“ true ”and the condition relating to the display screen width associated with the undescribed index number (rule_num) to“ false ”. Generate rewrite code. Here, as shown in FIG. 14, by using the index number (rule_num) “0” described in the rule set index (rule_index) {0} extracted as described above as the rewrite code, applyMQ ( {{0: true}, {1: false}, {2: false}}) and using the index number (rule_num) “1” described in the rule set index (rule_index) {1} , ApplyMQ ({{0: false}, {1: true}, {2: false}}) is generated, and the index number (rule_num) “2” described in the rule set index (rule_index) {2} Is used to generate applyMQ ({{0: false}, {1: false}, {2: true}}). Then, the rewrite code generated in this way is replaced with the “rewrite code” of the row specified by the index number (set_index) “0”, “1”, “2” of the rewrite information table (see FIG. 14), respectively. (See step B40 in FIG. 13). The rewrite code is also referred to as an application code or an execution code.

次に、書換情報生成部7は、現在の状態を示す情報、即ち、どのルールセットのインデックス(rule_index)が有効になっているかを示す情報である真偽情報(true or false)を、書換情報テーブル(図14参照)のインデックス番号(set_index)「0」、「1」、「2」で指定される行の「状態」の欄に格納する(図13のステップB50参照)。ここで、書換情報生成部7が現在の状態を示す情報を書換情報テーブル(図14参照)に格納するのは、最初にコンテンツ画面を表示させた段階である。そして、本実施形態では、最初にコンテンツ画面を表示させる場合、上述のように、画面表示部2は、タブレット向けのスタイルS1に対するルールを「真」(True)と評価し、スマートフォン向けのスタイルS0に対するルール及びPC向けのスタイルS2に対するルールを「偽」(False)と評価し、「真」(True)と評価したタブレット向けのスタイルS1を適用して、コンテンツ画面を表示させる。このため、本実施形態では、図14に示すように、書換情報テーブルのインデックス番号(set_index)「1」で指定される行の「状態」の欄に、現在の状態を示す情報として、「真」(true)を格納し、書換情報テーブルのインデックス番号(set_index)「0」、「2」で指定される行の「状態」の欄に、現在の状態を示す情報として、「偽」(false)を格納する。   Next, the rewrite information generation unit 7 converts information indicating the current state, that is, authenticity information (true or false), which is information indicating which rule set index (rule_index) is valid, into the rewrite information. Stored in the “status” column of the row specified by the index number (set_index) “0”, “1”, “2” of the table (see FIG. 14) (see step B50 in FIG. 13). Here, the rewrite information generation unit 7 stores the information indicating the current state in the rewrite information table (see FIG. 14) when the content screen is first displayed. In the present embodiment, when the content screen is first displayed, the screen display unit 2 evaluates the rule for the style S1 for tablets as “True” as described above, and the style S0 for smartphones. The rule for and the rule for the style S2 for PC are evaluated as “False”, and the content screen is displayed by applying the style S1 for tablets evaluated as “True”. For this reason, in this embodiment, as shown in FIG. 14, “true” is displayed as information indicating the current state in the “state” column of the row specified by the index number (set_index) “1” of the rewrite information table. ”(True) and“ false ”(false) as information indicating the current state in the“ state ”column of the row specified by the index number (set_index)“ 0 ”,“ 2 ”of the rewrite information table. ).

なお、ここでは、CSSファイルが図4に示すようなメディアクエリを含む場合を例に挙げて説明しているため、それぞれの表示画面幅に関する条件を同時に満たす表示画面幅は存在せず、抽出されたルールセットのインデックス(rule_index)は、{0}、{1}、{2}のように、それぞれ1つずつのインデックス番号(rule_num)を含むものとなっており、生成された書換コードは、それぞれ1つずつtrueを含むものとなっているが、これに限られるものではない。   Note that, here, the case where the CSS file includes a media query as shown in FIG. 4 has been described as an example. Therefore, there is no display screen width that satisfies the conditions regarding each display screen width at the same time, and the CSS file is extracted. The rule set index (rule_index) includes one index number (rule_num), such as {0}, {1}, {2}, and the generated rewrite code is Each contains one true, but is not limited to this.

例えば、CSSファイルが図15に示すようなメディアクエリを含む場合もある。このメディアクエリでは、いずれのスタイルに対するルールにおいてもmax-widthが設定されていない。つまり、このメディアクエリでは、スマートフォン向けのスタイルS0に対するルールは、メディアタイプとして「screen」、条件として「(min-width:0px)」、スタイルとして「スマートフォン向けCSS」を含む。このルールは、ブラウザに対し、ブラウザの表示画面幅が0ピクセル以上の場合に、スマートフォン向けCSSを適用するように指示する。また、タブレット向けのスタイルS1に対するルールは、メディアタイプとして「screen」、条件として「(min-width:320px)」、スタイルとして「タブレット向けCSS」を含む。このルールは、ブラウザに対し、ブラウザの表示画面幅が320ピクセル以上の場合に、タブレット向けCSSを適用するように指示する。また、PC向けのスタイルS2に対するルールは、メディアタイプとして「screen」、条件として「(min-width:768px)」、スタイルとして「PC向けCSS」を含む。このルールは、ブラウザに対し、ブラウザの表示画面幅が768ピクセル以上の場合に、PC向けCSSを適用するように指示する。この場合、上述の実施形態と同様に、このようなメディアクエリを解析して得られた全てのスタイルに対するルールに含まれる条件を取得し、表示画面幅に関する条件を抽出し、ルールテーブルに格納すると、ルールテーブルは、図16に示すようになる。そして、上述の実施形態と同様に、このルールテーブルを用いて、様々な表示画面幅に対して、それぞれの表示画面幅に関する条件を満たすか否かの評価の組み合わせとして起こり得るものを全て抽出すると、インデックス番号「2」に対応づけられている表示画面幅に関する条件を満たす場合は必ずインデックス番号「1」に対応づけられている表示画面幅に関する条件を満たし、インデックス番号「1」に対応づけられている表示画面幅に関する条件を満たす場合は必ずインデックス番号「0」に対応づけられている表示画面幅に関する条件を満たすため、抽出されたルールセットのインデックス(rule_index)は、{0}、{0,1}、{0,1,2}のようになる。これらのルールセットのインデックス(rule_index){0}、{0,1}、{0,1,2}を用いて書換コードを生成すると、それぞれ、applyMQ({{0:true},{1:false},{2:false}})、applyMQ({{0:true},{1:true},{2:false}})、applyMQ({{0:true},{1:true},{2:true}})となる。そして、書換情報テーブルは例えば図17に示すようになる。このように、抽出されたルールセットのインデックス(rule_index)がそれぞれ1つずつのインデックス番号(rule_num)を含むものとならず、生成された書換コードがそれぞれ1つずつtrueを含むものとならない場合もある。なお、2つ又は3つの表示画面幅に関する条件を満たす場合、メディアクエリに記述されているスタイルは上から順に適用され(ここではスマートフォン向けCSS、タブレット向けCSS、PC向けCSSの順に適用され)、上書きされて、これらのスタイルを組み合わせたスタイルが適用されることになる。   For example, the CSS file may include a media query as shown in FIG. In this media query, max-width is not set in the rules for any style. That is, in this media query, the rules for the style S0 for smartphones include “screen” as the media type, “(min-width: 0px)” as the condition, and “CSS for smartphones” as the style. This rule instructs the browser to apply CSS for smartphones when the display screen width of the browser is 0 pixel or more. The rules for the tablet style S1 include “screen” as the media type, “(min-width: 320px)” as the condition, and “CSS for tablet” as the style. This rule instructs the browser to apply the CSS for tablets when the display screen width of the browser is 320 pixels or more. The rules for the PC style S2 include “screen” as the media type, “(min-width: 768px)” as the condition, and “CSS for PC” as the style. This rule instructs the browser to apply the CSS for PC when the browser display screen width is 768 pixels or more. In this case, as in the above-described embodiment, when the conditions included in the rules for all the styles obtained by analyzing such a media query are acquired, the conditions regarding the display screen width are extracted and stored in the rule table The rule table is as shown in FIG. Then, as in the above-described embodiment, using this rule table, for all display screen widths, extract all possible occurrences of combinations of evaluations as to whether or not the conditions related to the respective display screen widths are satisfied. When the condition regarding the display screen width associated with the index number “2” is satisfied, the condition regarding the display screen width associated with the index number “1” is always satisfied, and the condition is associated with the index number “1”. When the condition regarding the display screen width being satisfied is satisfied, the condition regarding the display screen width associated with the index number “0” is always satisfied, so the index (rule_index) of the extracted rule set is {0}, {0 , 1}, {0, 1, 2}. When rewrite codes are generated using indexes (rule_index) {0}, {0, 1}, {0, 1, 2} of these rule sets, applyMQ ({{0: true}, {1: false, respectively) }, {2: false}}), applyMQ ({{0: true}, {1: true}, {2: false}}), applyMQ ({{0: true}, {1: true}, {2 : true}}). The rewrite information table is as shown in FIG. In this way, the extracted rule set index (rule_index) does not contain one index number (rule_num), and the generated rewrite codes do not contain true one by one. is there. In addition, when the conditions regarding two or three display screen widths are satisfied, the styles described in the media query are applied in order from the top (here, CSS for smartphones, CSS for tablets, and CSS for PCs are applied in this order), It is overwritten and the style which combined these styles is applied.

ルール書換部8は、図1に示すように、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、書換情報を取得し、条件充足スタイル以外のスタイルが適用されるように書換情報に基づいて複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える。つまり、本実施形態では、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、書換情報を取得する取得部8Aと、条件充足スタイル以外のスタイルが適用されるように書換情報に基づいて複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える書換部8Bとを備える。   As shown in FIG. 1, the rule rewriting unit 8 applies a condition satisfaction style that satisfies the condition of the display screen width among a plurality of styles defined with the display screen width as a condition, and displays the content screen. When a style change instruction is received, the rewrite information is acquired, and the condition for each of the plurality of styles is rewritten to “true” or “false” based on the rewrite information so that a style other than the condition satisfaction style is applied. . In other words, in the present embodiment, a style change instruction is received in a state where a content screen is displayed by applying a condition satisfying style that satisfies the condition of the display screen width among a plurality of styles defined with the display screen width as a condition. The acquisition unit 8A for acquiring the rewrite information, and the rewrite unit for rewriting the condition for each of the plurality of styles to “true” or “false” based on the rewrite information so that a style other than the condition satisfaction style is applied. 8B.

本実施形態では、ルール書換部8は、スタイル変更指示を受けた場合に、書換情報として、上述の書換情報テーブル(図14参照)からインデックス番号(set_index)を用いて書換コードを取得し、この書換コードをブラウザに備えられるJavascriptエンジンで実行して、メモリ101(スタイルルール保持部101B)上に保持されている、CSSファイルのメディアクエリを解析して得られた全てのスタイルに対するルールに含まれる条件を「真」又は「偽」に書き換える。なお、書換コードは、複数のスタイルのそれぞれに対する条件(適用条件)を書き換える書換情報である。また、ここでは、書換情報として書換コードを用いているが、書換情報はこれに限られるものではなく、複数のスタイルのそれぞれに対する条件を書き換えるのに必要な情報であれば良い。   In the present embodiment, when the rule rewriting unit 8 receives a style change instruction, the rule rewriting unit 8 acquires a rewrite code using the index number (set_index) from the above-described rewrite information table (see FIG. 14) as rewrite information. The rewrite code is executed by the Javascript engine provided in the browser, and is included in the rules for all the styles obtained by analyzing the media query of the CSS file held on the memory 101 (style rule holding unit 101B). Rewrite the condition to “true” or “false”. The rewrite code is rewrite information for rewriting conditions (application conditions) for each of a plurality of styles. Here, the rewrite code is used as the rewrite information. However, the rewrite information is not limited to this, and may be information necessary to rewrite the conditions for each of the plurality of styles.

つまり、CSSファイルのメディアクエリを解析して得られた全てのスタイルに対するルールに含まれる条件として、メモリ101(スタイルルール保持部101B)上に、図19(A)に示すような条件が保持されている。ここでは、CSSファイルのメディアクエリに含まれているスマートフォン向けのスタイルS0に対するルールを解析して得られたルールに含まれる条件として、メモリ101(スタイルルール保持部101B)上に、document.styleSheet[0].cssRule[0]の値として、「only screen and (min-width:0px) and (max-width:320px)」という条件が保持されている。また、CSSファイルのメディアクエリに含まれているタブレット向けのスタイルS1に対するルールを解析して得られたルールに含まれる条件として、メモリ101(スタイルルール保持部101B)上に、document.styleSheet[0].cssRule[1]の値として、「only screen and (min-width:321px) and (max-width:768px)」という条件が保持されている。また、PC向けのスタイルS2に対するルールを解析して得られたルールに含まれる条件として、メモリ101(スタイルルール保持部101B)上に、document.styleSheet[0].cssRule[2]の値として、「only screen and (min-width:769px)」という条件が保持されている。   That is, as a condition included in the rules for all styles obtained by analyzing the media query of the CSS file, a condition as shown in FIG. 19A is held on the memory 101 (style rule holding unit 101B). ing. Here, as a condition included in the rule obtained by analyzing the rule for the style S0 for smartphones included in the media query of the CSS file, document.styleSheet [ The condition “only screen and (min-width: 0px) and (max-width: 320px)” is held as the value of 0] .cssRule [0]. Further, as a condition included in the rule obtained by analyzing the rule for the style S1 for the tablet included in the media query of the CSS file, document.styleSheet [0 is stored in the memory 101 (style rule holding unit 101B). ] .cssRule [1] holds the condition “only screen and (min-width: 321px) and (max-width: 768px)”. In addition, as a condition included in the rule obtained by analyzing the rule for the style S2 for PC, as a value of document.styleSheet [0] .cssRule [2] on the memory 101 (style rule holding unit 101B), The condition “only screen and (min-width: 769px)” is retained.

また、本実施形態では、最初にコンテンツ画面を表示させる場合、上述のように、画面表示部2は、タブレット向けのスタイルS1に対するルールを「真」(True)と評価し、スマートフォン向けのスタイルS0に対するルール及びPC向けのスタイルS2に対するルールを「偽」(False)と評価し、「真」(True)と評価したタブレット向けのスタイルS1を適用して、コンテンツ画面を表示させる。このため、本実施形態では、図14に示すように、書換情報テーブルのインデックス番号(set_index)「1」で指定される行の「状態」の欄に、「真」(true)が格納されており、書換情報テーブルのインデックス番号(set_index)「0」、「2」で指定される行の「状態」の欄に、「偽」(false)が格納されている。   In the present embodiment, when the content screen is first displayed, the screen display unit 2 evaluates the rule for the style S1 for tablets as “True” as described above, and the style S0 for smartphones. The rule for and the rule for the style S2 for PC are evaluated as “False”, and the content screen is displayed by applying the style S1 for tablets evaluated as “True”. For this reason, in this embodiment, as shown in FIG. 14, “true” is stored in the “state” column of the row specified by the index number (set_index) “1” of the rewrite information table. In the rewrite information table, “false” is stored in the “status” column of the row specified by the index numbers (set_index) “0” and “2”.

このような状態で、スタイル変更指示を受けた場合、ルール書換部8は、インデックス番号(set_index)「1」以外のインデックス番号(set_index)である「0」又は「2」を用いて書換情報テーブル(図14参照)から書換コードを取得する(図18のステップC10)。ここでは、例えば、インデックス番号(set_index)「0」を用いて、書換情報テーブル(図14参照)から、書換コードとしてapplyMQ({{0:true},{1:false},{2:false}})を取得する。そして、この書換コードをブラウザに備えられるJavascriptエンジンで実行して各スタイルに対するルールに含まれる条件を書き換える(図18のステップC20)。ここで、図20は、applyMQメソッドの例を示している。これにより、メモリ101(スタイルルール保持部101B)上に、CSSファイルのメディアクエリに含まれているスマートフォン向けのスタイルS0に対するルールを解析して得られたルールに含まれる条件として、document.styleSheet[0].cssRule[0]の値として保持されている、「only screen and (min-width:0px) and (max-width:320px)」(図19(A)参照)が、図19(B)に示すように、「true」に書き換えられる。また、CSSファイルのメディアクエリに含まれているタブレット向けのスタイルS1に対するルールを解析して得られたルールに含まれる条件として、document.styleSheet[0].cssRule[1]の値として保持されている、「only screen and (min-width:321px) and (max-width:768px)」(図19(A)参照)が、図19(B)に示すように、「false」に書き換えられる。また、PC向けのスタイルS2に対するルールを解析して得られたルールに含まれる条件として、document.styleSheet[0].cssRule[2]の値として保持されている、「only screen and (min-width:769px)」(図19(A)参照)が、図19(B)に示すように、「false」に書き換えられる。なお、ここでは、メモリ101上のスタイルルール保持部101B上に保持されているルールに含まれる条件を書き換えるようにしているが、これに限られるものではなく、メディアクエリに含まれている各スタイルに対するルールを解析して得られた各スタイルに対する条件(メディアクエリ情報)であってメモリ上に保持されているものを「真」又は「偽」に書き換えるようにすれば良い。   When receiving a style change instruction in such a state, the rule rewriting unit 8 uses the index number (set_index) other than the index number (set_index) “1” using “0” or “2”. A rewrite code is acquired from (see FIG. 14) (step C10 in FIG. 18). Here, for example, using the index number (set_index) “0”, from the rewrite information table (see FIG. 14), applyMQ ({{0: true}, {1: false}, {2: false} }). Then, the rewriting code is executed by the Javascript engine provided in the browser to rewrite the conditions included in the rules for each style (step C20 in FIG. 18). Here, FIG. 20 shows an example of the applyMQ method. As a result, document.styleSheet [as a condition included in the rule obtained by analyzing the rule for the style S0 for the smartphone included in the media query of the CSS file on the memory 101 (style rule holding unit 101B). “Only screen and (min-width: 0px) and (max-width: 320px)” (see FIG. 19A) held as the value of 0] .cssRule [0] is shown in FIG. 19B. As shown, it is rewritten to “true”. In addition, it is held as the value of document.styleSheet [0] .cssRule [1] as a condition included in the rule obtained by analyzing the rule for the style S1 for tablets included in the media query of the CSS file. “Only screen and (min-width: 321px) and (max-width: 768px)” (see FIG. 19A) is rewritten to “false” as shown in FIG. 19B. Further, as a condition included in the rule obtained by analyzing the rule for the style S2 for PC, “only screen and (min-width) held as the value of document.styleSheet [0] .cssRule [2] : 769px) "(see FIG. 19A) is rewritten to" false "as shown in FIG. 19B. Here, the conditions included in the rules held on the style rule holding unit 101B on the memory 101 are rewritten, but the present invention is not limited to this, and each style included in the media query is not limited to this. The condition (media query information) for each style obtained by analyzing the rule for “” may be rewritten to “true” or “false”.

そして、ルール書換部8は、現在の状態を示す情報、即ち、どのルールセットのインデックス(rule_index)が有効になっているかを示す情報である真偽情報(true or false)を、書換情報テーブルのインデックス番号(set_index)「0」、「1」、「2」で指定される行の「状態」の欄に格納する(図18のステップC30)。つまり、ルール書換部8は、書換情報テーブルのインデックス番号(set_index)「0」、「1」、「2」で指定される行の「状態」の欄に格納されている真偽情報を書き換える。ここでは、書換情報テーブルのインデックス番号(set_index)「0」で指定される行の「状態」の欄に、現在の状態を示す情報として、「真」(true)を格納し、書換情報テーブルのインデックス番号(set_index)「1」、「2」で指定される行の「状態」の欄に、現在の状態を示す情報として、「偽」(false)を格納する。   Then, the rule rewriting unit 8 stores information indicating the current state, that is, authenticity information (true or false) indicating which rule set index (rule_index) is valid, in the rewriting information table. The index number (set_index) is stored in the “status” column of the row designated by “0”, “1”, “2” (step C30 in FIG. 18). That is, the rule rewriting unit 8 rewrites the authenticity information stored in the “state” column of the row specified by the index number (set_index) “0”, “1”, “2” of the rewriting information table. Here, “true” is stored as information indicating the current state in the “state” column of the row specified by the index number (set_index) “0” of the rewrite information table, “False” (false) is stored as information indicating the current state in the “state” column of the row specified by the index numbers (set_index) “1” and “2”.

このようにして、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、ルール書換部8が、上述のようにしてCSSファイルのメディアクエリを解析して得られた各スタイルに対するルールに含まれる条件を書き換えると、上述の描画部5が、再度、書き換えられたスタイルルールをDOMツリーに適用してコンテンツ画面を描画する。   In this way, when a style change instruction is received in a state where the content screen is displayed by applying a condition satisfying style that satisfies the conditions of the display screen width among a plurality of styles defined with the display screen width as a condition When the rule rewriting unit 8 rewrites the conditions included in the rules for each style obtained by analyzing the media query of the CSS file as described above, the above-described drawing unit 5 again rewrites the rewritten style. Apply the rule to the DOM tree and draw the content screen.

つまり、本実施形態では、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、ルール書換部8が、複数のスタイルのそれぞれに対する条件を書き換える書換情報を取得し、この書換情報に基づいて、表示画面幅の条件を満たす条件充足スタイル(ここではタブレット向けのスタイルS1)に対する条件を「偽」に、表示画面幅の条件を満たさない少なくとも一つの条件非充足スタイル(ここではスマートフォン向けのスタイルS0)に対する条件を「真」に書き換える。つまり、ルール書換部8は、複数のスタイルのそれぞれに対する条件を書き換える書換情報を取得する取得部8Aと、この書換情報に基づいて、表示画面幅の条件を満たす条件充足スタイル(ここではタブレット向けのスタイルS1)に対する条件を「偽」に、表示画面幅の条件を満たさない少なくとも一つの条件非充足スタイル(ここではスマートフォン向けのスタイルS0)に対する条件を「真」に書き換える書換部8Bとを備える。そして、描画部5が、複数のスタイル(ここでは3つのスタイルS0〜S2)のうち、少なくとも一つの条件非充足スタイルを適用して、コンテンツ画面のスタイルを変更したスタイル変更画面を表示させる。つまり、描画部5が、条件が「真」に書き換えられたスタイルを適用してコンテンツ画面を表示させる。このため、ルール書換部8及び描画部5をまとめて画面変更表示部という。   In other words, in the present embodiment, a style change instruction is received in a state where a content screen is displayed by applying a condition satisfying style that satisfies the condition of the display screen width among a plurality of styles defined with the display screen width as a condition. In this case, the rule rewriting unit 8 obtains rewriting information for rewriting the conditions for each of the plurality of styles, and based on this rewriting information, the condition satisfaction style that satisfies the condition of the display screen width (here, the style S1 for tablets). ) Is set to “false”, and the condition for at least one condition-unsatisfied style (here, style S0 for smartphones) that does not satisfy the display screen width condition is rewritten to “true”. In other words, the rule rewriting unit 8 acquires the rewriting information for rewriting the conditions for each of the plurality of styles, and the condition satisfying style that satisfies the condition of the display screen width based on the rewriting information (here, for the tablet) A rewriting unit 8B that rewrites the condition for the style S1) to “false” and rewrites the condition for at least one condition unsatisfied style (here, the style S0 for smartphones) that does not satisfy the condition of the display screen width to “true”. Then, the drawing unit 5 displays a style change screen in which the style of the content screen is changed by applying at least one condition unsatisfied style among a plurality of styles (here, three styles S0 to S2). That is, the drawing unit 5 displays the content screen by applying the style in which the condition is rewritten to “true”. For this reason, the rule rewriting unit 8 and the drawing unit 5 are collectively referred to as a screen change display unit.

このように、本実施形態では、画面表示部2が、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面を表示させ(図21のステップD10参照)、画面変更表示部が、スタイル変更指示を受けた場合に、書換情報を取得し、書換情報に基づいて複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換え、条件が「真」に書き換えられたスタイルを適用してコンテンツ画面を表示させる(図21のステップD20、D30参照)。   As described above, in the present embodiment, the screen display unit 2 displays the content screen by applying the condition satisfying style that satisfies the condition of the display screen width among the plurality of styles defined on the condition of the display screen width ( When the screen change display unit receives the style change instruction, the screen change display unit acquires the rewrite information and sets the condition for each of the plurality of styles to “true” or “false” based on the rewrite information. The content screen is displayed by applying the style that is rewritten and the condition is rewritten to “true” (see steps D20 and D30 in FIG. 21).

なお、CSSファイルが図15に示すようなメディアクエリを含む場合には、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、ルール書換部8が、複数のスタイルのそれぞれに対する条件を書き換える書換情報を取得し、書換情報に基づいて、少なくとも一つの条件充足スタイルに対する条件を「偽」に書き換える、又は、表示画面幅の条件を満たさない少なくとも一つの条件非充足スタイルに対する条件を「真」に書き換えるようにすれば良い。そして、描画部5が、複数のスタイル(ここでは3つのスタイル)のうち、少なくとも一つの条件非充足スタイルを適用して、又は、少なくとも一つの条件充足スタイルを適用せずに、コンテンツ画面のスタイルを変更したスタイル変更画面を表示させれば良い。   When the CSS file includes a media query as shown in FIG. 15, the content screen is applied by applying a condition satisfying style that satisfies the condition of the display screen width among a plurality of styles defined on the condition of the display screen width. When a style change instruction is received in a state where is displayed, the rule rewriting unit 8 obtains rewriting information for rewriting conditions for each of the plurality of styles, and based on the rewriting information, the rule rewriting unit 8 The condition may be rewritten to “false”, or the condition for at least one condition unsatisfied style that does not satisfy the display screen width condition may be rewritten to “true”. Then, the drawing unit 5 applies the at least one condition non-satisfaction style among the plurality of styles (here, three styles) or does not apply at least one condition satisfaction style to the style of the content screen. It is sufficient to display a style change screen that has been changed.

例えば、図17に示す書換情報テーブルのインデックス番号(set_index)「1」から「0」に切り替えられる場合、インデックス番号(rule_num)「0」、「1」に対応づけられている条件、即ち、スマートフォン向けのスタイルS0及びタブレット向けのスタイルS1に対する条件が「真」になっており、インデックス番号(rule_num)「2」に対応づけられている条件、即ち、PC向けのスタイルS2に対する条件が「偽」になっている状態から、インデックス番号(rule_num)「1」に対応づけられている条件、即ち、タブレット向けのスタイルS1に対する条件が「偽」に書き換えられる。つまり、少なくとも一つの条件充足スタイルに対する条件が「偽」に書き換えられる。そして、描画部が、複数のスタイル(ここでは3つのスタイル)のうち、少なくとも一つの条件充足スタイルを適用せずに、コンテンツ画面のスタイルを変更したスタイル変更画面が表示される。   For example, when the index number (set_index) “1” in the rewrite information table shown in FIG. 17 is switched to “0”, the conditions associated with the index numbers (rule_num) “0” and “1”, that is, the smartphone The condition for style S0 for tablet and style S1 for tablet is “true”, and the condition associated with index number (rule_num) “2”, that is, the condition for style S2 for PC is “false”. From this state, the condition associated with the index number (rule_num) “1”, that is, the condition for the style S1 for tablets is rewritten to “false”. That is, the condition for at least one condition satisfaction style is rewritten to “false”. Then, the drawing unit displays a style change screen in which the style of the content screen is changed without applying at least one condition satisfaction style among a plurality of styles (here, three styles).

また、例えば、図17に示す書換情報テーブルのインデックス番号(set_index)「1」から「2」に切り替えられる場合、インデックス番号(rule_num)「0」、「1」に対応づけられている条件、即ち、スマートフォン向けのスタイルS0及びタブレット向けのスタイルS1に対する条件が「真」になっており、インデックス番号(rule_num)「2」に対応づけられている条件、即ち、PC向けのスタイルS2に対する条件が「偽」になっている状態から、インデックス番号(rule_num)「2」に対応づけられている条件、即ち、PC向けのスタイルS2に対する条件が「真」に書き換えられる。つまり、少なくとも一つの条件非充足スタイルに対する条件が「真」に書き換えられる。そして、描画部5が、複数のスタイル(ここでは3つのスタイルS0〜S2)のうち、少なくとも一つの条件非充足スタイルを適用して、コンテンツ画面のスタイルを変更したスタイル変更画面が表示される。   For example, when the index number (set_index) “1” in the rewrite information table shown in FIG. 17 is switched to “2”, the conditions associated with the index numbers (rule_num) “0” and “1”, that is, The condition for the smartphone style S0 and the tablet style S1 is “true”, and the condition associated with the index number (rule_num) “2”, that is, the condition for the PC style S2 is “ From the state of “false”, the condition associated with the index number (rule_num) “2”, that is, the condition for the style S2 for PC is rewritten to “true”. That is, the condition for at least one condition unsatisfied style is rewritten to “true”. Then, the style changing screen is displayed in which the drawing unit 5 changes the style of the content screen by applying at least one condition unsatisfied style among a plurality of styles (here, three styles S0 to S2).

このため、本実施形態では、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、複数のスタイルのそれぞれに対する条件を書き換える書換情報を取得する取得部8Aと、書換情報に基づいて、少なくとも一つの条件充足スタイルに対する条件を「偽」に書き換える、又は、表示画面幅の条件を満たさない少なくとも一つの条件非充足スタイルに対する条件を「真」に書き換える書換部8Bとを備えることになる。つまり、本実施形態では、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、書換情報を取得する取得部8Aと、条件充足スタイル以外のスタイルが適用されるように、書換情報に基づいて、複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える書換部8Bとを備えることになる。   For this reason, in the present embodiment, the style change instruction is issued in a state in which the content screen is displayed by applying the condition satisfaction style that satisfies the condition of the display screen width among the plurality of styles defined on the condition of the display screen width. When receiving, the acquisition unit 8A for acquiring rewrite information for rewriting the conditions for each of the plurality of styles, and rewriting the condition for at least one condition satisfaction style to “false” based on the rewrite information, or the display screen width And a rewriting unit 8B that rewrites the condition for at least one condition unsatisfied style that does not satisfy the above condition to “true”. In other words, in the present embodiment, a style change instruction is received in a state where a content screen is displayed by applying a condition satisfying style that satisfies the condition of the display screen width among a plurality of styles defined with the display screen width as a condition. In this case, based on the rewriting information, the condition for each of the plurality of styles is rewritten to “true” or “false” so that the acquisition unit 8A that acquires the rewriting information and a style other than the condition satisfaction style is applied. The rewriting unit 8B is provided.

本実施形態では、利用者が、表示画面幅の条件を満たすスタイルが適していないと感じ、ダイアログボックス1B内の「Change」ボタンを押した場合(図5参照)、即ち、スタイル変更指示を受けた場合に、スタイル変更イベントハンドラ(スタイル切替イベントハンドラ)を介して、上述のルール書換部8による処理、描画部5による処理が実行され、表示画面幅の条件を満たすスタイル以外のスタイル、即ち、表示画面幅の条件を満たさないスタイルに変更される。   In the present embodiment, when the user feels that the style satisfying the condition of the display screen width is not suitable and presses the “Change” button in the dialog box 1B (see FIG. 5), that is, the user receives a style change instruction. In this case, the processing by the rule rewriting unit 8 and the processing by the drawing unit 5 are executed via a style change event handler (style switching event handler), and a style other than the style satisfying the display screen width, Changed to a style that does not satisfy the display screen width condition.

なお、スタイル変更部3は、表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、書換情報を取得し、条件充足スタイル以外のスタイルが適用されるように書換情報に基づいて複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える処理を行なえば良く、少なくとも、上述のルール書換部8による処理を行なえば良い。例えば、スタイル変更部3は、スタイル変更指示を受ける前に、例えば最初にコンテンツ画面を表示させる際に、予め、上述のルール抽出部6による処理、及び、上述の書換情報生成部7による処理を行なっておき、スタイル変更指示を受けた場合に、上述のルール書換部8による処理を行なうようにしても良い。つまり、スタイル変更部3によるスタイル変更処理としては、まず、上述のルール抽出部6による処理を行ない(図22のステップE10参照)、次に、上述の書換情報生成部7による処理を行ない(図22のステップE20参照)、次いで、スタイル変更指示を受けたかを判定し(図22のステップS30参照)、スタイル変更指示を受けた場合に、上述のルール書換部8による処理(図22のステップE40参照)を行なうようにしても良い。この場合、最初にコンテンツ画面を表示させる際に、ロード完了時に自動的に呼び出されるイベントハンドラを介して、上述のルール抽出部6による処理(図22のステップE10参照)、及び、上述の書換情報生成部7による処理(図22のステップE20参照)が実行されるようにすれば良い。また、スタイル変更部3は、スタイル変更指示を受けたかを判定し(図23のステップF10参照)、スタイル変更指示を受けた場合に、上述のルール抽出部6による処理(図23のステップF20参照)、上述の書換情報生成部7による処理(図23のステップF30参照)、及び、上述のルール書換部8による処理(図23のステップF40参照)の全てを行なうようにしても良い。   The style change unit 3 applies a style change instruction in a state in which the content screen is displayed by applying a condition satisfying style that satisfies the condition of the display screen width among a plurality of styles defined on the condition of the display screen width. If received, rewrite information is acquired, and processing for rewriting the conditions for each of the multiple styles to “true” or “false” based on the rewrite information so that a style other than the condition satisfaction style is applied. At least the processing by the rule rewriting unit 8 described above may be performed. For example, before receiving the style change instruction, the style change unit 3 performs the process by the rule extraction unit 6 and the process by the rewrite information generation unit 7 before displaying the content screen for the first time, for example. If the style change instruction is received, the processing by the rule rewriting unit 8 may be performed. That is, as the style change process by the style change unit 3, first, the process by the rule extraction unit 6 is performed (see step E10 in FIG. 22), and then the process by the rewrite information generation unit 7 is performed (see FIG. 22). Next, it is determined whether or not a style change instruction has been received (see step S30 in FIG. 22). When the style change instruction has been received, the processing by the rule rewriting unit 8 described above (step E40 in FIG. 22). Reference) may be performed. In this case, when the content screen is displayed for the first time, the process by the above-described rule extraction unit 6 (see step E10 in FIG. 22) and the above-described rewrite information via an event handler that is automatically called when loading is completed. What is necessary is just to make it the process (refer step E20 of FIG. 22) by the production | generation part 7 performed. Further, the style change unit 3 determines whether or not a style change instruction has been received (see step F10 in FIG. 23). When the style change instruction has been received, the process by the rule extraction unit 6 described above (see step F20 in FIG. 23). ), All of the processing by the above-described rewrite information generation unit 7 (see step F30 in FIG. 23) and the above-described processing by the rule rewriting unit 8 (see step F40 in FIG. 23) may be performed.

ところで、本実施形態では、スタイル変更部3は、さらに、保存処理部9と、再アクセス時書換部10とを備える。
ここで、保存処理部9は、スタイル保存指示を受けた場合に、その時に適用されている書換情報とWebサイトのアドレスとを対応づけてハードディスク(記憶部)105に格納する処理を行なう。
By the way, in this embodiment, the style change part 3 is further provided with the preservation | save process part 9 and the rewriting part 10 at the time of re-access.
Here, when receiving the style saving instruction, the saving processing unit 9 performs processing for associating the rewriting information applied at that time with the address of the Web site and storing it in the hard disk (storage unit) 105.

本実施形態では、保存処理部9は、利用者が、あるスタイルが適用されたコンテンツ画面が表示された状態で、ダイアログボックス1B内の「Save」ボタンを押した場合、(図6参照)即ち、スタイル保存指示を受けた場合に、スタイル保存イベントハンドラを介して、その時に適用されている書換情報としての書換コードとWebサイトのアドレスとしてのURLとを対応づけて記憶部105としてのローカルストレージ(ハードディスク;ブラウザの記憶領域)に格納する処理を行なう。   In this embodiment, when the user presses the “Save” button in the dialog box 1B in a state where a content screen to which a certain style is applied is displayed (see FIG. 6), When a style storage instruction is received, the local storage as the storage unit 105 is associated with the rewrite code as the rewrite information applied at that time via the style storage event handler and the URL as the website address. Processing to be stored in (hard disk; browser storage area).

例えば、表示画面幅が330ピクセルのブラウザを備える端末で、URL「http://example.com/index.html」のWebサイトにアクセスし、PC向けのスタイルS2が適用されたコンテンツ画面が表示された状態で、利用者が、ダイアログボックス1B内の「Save」ボタンを押した場合(図6参照)、即ち、スタイル保存指示を受けた場合、保存処理部9は、次のような処理を行なう。つまり、保存処理部9は、まず、スタイル保存指示を受けたかを判定し(図24のステップG10参照)、スタイル保存指示を受けた場合に、メモリ101上の書換情報テーブル101C(図14参照)を参照し、現在の有効になっている、即ち、「状態」の欄が「true」になっているルールセットのインデックス(rule_index)(ここでは{2})及び書換コード[ここではapplyMQ({{0:false},{1:false},{2:true}})]を取得する(図24のステップG20参照)。次に、保存処理部9は、ブラウザから、現在アクセスしているWebサイトのURL(ここでは「http://example.com/index.html」)及びブラウザの表示画面幅(ここでは330ピクセル)を取得する(図24のステップG30参照)。そして、保存処理部9は、上述のようにして取得したルールセットのインデックス(rule_index)(ここでは{2})、書換コード[ここではapplyMQ({{0:false},{1:false},{2:true}})]、WebサイトのURL(ここでは「http://example.com/index.html」)及びブラウザの表示画面幅(ここでは330ピクセル)を用いて、例えば図25に示すようなコードによって保存処理(書込処理)を実行して、例えば図26に示すように、ローカルストレージとしてのハードディスク105上の再アクセス時書換情報テーブル105AのURLの欄に「http://example.com/index.html」、ブラウザの表示画面幅(width)の欄に330、ルールセットのインデックス(rule_index)の欄に{2}、書換コードの欄にapplyMQ({{0:false},{1:false},{2:true}})を格納する(図24のステップG40参照)。このようにしてローカルストレージとしてのハードディスク105に格納された再アクセス時書換情報テーブル105Aは、ブラウザを閉じた後も保持される。なお、再アクセス時書換情報テーブル105Aを、再アクセス時書換情報保持部又は保存情報ともいう。   For example, on a terminal having a browser with a display screen width of 330 pixels, a website with URL “http://example.com/index.html” is accessed, and a content screen to which style S2 for PC is applied is displayed. When the user presses the “Save” button in the dialog box 1B in the state (see FIG. 6), that is, when receiving a style saving instruction, the saving processing unit 9 performs the following processing. . That is, the storage processing unit 9 first determines whether a style storage instruction has been received (see step G10 in FIG. 24). When the style storage instruction has been received, the rewrite information table 101C on the memory 101 (see FIG. 14). The rule set index (rule_index) (here {2}) and the rewrite code [here applyMQ ({here) that are currently valid, that is, the “state” column is “true” {0: false}, {1: false}, {2: true}})] (see step G20 in FIG. 24). Next, the storage processing unit 9 sends the URL of the Web site currently accessed from the browser (here, “http://example.com/index.html”) and the display screen width of the browser (here, 330 pixels). (See step G30 in FIG. 24). Then, the storage processing unit 9 acquires the rule set index (rule_index) (here {2}), the rewrite code [here applyMQ ({{0: false}, {1: false}, {2: true}})], the URL of the website (here "http://example.com/index.html") and the display screen width of the browser (here 330 pixels), for example, in FIG. For example, as shown in FIG. 26, a save process (write process) is executed by a code as shown in FIG. 26. In the URL field of the re-access information table 105A on the hard disk 105 as the local storage, “http: // example.com/index.html ”, 330 in the display screen width field, {2} in the rule set index (rule_index) field, applyMQ ({{0: false}, {1: false}, {2: true}}) are stored (see step G40 in FIG. 24).The re-access time rewriting information table 105A stored in the hard disk 105 as the local storage in this way is retained even after the browser is closed. The reaccess time rewrite information table 105A is also referred to as a reaccess time rewrite information holding unit or saved information.

なお、スタイル変更指示を受けた際に書換コードを取得するのに用いたインデックス番号(set_index)を保持している場合には、そのインデックス番号(set_index)を用いて、ルールセットのインデックス(rule_index)及び書換コードを取得しても良い。また、ここでは、ローカルストレージとしてのハードディスク105に格納されている再アクセス時書換情報テーブル105Aを、ブラウザの表示画面幅(width)の欄、及び、ルールセットのインデックス(rule_index)の欄を含むものとしているが、これらを含まないものとしても良い。   If the index number (set_index) used to acquire the rewrite code when receiving the style change instruction is held, the index number (rule_index) of the rule set using the index number (set_index) And a rewrite code may be acquired. Also, here, the re-access time rewrite information table 105A stored in the hard disk 105 as the local storage includes a browser display screen width (width) column and a rule set index (rule_index) column. However, these may not be included.

再アクセス時書換部10は、図1に示すように、Webサイトのアドレスがハードディスク(記憶部)105に格納されていた場合に、ハードディスク105からWebサイトのアドレスに基づいて書換情報(ここでは書換コード)を取得し、この書換情報に基づいて複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える処理を行なう。   As shown in FIG. 1, when the website address is stored in the hard disk (storage unit) 105, the re-access-time rewriting unit 10 rewrites information (in this case, rewriting based on the website address from the hard disk 105. Code) is acquired, and the condition for each of the plurality of styles is rewritten to “true” or “false” based on the rewriting information.

本実施形態では、再度、利用者が同じ端末(ブラウザ)で同じWebサイトにアクセスした場合、そのWebサイトのアドレスに基づいて、記憶部としてのローカルストレージ105に格納されている再アクセス時書換情報テーブル105Aから書換情報としての書換コードを取得し、この書換コードに基づいて各スタイルに対する条件を「真」又は「偽」に書き換える処理を行なう。   In the present embodiment, when the user accesses the same website again with the same terminal (browser), the re-access information at the time of re-access stored in the local storage 105 as the storage unit based on the address of the website. A rewrite code as rewrite information is acquired from the table 105A, and a condition for each style is rewritten to “true” or “false” based on the rewrite code.

例えば、再度、表示画面幅が330ピクセルのブラウザを備える端末1で、URL「http://example.com/index.html」のWebサイトにアクセスした場合、再アクセス時書換部10は、次のような処理を行なう。
つまり、まず、再アクセス時書換部10は、ブラウザから、現在アクセスしているWebサイトのURL(ここでは「http://example.com/index.html」)及びブラウザの表示画面幅(ここでは330ピクセル)を取得する(図27のステップH10参照)。次に、再アクセス時書換部10は、ローカルストレージ105上の再アクセス時書換情報テーブル105AからURL及びブラウザの表示画面幅を取得する(図27のステップH20参照)。
For example, when the terminal 1 having a browser with a display screen width of 330 pixels is accessed again with the URL “http://example.com/index.html”, the re-access time rewriting unit 10 Perform the following process.
That is, first, the re-access time rewriting unit 10 from the browser, the URL of the currently accessed website (here, “http://example.com/index.html”) and the browser display screen width (here, 330 pixels) is acquired (see step H10 in FIG. 27). Next, the re-access time rewrite unit 10 acquires the URL and the display screen width of the browser from the re-access time rewrite information table 105A on the local storage 105 (see step H20 in FIG. 27).

次に、再アクセス時書換部10は、これらが一致するかを判定する(図27のステップH30参照)。この判定の結果、一致するものがあった場合は、再アクセス時書換部10は、そのURL(ここでは「http://example.com/index.html」)及びブラウザの表示画面幅(ここでは330ピクセル)を用いて、ローカルストレージ105上の再アクセス時書換情報テーブル105A(図26参照)から書換コード[ここではapplyMQ({{0:false},{1:false},{2:true}})]を取得し(図27のステップH40参照)、その書換コード[ここではapplyMQ({{0:false},{1:false},{2:true}})]をブラウザに備えられるJavascriptエンジンで実行する。これにより、メモリ101(スタイルルール保持部101B)上に、CSSファイルのメディアクエリに含まれているスマートフォン向けのスタイルS0に対するルールを解析して得られたルールに含まれる条件として、document.styleSheet[0].cssRule[0]の値として保持されている、「only screen and (min-width:0px) and (max-width:320px)」が「false」に書き換えられ、CSSファイルのメディアクエリに含まれているタブレット向けのスタイルS1に対するルールを解析して得られたルールに含まれる条件として、document.styleSheet[0].cssRule[1]の値として保持されている、「only screen and (min-width:321px) and (max-width:768px)」が「false」に書き換えられ、PC向けのスタイルS2に対するルールを解析して得られたルールに含まれる条件として、document.styleSheet[0].cssRule[2]の値として保持されている、「only screen and (min-width:769px)」が「true」に書き換えられる(図27のステップH50参照)。なお、ここでは、URLだけでなく、ブラウザの表示画面幅も取得し、これも一致するか否かの判定に用いているが、URLだけを取得し、URLだけを一致するか否かの判定に用いるようにしても良い。   Next, the re-access time rewriting unit 10 determines whether or not they match (see step H30 in FIG. 27). If there is a match as a result of this determination, the re-access time rewriting unit 10 determines the URL (here “http://example.com/index.html”) and the browser display screen width (here. 330 pixels), the rewrite code [here applyMQ ({{0: false}, {1: false}, {2: true}) from the re-access time rewrite information table 105A (see FIG. 26) on the local storage 105 is used. })] (See step H40 in FIG. 27), and the rewrite code [here applyMQ ({{0: false}, {1: false}, {2: true}})] is Javascript provided in the browser Run on the engine. As a result, document.styleSheet [as a condition included in the rule obtained by analyzing the rule for the style S0 for the smartphone included in the media query of the CSS file on the memory 101 (style rule holding unit 101B). “Only screen and (min-width: 0px) and (max-width: 320px)” held as the value of 0] .cssRule [0] is rewritten to “false” and included in the media query of the CSS file As a condition included in the rule obtained by analyzing the rule for the style S1 for tablets, “only screen and (min--) stored as the value of document.styleSheet [0] .cssRule [1] width.321px) and (max-width: 768px) ”is rewritten to“ false ”, and the condition included in the rule obtained by analyzing the rule for the style S2 for PC is document.styleSheet [0] .cssRule With the value of [2] "Only screen and (min-width: 769px)" held in this way is rewritten to "true" (see step H50 in FIG. 27). Here, not only the URL but also the display screen width of the browser is acquired and used to determine whether or not they match. However, only the URL is acquired and whether or not only the URL matches is determined. You may make it use for.

そして、再アクセス時書換部10は、現在の状態を示す情報、即ち、どのルールセットのインデックス(rule_index)が有効になっているかを示す情報である真偽情報(true or false)を、書換情報テーブル101C(図14参照)のインデックス番号(set_index)「0」、「1」、「2」で指定される行の「状態」の欄に格納する(図27のステップH60参照)。つまり、再アクセス時書換部10は、書換情報テーブル101Cのインデックス番号(set_index)「0」、「1」、「2」で指定される行の「状態」の欄に格納されている真偽情報を書き換える。ここでは、書換情報テーブル101Cのインデックス番号(set_index)「2」で指定される行の「状態」の欄に、現在の状態を示す情報として、「真」(true)を格納し、書換情報テーブル101Cのインデックス番号(set_index)「0」、「1」で指定される行の「状態」の欄に、現在の状態を示す情報として、「偽」(false)を格納する。   Then, the re-access time rewriting unit 10 rewrites information indicating the current state, that is, authenticity information (true or false) indicating which rule set index (rule_index) is valid. It is stored in the “status” column of the row specified by the index number (set_index) “0”, “1”, “2” of the table 101C (see FIG. 14) (see step H60 in FIG. 27). That is, the re-access time rewriting unit 10 authenticates the authenticity information stored in the “status” column of the row specified by the index number (set_index) “0”, “1”, “2” of the rewriting information table 101C. Rewrite. Here, “true” is stored as information indicating the current state in the “state” column of the row specified by the index number (set_index) “2” of the rewrite information table 101C. “False” (false) is stored as information indicating the current state in the “state” column of the row designated by the index numbers (set_index) “0” and “1” of 101C.

このようにして、利用者が同じ端末(ブラウザ)で同じWebサイトにアクセスした場合に、再アクセス時書換部10が、CSSファイルのメディアクエリを解析して得られた各スタイルに対するルールに含まれる条件を書き換えると、描画部5が、書き換えられたスタイルルールをDOMツリーに適用してコンテンツ画面を描画する。これにより、利用者が同じ端末(ブラウザ)で同じWebサイトにアクセスした場合に、以前にアクセスした際に利用者が適していると判断したスタイルが適用されたコンテンツ画面が直ちに表示されることになる。   In this way, when the user accesses the same Web site with the same terminal (browser), the re-access rewriting unit 10 is included in the rules for each style obtained by analyzing the media query of the CSS file. When the condition is rewritten, the drawing unit 5 draws the content screen by applying the rewritten style rule to the DOM tree. As a result, when the user accesses the same website using the same terminal (browser), the content screen to which the style that the user has determined to be suitable when accessed previously is applied is immediately displayed. Become.

したがって、本実施形態にかかる表示変更装置及び表示変更方法によれば、条件として設定された表示画面幅が実態にそぐわず、利用者がそのスタイルが適していないと感じる場合に、他のスタイル、即ち、表示画面幅の条件を満たさないスタイルに変更できるという利点がある。
なお、本発明は、上述した実施形態に記載した構成に限定されるものではなく、本発明の趣旨を逸脱しない範囲で種々変形することが可能である。
Therefore, according to the display change device and the display change method according to the present embodiment, when the display screen width set as a condition is not suitable for the actual situation and the user feels that the style is not suitable, That is, there is an advantage that it can be changed to a style that does not satisfy the condition of the display screen width.
In addition, this invention is not limited to the structure described in embodiment mentioned above, A various deformation | transformation is possible in the range which does not deviate from the meaning of this invention.

例えば、上述の実施形態では、ブラウザプログラムが実行されることによって実現される機能(ブラウザ;画面表示部)と、表示変更プログラムが実行されることによって実現される機能(表示変更装置;スタイル変更部)とを分けて説明しているが、これに限られるものではなく、例えば表示変更プログラムが実行されることによって実現される機能を備えるブラウザとして構成することもできる。この場合、端末は、ブラウザプログラムが実行されることによって実現される機能として画面表示部及びスタイル変更部を備え、これらによって画面表示処理及び表示変更処理(表示変更方法)が行なわれることになる。   For example, in the above-described embodiment, a function (browser; screen display unit) realized by executing a browser program and a function (display change device; style change unit) realized by executing a display change program However, the present invention is not limited to this, and for example, it may be configured as a browser having a function realized by executing a display change program. In this case, the terminal includes a screen display unit and a style change unit as functions realized by executing the browser program, and screen display processing and display change processing (display change method) are performed by these.

また、例えば、上述の実施形態では、コンピュータである端末1が、上述の実施形態における各処理をコンピュータに実行させる表示変更プログラムを備えるものとして説明しているが、この表示変更プログラムの実装方法としては、以下のように、種々の方法がある。
例えば、図28に示すように、ブラウザ50からのリクエストやサーバ70からのレスポンスを中継する中継サーバ60(プロキシサーバなど)が、プログラム挿入機能(プログラム挿入部)60Aによって、表示変更プログラムをレスポンスコンテンツ中に挿入するようにすれば良い。具体的には、利用者が中継サーバ60を介してレスポンシブWebデザイン対応のWebサイト70にアクセスした場合に、中継サーバ60が、レスポンスHTMLの構造を解析し、例えば図29に示すように、このレスポンスHTML内に、表示変更プログラムが格納されているサーバのアドレス(アクセス先URL)を含むscriptタグを挿入するようにすれば良い。なお、scriptタグの挿入に代えて、表示変更プログラム(スクリプト)をHTML内に直接埋め込むようにしても良い。これを中継サーバ方式という。
Further, for example, in the above-described embodiment, the terminal 1 that is a computer is described as including a display change program that causes the computer to execute each process in the above-described embodiment. There are various methods as follows.
For example, as shown in FIG. 28, a relay server 60 (such as a proxy server) that relays a request from the browser 50 or a response from the server 70 uses a program insertion function (program insertion unit) 60A to convert the display change program to the response content. Insert it inside. Specifically, when the user accesses the responsive web design-compatible website 70 via the relay server 60, the relay server 60 analyzes the structure of the response HTML, for example, as shown in FIG. A script tag including the address (access destination URL) of the server in which the display change program is stored may be inserted into the response HTML. Instead of inserting a script tag, a display change program (script) may be directly embedded in HTML. This is called a relay server method.

また、例えば、図30に示すように、ブラウザ50が、プラグインなどのブラウザ拡張機能としてのプログラム挿入機能(プログラム挿入部)50Aによって、レスポンスコンテンツを受け取った後に、表示変更プログラムをレスポンスコンテンツ中に挿入するようにしても良い。これをブラウザプラグイン方式という。
これらの方式によって、コンテンツに依存しないで、表示変更プログラムを組み込むことができ、既存のWebサイトが提供するコンテンツに対しても適用可能である。
Further, for example, as shown in FIG. 30, after the browser 50 receives the response content by the program insertion function (program insertion unit) 50A as a browser extension function such as a plug-in, the display change program is included in the response content. It may be inserted. This is called a browser plug-in method.
By these methods, the display change program can be incorporated without depending on the content, and can be applied to content provided by an existing Web site.

このほか、例えば、表示変更プログラム(又は表示変更プログラムを含むブラウザ)は、例えば伝送媒体としてのネットワーク(例えばインターネット,公衆回線や専用回線等の通信回線等)を介して提供される場合もある。
例えば、プログラム提供者が例えばサーバなどの他のコンピュータ上で提供している表示変更プログラムを、例えばインターネットやLAN等のネットワーク及び通信インタフェースを介して、記憶装置にインストール又はダウンロードしても良い。これにより、上述の実施形態で説明した表示変更装置及び表示変更方法が実現され、上述の実施形態の場合と同様に、記憶装置にインストール又はダウンロードされた表示変更プログラムを、CPUがメモリ上に読み出して実行することで、上述の実施形態の各処理が行なわれることになる。
In addition, for example, the display change program (or the browser including the display change program) may be provided via a network (for example, the Internet, a communication line such as a public line or a dedicated line) as a transmission medium, for example.
For example, the display change program provided by the program provider on another computer such as a server may be installed or downloaded to the storage device via a network such as the Internet or a LAN and a communication interface. As a result, the display change device and the display change method described in the above-described embodiment are realized, and the CPU reads the display change program installed or downloaded in the storage device into the memory as in the above-described embodiment. As a result, each process of the above-described embodiment is performed.

また、例えば、表示変更プログラム(又は表示変更プログラムを含むブラウザ)は、コンピュータ読取可能な記録媒体に格納した状態で提供される場合もある。
ここで、記録媒体には、例えば半導体メモリなどのメモリ,磁気ディスク,光ディスク[例えばCD(Compact Disc)−ROM,DVD(Digital Versatile Disk),ブルーレイディスク等],光磁気ディスク(MO:Magneto optical Disc)等のプログラムを記録することができるものが含まれる。なお、磁気ディスク,光ディスク,光磁気ディスク等を可搬型記録媒体ともいう。
For example, the display change program (or the browser including the display change program) may be provided in a state of being stored in a computer-readable recording medium.
Here, examples of the recording medium include a memory such as a semiconductor memory, a magnetic disk, an optical disk [for example, a CD (Compact Disc) -ROM, a DVD (Digital Versatile Disk), a Blu-ray Disc, etc.], a magneto-optical disk (MO). ) Etc. can be recorded. A magnetic disk, an optical disk, a magneto-optical disk, etc. are also referred to as a portable recording medium.

この場合、ドライブ装置を介して、可搬型記録媒体から表示変更プログラムを読み出し、読み出された表示変更プログラムを記憶装置にインストールすることになる。これにより、上述の実施形態で説明した表示変更装置及び表示変更方法が実現され、上述の実施形態の場合と同様に、記憶装置にインストールされた表示変更プログラムを、CPUがメモリ上に読み出して実行することで、上述の実施形態の各処理が行なわれることになる。なお、コンピュータは、可搬型記録媒体から直接プログラムを読み取り、そのプログラムに従った処理を実行することもできる。   In this case, the display change program is read from the portable recording medium via the drive device, and the read display change program is installed in the storage device. As a result, the display change device and the display change method described in the above embodiment are realized, and the CPU reads and executes the display change program installed in the storage device in the same manner as in the above embodiment. As a result, each process of the above-described embodiment is performed. The computer can also read the program directly from the portable recording medium and execute processing according to the program.

以下、上述の実施形態及び変形例に関し、更に、付記を開示する。
(付記1)
コンピュータに、
表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、書換情報を取得し、前記条件充足スタイル以外のスタイルが適用されるように前記書換情報に基づいて前記複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える、
処理を実行させることを特徴とする表示変更プログラム。
Hereinafter, additional notes will be disclosed regarding the above-described embodiment and modifications.
(Appendix 1)
On the computer,
Of the multiple styles that are defined with the display screen width as a condition, rewrite information is displayed when a style change instruction is received in a state where the content screen is displayed by applying a condition satisfaction style that satisfies the conditions of the display screen width. Obtaining and rewriting the condition for each of the plurality of styles to "true" or "false" based on the rewriting information so that a style other than the condition satisfaction style is applied,
A display change program characterized by causing a process to be executed.

(付記2)
スタイル保存指示を受けた場合に、その時に適用されている書換情報とWebサイトのアドレスとを対応づけて記憶部に格納する処理を前記コンピュータに実行させることを特徴とする、付記1に記載の表示変更プログラム。
(付記3)
Webサイトのアドレスが前記記憶部に格納されていた場合に、前記記憶部から前記Webサイトのアドレスに基づいて前記書換情報を取得し、前記書換情報に基づいて前記複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える処理を前記コンピュータに実行させることを特徴とする、付記2に記載の表示変更プログラム。
(Appendix 2)
The supplementary note 1, wherein when the style saving instruction is received, the computer executes a process of associating the rewriting information applied at that time with the address of the website and storing it in the storage unit. Display change program.
(Appendix 3)
When the address of the website is stored in the storage unit, the rewrite information is acquired from the storage unit based on the address of the website, and the condition for each of the plurality of styles is set based on the rewrite information. The display change program according to appendix 2, wherein the computer is caused to execute a process of rewriting to “true” or “false”.

(付記4)
前記条件が「真」に書き換えられたスタイルを適用してコンテンツ画面を表示させる処理を前記コンピュータに実行させることを特徴とする、付記1〜3のいずれか1項に記載の表示変更プログラム。
(付記5)
コンピュータが、
表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、書換情報を取得し、前記条件充足スタイル以外のスタイルが適用されるように前記書換情報に基づいて前記複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える、
処理を実行することを特徴とする表示変更方法。
(Appendix 4)
4. The display change program according to any one of appendices 1 to 3, wherein the computer is caused to execute a process of displaying a content screen by applying a style in which the condition is rewritten to “true”.
(Appendix 5)
Computer
Of the multiple styles that are defined with the display screen width as a condition, rewrite information is displayed when a style change instruction is received in a state where the content screen is displayed by applying a condition satisfaction style that satisfies the conditions of the display screen width. Obtaining and rewriting the condition for each of the plurality of styles to "true" or "false" based on the rewriting information so that a style other than the condition satisfaction style is applied,
A display change method characterized by executing processing.

(付記6)
スタイル保存指示を受けた場合に、その時に適用されている書換情報とWebサイトのアドレスとを対応づけて記憶部に格納する処理を前記コンピュータが実行することを特徴とする、付記5に記載の表示変更方法。
(付記7)
Webサイトのアドレスが前記記憶部に格納されていた場合に、前記記憶部から前記Webサイトのアドレスに基づいて前記書換情報を取得し、前記書換情報に基づいて前記複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える処理を前記コンピュータが実行することを特徴とする、付記6に記載の表示変更方法。
(Appendix 6)
The appendix 5 is characterized in that, when a style saving instruction is received, the computer executes a process of storing the rewriting information applied at that time and the address of the Web site in association with each other in the storage unit. How to change the display.
(Appendix 7)
When the address of the website is stored in the storage unit, the rewrite information is acquired from the storage unit based on the address of the website, and the condition for each of the plurality of styles is set based on the rewrite information. The display change method according to appendix 6, wherein the computer executes a process of rewriting to “true” or “false”.

(付記8)
前記条件が「真」に書き換えられたスタイルを適用してコンテンツ画面を表示させる処理を前記コンピュータが実行することを特徴とする、付記5〜7のいずれか1項に記載の表示変更方法。
(付記9)
表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、書換情報を取得する取得部と、
前記条件充足スタイル以外のスタイルが適用されるように前記書換情報に基づいて前記複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える書換部とを備えることを特徴とする表示変更装置。
(Appendix 8)
The display change method according to any one of appendices 5 to 7, wherein the computer executes a process of displaying a content screen by applying a style in which the condition is rewritten to "true".
(Appendix 9)
Of the multiple styles that are defined with the display screen width as a condition, rewrite information is displayed when a style change instruction is received in a state where the content screen is displayed by applying a condition satisfaction style that satisfies the conditions of the display screen width. An acquisition unit to acquire;
And a rewriting unit that rewrites a condition for each of the plurality of styles to “true” or “false” based on the rewriting information so that a style other than the condition satisfaction style is applied. .

(付記10)
スタイル保存指示を受けた場合に、その時に適用されている書換情報とWebサイトのアドレスとを対応づけて記憶部に格納する保存処理部を備えることを特徴とする、付記9に記載の表示変更装置。
(付記11)
Webサイトのアドレスが前記記憶部に格納されていた場合に、前記記憶部から前記Webサイトのアドレスに基づいて前記書換情報を取得し、前記書換情報に基づいて前記スタイルに対する条件を「真」又は「偽」に書き換える再アクセス時書換部を備えることを特徴とする、付記10に記載の表示変更装置。
(Appendix 10)
The display change according to appendix 9, further comprising: a storage processing unit that stores the rewriting information applied at that time and the address of the website in association with each other when the style storage instruction is received. apparatus.
(Appendix 11)
When the address of the website is stored in the storage unit, the rewrite information is acquired from the storage unit based on the address of the website, and the condition for the style is set to “true” or based on the rewrite information. The display change device according to appendix 10, further comprising a re-access rewriting unit for rewriting to “false”.

(付記12)
前記条件が「真」に書き換えられたスタイルを適用してコンテンツ画面を表示させる描画部を備えることを特徴とする、付記9〜11のいずれか1項に記載の表示変更装置。
(Appendix 12)
The display change device according to any one of appendices 9 to 11, further comprising a drawing unit that displays a content screen by applying a style in which the condition is rewritten to "true".

1 端末
1A 端末画面
1B ダイアログボックス
2 画面表示部(ブラウザ)
3 スタイル変更部(表示変更装置)
4 解析部
5 描画部
6 ルール抽出部
7 書換情報生成部
8 ルール書換部
8A 取得部
8B 書換部
9 保存処理部
10 再アクセス時書換部
50 ブラウザ
50A プログラム挿入機能(プログラム挿入部)
60 中継サーバ
60A プログラム挿入機能(プログラム挿入部)
70 Webサイト(Webサーバ)
101 メモリ
101A DOMツリー保持部
101B スタイルルール保持部
101C 書換情報テーブル
102 CPU
103 表示制御部
104 表示装置
105 記憶装置(ローカルディスク;ハードディスク;記憶部)
105A 再アクセス時書換情報テーブル
106 入力装置
107 ドライブ装置
108 可搬型記録媒体
109 通信制御部
110 バス
1 terminal 1A terminal screen 1B dialog box 2 screen display (browser)
3 Style change section (display change device)
DESCRIPTION OF SYMBOLS 4 Analysis part 5 Drawing part 6 Rule extraction part 7 Rewriting information generation part 8 Rule rewriting part 8A Acquisition part 8B Rewriting part 9 Storage processing part 10 Re-access time rewriting part 50 Browser 50A Program insertion function (program insertion part)
60 relay server 60A program insertion function (program insertion part)
70 Website (Web server)
101 Memory 101A DOM Tree Holding Unit 101B Style Rule Holding Unit 101C Rewrite Information Table 102 CPU
103 Display Control Unit 104 Display Device 105 Storage Device (Local Disk; Hard Disk; Storage Unit)
105A Reaccess information table at re-access 106 Input device 107 Drive device 108 Portable recording medium 109 Communication control unit 110 Bus

Claims (6)

コンピュータに、
表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、書換情報を取得し、前記条件充足スタイル以外のスタイルが適用されるように前記書換情報に基づいて前記複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える、
処理を実行させることを特徴とする表示変更プログラム。
On the computer,
Of the multiple styles that are defined with the display screen width as a condition, rewrite information is displayed when a style change instruction is received in a state where the content screen is displayed by applying a condition satisfaction style that satisfies the conditions of the display screen width. Obtaining and rewriting the condition for each of the plurality of styles to "true" or "false" based on the rewriting information so that a style other than the condition satisfaction style is applied,
A display change program characterized by causing a process to be executed.
スタイル保存指示を受けた場合に、その時に適用されている書換情報とWebサイトのアドレスとを対応づけて記憶部に格納する処理を前記コンピュータに実行させることを特徴とする、請求項1に記載の表示変更プログラム。   2. The computer according to claim 1, wherein when receiving an instruction to save a style, the computer is caused to execute a process of associating the rewriting information applied at that time with the address of the Web site and storing the information in the storage unit. Display change program. Webサイトのアドレスが前記記憶部に格納されていた場合に、前記記憶部から前記Webサイトのアドレスに基づいて前記書換情報を取得し、前記書換情報に基づいて前記複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える処理を前記コンピュータに実行させることを特徴とする、請求項2に記載の表示変更プログラム。   When the address of the website is stored in the storage unit, the rewrite information is acquired from the storage unit based on the address of the website, and the condition for each of the plurality of styles is set based on the rewrite information. The display change program according to claim 2, which causes the computer to execute a process of rewriting “true” or “false”. 前記条件が「真」に書き換えられたスタイルを適用してコンテンツ画面を表示させる処理を前記コンピュータに実行させることを特徴とする、請求項1〜3のいずれか1項に記載の表示変更プログラム。   The display change program according to any one of claims 1 to 3, wherein the computer is caused to execute a process of displaying a content screen by applying a style in which the condition is rewritten to "true". コンピュータが、
表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、書換情報を取得し、前記条件充足スタイル以外のスタイルが適用されるように前記書換情報に基づいて前記複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える、
処理を実行することを特徴とする表示変更方法。
Computer
Of the multiple styles that are defined with the display screen width as a condition, rewrite information is displayed when a style change instruction is received in a state where the content screen is displayed by applying a condition satisfaction style that satisfies the conditions of the display screen width. Obtaining and rewriting the condition for each of the plurality of styles to "true" or "false" based on the rewriting information so that a style other than the condition satisfaction style is applied,
A display change method characterized by executing processing.
表示画面幅を条件として規定された複数のスタイルのうち、表示画面幅の条件を満たす条件充足スタイルを適用してコンテンツ画面が表示された状態で、スタイル変更指示を受けた場合に、書換情報を取得する取得部と、
前記条件充足スタイル以外のスタイルが適用されるように前記書換情報に基づいて前記複数のスタイルのそれぞれに対する条件を「真」又は「偽」に書き換える書換部とを備えることを特徴とする表示変更装置。
Of the multiple styles that are defined with the display screen width as a condition, rewrite information is displayed when a style change instruction is received in a state where the content screen is displayed by applying a condition satisfaction style that satisfies the conditions of the display screen width. An acquisition unit to acquire;
And a rewriting unit that rewrites a condition for each of the plurality of styles to “true” or “false” based on the rewriting information so that a style other than the condition satisfaction style is applied. .
JP2013068952A 2013-03-28 2013-03-28 Display change program, display change method, and display change device Expired - Fee Related JP6142620B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013068952A JP6142620B2 (en) 2013-03-28 2013-03-28 Display change program, display change method, and display change device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013068952A JP6142620B2 (en) 2013-03-28 2013-03-28 Display change program, display change method, and display change device

Publications (2)

Publication Number Publication Date
JP2014191756A true JP2014191756A (en) 2014-10-06
JP6142620B2 JP6142620B2 (en) 2017-06-07

Family

ID=51837899

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013068952A Expired - Fee Related JP6142620B2 (en) 2013-03-28 2013-03-28 Display change program, display change method, and display change device

Country Status (1)

Country Link
JP (1) JP6142620B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016107871A1 (en) * 2014-12-30 2016-07-07 1&1 Internet Ag Adaptive method for device independent web page presentation
EP3043251A1 (en) * 2015-01-06 2016-07-13 Samsung Electronics Co., Ltd. Method of displaying content and electronic device implementing same

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001142673A (en) * 1999-11-11 2001-05-25 Sony Corp Information providing system
JP2004164655A (en) * 2003-11-27 2004-06-10 Daiko Shoken Business Co Ltd Processing method for general office job entrustment work in corporation type investment trust
JP2005044304A (en) * 2003-07-25 2005-02-17 Matsushita Electric Ind Co Ltd Content output device and content output method
JP2010181971A (en) * 2009-02-03 2010-08-19 Canon Inc Information processing apparatus, and print control method
WO2012141183A1 (en) * 2011-04-15 2012-10-18 株式会社シンメトリック Content providing apparatus compatible with various terminal devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001142673A (en) * 1999-11-11 2001-05-25 Sony Corp Information providing system
JP2005044304A (en) * 2003-07-25 2005-02-17 Matsushita Electric Ind Co Ltd Content output device and content output method
JP2004164655A (en) * 2003-11-27 2004-06-10 Daiko Shoken Business Co Ltd Processing method for general office job entrustment work in corporation type investment trust
JP2010181971A (en) * 2009-02-03 2010-08-19 Canon Inc Information processing apparatus, and print control method
WO2012141183A1 (en) * 2011-04-15 2012-10-18 株式会社シンメトリック Content providing apparatus compatible with various terminal devices

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016107871A1 (en) * 2014-12-30 2016-07-07 1&1 Internet Ag Adaptive method for device independent web page presentation
EP3043251A1 (en) * 2015-01-06 2016-07-13 Samsung Electronics Co., Ltd. Method of displaying content and electronic device implementing same

Also Published As

Publication number Publication date
JP6142620B2 (en) 2017-06-07

Similar Documents

Publication Publication Date Title
US20220318336A1 (en) Method and Terminal Device for Extracting Web Page Content
US11562099B1 (en) Sanitization of content displayed by web-based applications
US10185782B2 (en) Mode identification for selective document content presentation
US9697183B2 (en) Client side page processing
US20130227398A1 (en) Page based navigation and presentation of web content
US10339197B2 (en) Method and system for bookmarking a webpage
US20150363368A1 (en) Transforming HTML Forms into Mobile Native Forms
US20130145252A1 (en) Page based navigation and presentation of web content
US20210149842A1 (en) System and method for display of document comparisons on a remote device
US20150193386A1 (en) System and Method of Facilitating Font Selection and Manipulation of Fonts
US20130339840A1 (en) System and method for logical chunking and restructuring websites
US9934206B2 (en) Method and apparatus for extracting web page content
WO2014204877A1 (en) Capturing website content through capture services
CN109101291B (en) Information processing apparatus and information processing method
US20120030562A1 (en) Device and method for generating customized webpages
TW201624253A (en) Method, computer program product and computer system for displaying information of a parent webpage associated with a child tab on a graphical user interface
CN107533568A (en) It is determined that the system and method using zoom level
JP6142620B2 (en) Display change program, display change method, and display change device
CN115659087B (en) Page rendering method, equipment and storage medium
US20150199329A1 (en) Text display method and apparatus of electronic device
US20150193385A1 (en) System and Method for Facilitating Font Selection
CN110502713A (en) Web page resources processing method, device, electronic equipment and storage medium
US10114805B1 (en) Inline address commands for content customization
JP5674704B2 (en) Information processing apparatus, method, computer program, and system
CN116009863B (en) Front-end page rendering method, device and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20151204

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160930

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161004

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161110

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170221

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170331

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170424

R150 Certificate of patent or registration of utility model

Ref document number: 6142620

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees