JP7215176B2 - Display comparison program, apparatus and method - Google Patents

Display comparison program, apparatus and method Download PDF

Info

Publication number
JP7215176B2
JP7215176B2 JP2019002848A JP2019002848A JP7215176B2 JP 7215176 B2 JP7215176 B2 JP 7215176B2 JP 2019002848 A JP2019002848 A JP 2019002848A JP 2019002848 A JP2019002848 A JP 2019002848A JP 7215176 B2 JP7215176 B2 JP 7215176B2
Authority
JP
Japan
Prior art keywords
elements
browsers
displayed
hierarchy
arrangement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019002848A
Other languages
Japanese (ja)
Other versions
JP2020113002A (en
Inventor
宏 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2019002848A priority Critical patent/JP7215176B2/en
Publication of JP2020113002A publication Critical patent/JP2020113002A/en
Application granted granted Critical
Publication of JP7215176B2 publication Critical patent/JP7215176B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

開示の技術は、表示比較プログラム、表示比較装置、及び表示比較方法に関する。 The disclosed technology relates to a display comparison program, a display comparison device, and a display comparison method.

従来、ウェブページやアプリケーションなどのコンテンツの作成者は、作成したコンテンツが様々なブラウザ画面上で正しく表示されるか否かを検証する必要がある。この検証を目視で行うことは負荷が大きいため、コンテンツを構成するHTML(Hyper Text Markup Language)要素の配置を比較するクロスブラウザ表示テストなどの技術が開発されている。 Conventionally, creators of content such as web pages and applications need to verify whether the created content is correctly displayed on various browser screens. Visually performing this verification is a heavy load, so techniques such as a cross-browser display test that compares the arrangement of HTML (Hyper Text Markup Language) elements that make up content have been developed.

例えば、複数の表示要素を含む表示データに関して複数のブラウザ間での互換性を確保するための修正作業を効率化する修正候補判定装置が提案されている。この装置は、他の表示要素に包含される表示要素群について、複数のブラウザのそれぞれによる表示結果における各表示要素の表示領域の相対的な位置関係を特定する。また、この装置は、表示要素群毎に、ブラウザ毎に特定された各表示領域の相対的な位置関係を相互に比較する。そして、いずれかのブラウザに関して特定された位置関係が他のブラウザに関して特定された位置関係と異なる表示要素群を、表示データにおける修正箇所の候補であると判定する。 For example, there has been proposed a correction candidate determination device that streamlines correction work for ensuring compatibility between multiple browsers for display data that includes multiple display elements. This device specifies the relative positional relationship of the display areas of each display element in the display result by each of a plurality of browsers for a display element group included in other display elements. In addition, this device compares the relative positional relationship of each display area specified for each browser for each display element group. Then, display element groups for which the positional relationship specified for one of the browsers is different from the positional relationship specified for the other browser are determined to be candidates for the correction portion in the display data.

また、表示データの表示に関する複数のブラウザ間での非互換を効率的に検出する非互換検出装置が提案されている。この装置は、同一の表示データに関する複数のブラウザのそれぞれの表示結果における、表示データに含まれる複数の表示要素のそれぞれの表示領域を示す表示領域情報を取得する。また、この装置は、ブラウザ毎に、当該ブラウザに関して取得された表示領域情報に基づいて、複数の表示要素の中で水平方向に相互に並列する表示要素の組み合わせを特定する。そして、この装置は、いずれかのブラウザに関して特定され、他のいずれかのブラウザに関して特定されない組み合わせに含まれる表示要素を、ブラウザ間の非互換部分として検出する。 Also, an incompatibility detection device has been proposed that efficiently detects incompatibility between a plurality of browsers regarding the display of display data. This device acquires display area information indicating display areas of a plurality of display elements included in display data in respective display results of a plurality of browsers regarding the same display data. In addition, this device specifies, for each browser, a combination of display elements that are horizontally arranged side by side among the plurality of display elements, based on the display area information acquired for the browser. Then, this device detects a display element included in a combination that is specified with respect to one browser and not specified with respect to any other browser as an incompatible part between browsers.

特開2016-18254号公報JP 2016-18254 A 特開2016-66227号公報JP 2016-66227 A

近年、ブラウザは、パーソナルコンピュータ(PC)だけでなく各種のモバイル端末でも広く利用されているが、様々なデバイス用にウェブコンテンツを作成するのは負荷が大きい。そこで、近年では、「ワンソース・マルチユース」と言われるように、一つのHTML文書を様々なデバイスで表示する「レスポンシブ・デザイン」という技術が広く用いられている。 In recent years, browsers are widely used not only in personal computers (PCs) but also in various mobile terminals, but creating web content for various devices is a heavy burden. Therefore, in recent years, a technique called "responsive design" that displays one HTML document on various devices has been widely used, as is called "one source multiple use."

このようなレスポンシブ・デザインのHTML文書をマルチデバイス環境で表示する場合、いずれの画面においても正常に表示されているとしても、画面サイズの相違により、表示レイアウトが変化する可能性がある。したがって、従来技術のように、単にHTML要素の配置関係を比較するだけでは、ブラウザ間の非互換性を適切に検出することができない場合がある。 When such a responsive design HTML document is displayed in a multi-device environment, even if it is displayed normally on any screen, the display layout may change due to the difference in screen size. Therefore, it may not be possible to appropriately detect incompatibility between browsers simply by comparing the arrangement relationships of HTML elements as in the conventional technology.

一つの側面として、開示の技術は、マルチデバイス環境で表示されるHTML文書の非互換性を検出可能に、画面サイズが異なる複数のブラウザでの表示を比較することを目的とする。 As one aspect, the technology disclosed herein aims to enable detection of incompatibility of HTML documents displayed in a multi-device environment, and to compare displays on multiple browsers with different screen sizes.

一つの態様として、開示の技術は、表示する画面サイズが異なる2つのブラウザの各々で表示されるHTML文書に含まれる各要素を階層構造で表すと共に、各要素の画面上での位置及びサイズの情報を含む階層構造情報の各々を取得する。また、前記階層構造情報が示す前記HTML文書全体の階層構造における、前記階層構造情報に含まれる部分構造が属する階層に応じた、前記2つのブラウザ間での要素の配置の一致度の基準に基づいて、前記部分構造に含まれる要素の各々について、前記2つのブラウザの各々で表示する場合の配置が一致するか否かを比較する。そして、前記基準を超えて前記2つのブラウザ間で配置が異なる要素を、前記HTML文書を前記2つのブラウザの各々で表示する場合における非互換要素として出力する As one aspect, the disclosed technology expresses each element included in an HTML document displayed in each of two browsers with different screen sizes in a hierarchical structure, and also displays the position and size of each element on the screen. Acquire each of the hierarchical structure information including the information of Also, in the hierarchical structure of the entire HTML document indicated by the hierarchical structure information, according to the hierarchy to which the partial structure included in the hierarchical structure information belongs, based on a standard of matching degree of arrangement of elements between the two browsers. Then, for each of the elements included in the partial structure, it is compared whether or not the arrangement when displayed on each of the two browsers matches . Then, an element whose arrangement is different between the two browsers exceeding the standard is output as an incompatible element when the HTML document is displayed on each of the two browsers.

一つの側面として、マルチデバイス環境で表示されるHTML文書の非互換性を検出可能に、画面サイズが異なる複数のブラウザでの表示を比較することができる、という効果を有する。 As one aspect, it is possible to detect incompatibility of HTML documents displayed in a multi-device environment, and to compare displays on multiple browsers with different screen sizes.

マルチデバイス環境におけるHTML文書表示時のレイアウトの変更を説明するための図である。FIG. 10 is a diagram for explaining layout change when an HTML document is displayed in a multi-device environment; HTML文書の階層構造情報の一例を示す図である。It is a figure which shows an example of the hierarchical structure information of an HTML document. HTML要素の縦横並びの変更を説明するための図である。It is a figure for demonstrating the change of the horizontal and vertical arrangement of an HTML element. HTML要素の間隔やサイズの変更を説明するための図である。It is a figure for demonstrating the change of the space|interval and size of an HTML element. 第1及び第2実施形態に係る表示比較装置の機能ブロック図である。1 is a functional block diagram of a display comparison device according to first and second embodiments; FIG. 第1実施形態における配置一致基準DBの一例を示す図である。FIG. 4 is a diagram showing an example of an arrangement matching criterion DB according to the first embodiment; FIG. HTML要素間の配置の比較を説明するための図である。FIG. 4 is a diagram for explaining a comparison of layouts between HTML elements; HTML要素間の上下の位置関係を説明するための図である。FIG. 4 is a diagram for explaining the vertical positional relationship between HTML elements; HTML要素間の左右の位置関係を説明するための図である。FIG. 4 is a diagram for explaining the horizontal positional relationship between HTML elements; HTML要素間の角度の一致度を比較する場合を説明するための図である。FIG. 10 is a diagram for explaining a case of comparing degrees of matching of angles between HTML elements; 第1及び第2実施形態に係る表示比較装置として機能するコンピュータの概略構成を示すブロック図である。1 is a block diagram showing a schematic configuration of a computer functioning as a display comparison device according to first and second embodiments; FIG. 第1実施形態における表示比較処理の一例を示すフローチャートである。6 is a flowchart showing an example of display comparison processing in the first embodiment; 階層に応じた配置一致基準に基づくHTML要素の比較を説明するための図である。FIG. 10 is a diagram for explaining comparison of HTML elements based on placement matching criteria according to hierarchy; 第2実施形態における配置一致基準DBの一例を示す図である。FIG. 11 is a diagram showing an example of an arrangement matching criterion DB in the second embodiment; FIG. 第2実施形態における表示比較処理の一例を示すフローチャートである。10 is a flowchart showing an example of display comparison processing in the second embodiment; 配置一致基準DBの他の例を示す図である。FIG. 10 is a diagram showing another example of an arrangement matching criterion DB;

以下、図面を参照して、開示の技術に係る実施形態の一例を説明する。 An example of an embodiment according to technology disclosed herein will be described below with reference to the drawings.

各実施形態の詳細を説明する前に、マルチデバイス環境において、レスポンシブ・デザインのHTML文書を表示する場合における互換性、及び表示レイアウトの特徴について説明する。 Before describing the details of each embodiment, compatibility and display layout characteristics when displaying a responsive design HTML document in a multi-device environment will be described.

図1に示すように、レスポンシブ・デザインで作成されたHTML文書は、デスクトップPC、タブレットPC、モバイル端末等の、それぞれ画面サイズの異なるデバイスで表示される際に、各画面サイズに合わせたレイアウトに自動で変更される。したがって、個々のHTML要素の配置を比較した場合には、配置関係に差異があるHTML要素も存在するが、各デバイスに表示された画面はいずれも正常な表示である。すなわち、各デバイスに表示された画面同士は互換性を有する。 As shown in Figure 1, HTML documents created with responsive design can be displayed on devices with different screen sizes, such as desktop PCs, tablet PCs, and mobile terminals. automatically changed. Therefore, when the arrangement of individual HTML elements is compared, there are some HTML elements with different arrangement relationships, but the screens displayed on each device are all normal displays. That is, the screens displayed on each device are compatible with each other.

このように、HTML要素の配置関係を単純に比較するだけでは、マルチデバイス環境における、ブラウザ間での表示の非互換性を適切に検出できない場合がある。 In this way, it may not be possible to appropriately detect display incompatibility between browsers in a multi-device environment simply by comparing the arrangement relationships of HTML elements.

ここで、画面サイズが異なるブラウザ間では、表示されるHTML要素の配置は変化するが、HTML文書の上位階層と下位階層とでは、その配置位置の変化の傾向は異なる。具体的には、図2に示すように、上位階層に属するHTML要素間の配置関係は、画面サイズに応じてレイアウトが大きく変化し易く、その変化の傾向に規則性を見出すことが困難である。例えば、最上位の層に属するHTML要素は、画面全体が見易くなるようにレイアウトが工夫されるため、画面サイズに応じて様々な配置が採用される。図1の例では、「ヘッダ」、「div」、及び「本文」の配置関係は、デスクトップPC用と、タブレットPC用と、モバイル端末用とでそれぞれ大きく異なる。 Here, although the arrangement of displayed HTML elements changes between browsers having different screen sizes, the trend of change in the arrangement position differs between the upper hierarchy and the lower hierarchy of the HTML document. Specifically, as shown in FIG. 2, the layout relationship between HTML elements belonging to the upper hierarchy is likely to change greatly according to the screen size, and it is difficult to find regularity in the trend of change. . For example, the layout of HTML elements belonging to the highest layer is devised so that the entire screen is easy to see, so various arrangements are adopted according to the screen size. In the example of FIG. 1, the layout relationship of "header", "div", and "text" differs greatly among desktop PCs, tablet PCs, and mobile terminals.

一方、下位階層に属するHTML要素間の配置関係は、画面サイズが相違してもレイアウトが変化し難く、変化する場合でも、その変化に規則性がある場合が多い。変化の規則性としては、例えば、図3に示すように、横並びのHTML要素を縦並びに変化させることや、その逆に、縦並びのHTML要素を横並びに変化させる場合などがある。ただし、HTML要素の並び順が入れ替わる場合には、互換性がないとみなす。また、変化の規則性としては、例えば、図4に示すように、HTML要素の間隔やサイズを変化させる場合などがある。ただし、HTML要素が均等に配置されている場合と、HTML要素間の間隔にばらつきがある場合とでは、互換性がないとみなす。 On the other hand, the layout relationship between HTML elements belonging to the lower hierarchy is difficult to change even if the screen size is different, and even if the layout changes, the change is often regular. As the regularity of change, for example, as shown in FIG. 3, horizontal HTML elements are changed vertically, and vertically aligned HTML elements are changed horizontally. However, if the order of the HTML elements is changed, it is considered to be incompatible. Further, as the regularity of change, for example, as shown in FIG. 4, there is a case where the interval or size of HTML elements is changed. However, it is assumed that there is no compatibility between the case where the HTML elements are evenly arranged and the case where the intervals between the HTML elements vary.

そこで、以下の各実施形態では、HTML要素の配置関係がブラウザ間で一致しているか否かの判断基準を、HTML要素が属する階層に応じて変更することで、HTML要素の配置関係をより適切に比較する。 Therefore, in each of the following embodiments, by changing the criterion for determining whether or not the layout relationship of HTML elements is consistent between browsers according to the hierarchy to which the HTML elements belong, the layout relationship of HTML elements can be set more appropriately. Compare to

<第1実施形態>
第1実施形態に係る表示比較装置10は、機能的には、図5に示すように、取得部12と、比較部14と、出力部16とを含む。また、表示比較装置10の所定の記憶領域には、配置一致基準データベース(DB)20が記憶される。
<First embodiment>
The display comparison device 10 according to the first embodiment functionally includes an acquisition unit 12, a comparison unit 14, and an output unit 16, as shown in FIG. Also, in a predetermined storage area of the display comparison device 10, an arrangement matching reference database (DB) 20 is stored.

取得部12は、表示する画面サイズが異なる2つのブラウザの各々で表示されるHTML文書に含まれる各HTML要素を階層構造で表した階層構造情報の各々を取得する。階層構造情報は、少なくとも、HTML要素の親子関係を示す情報と、各HTML要素の画面上での位置及びサイズなどを示す属性情報とを含む。 The acquisition unit 12 acquires each piece of hierarchical structure information that expresses each HTML element included in the HTML document displayed by each of the two browsers having different display screen sizes in a hierarchical structure. The hierarchical structure information includes at least information indicating the parent-child relationship of HTML elements and attribute information indicating the position and size of each HTML element on the screen.

HTML要素の親子関係は、例えば図2に示すように、各HTML要素をノードで表し、親子関係にあるHTML要素を示すノード同士を接続した木構造で表すことができる。また、属性情報としては、HTML要素が配置される画面上の領域を矩形領域で表した場合の矩形の基準位置(例えば左上角)の座標(x,y)と、矩形のサイズ(Δx,Δy)とを含む情報とすることができる。このような階層構造情報としては、例えば、HTML文書を内部で表現したDOM(Document Object Model)情報を用いることができる。取得部12は、取得した階層構造情報を比較部14へ受け渡す。 The parent-child relationship between HTML elements can be represented by a tree structure in which each HTML element is represented by a node and the nodes representing the HTML elements in the parent-child relationship are connected to each other, as shown in FIG. 2, for example. The attribute information includes the coordinates (x, y) of the reference position (for example, upper left corner) of the rectangle and the size (Δx, Δy ). As such hierarchical structure information, for example, DOM (Document Object Model) information that internally expresses an HTML document can be used. The acquisition unit 12 transfers the acquired hierarchical structure information to the comparison unit 14 .

比較部14は、取得部12から受け渡された階層構造情報が示すHTML文書全体の階層構造において、部分構造が属する階層に応じて、ブラウザ間でのHTML要素の配置が一致するか否かを判定するための配置一致基準を決定する。 The comparison unit 14 determines whether or not the arrangement of HTML elements between browsers matches according to the hierarchy to which the partial structure belongs in the hierarchical structure of the entire HTML document indicated by the hierarchical structure information passed from the acquisition unit 12 . Determine placement matching criteria for judging.

本実施形態における部分構造とは、階層構造情報において、ある1つのノードと、そのノードを親ノードとして直結する子ノードとを含む構造である。例えば、図2の例で、ノード「本文」に着目した場合、ノード「本文」と、ノード「本文」を親ノードとして直結する子ノード「項目1」及び「項目2」とが、1つの部分構造となる。 A partial structure in this embodiment is a structure that includes one node and a child node that is directly connected to that node as a parent node in the hierarchical structure information. For example, in the example of FIG. 2, when focusing on the node "text", the node "text" and the child nodes "item 1" and "item 2" directly connected to the node "text" as a parent node are one part. structure.

具体的には、比較部14は、処理対象の部分構造毎に、その部分構造が属する階層を、階層構造情報に基づいて特定し、特定した階層に応じた配置一致基準を、配置一致基準DB20から取得する。 Specifically, for each partial structure to be processed, the comparison unit 14 identifies the hierarchy to which the partial structure belongs based on the hierarchical structure information, and stores the layout matching criteria according to the identified hierarchy in the layout matching criteria DB 20. Get from

図6に示すように、配置一致基準DB20には、階層に応じた配置一致基準が記憶されている。配置一致基準DB20では、配置一致基準として、部分構造が属する階層が下位階層であるほど、2つのブラウザ間で表示されるHTML要素の配置について、高い一致度を要求する基準が定められる。すなわち、配置一致基準として、部分構造がHTML文書全体の構造に関連する上位階層に属する場合と、局所構造となる下位階層に属する場合とで、異なる基準が定められる。 As shown in FIG. 6, the layout matching criteria DB 20 stores layout matching criteria according to hierarchy. In the layout matching standard DB 20, as a layout matching standard, the lower the hierarchy to which the partial structure belongs, the higher the matching degree is defined for the layout of the HTML elements displayed between the two browsers. That is, different criteria are defined as placement matching criteria depending on whether the partial structure belongs to a higher hierarchy related to the structure of the entire HTML document or to a lower hierarchy that is a local structure.

例えば、図6に示すように、上位階層では、部分構造に含まれる子ノードに相当するHTML要素間の上下左右の位置関係が一致するか否かを比較する配置一致基準を定めておくことができる。一方、下位階層では、部分構造に含まれる子ノードに相当するHTML要素間の距離及び角度の少なくとも一方の一致度を比較する配置一致基準を定めておくことができる。 For example, as shown in FIG. 6, in the upper hierarchy, it is possible to define a placement matching criterion for comparing whether or not the vertical and horizontal positional relationships between HTML elements corresponding to child nodes included in the partial structure match. can. On the other hand, in the lower hierarchy, it is possible to define a placement matching criterion for comparing at least one of distance and angle between HTML elements corresponding to child nodes included in the partial structure.

比較部14は、決定した配置一致基準に基づいて、処理対象の部分構造に含まれる子ノードに相当するHTML要素の各々について、2つのブラウザの各々で表示する場合の配置を比較する。 The comparison unit 14 compares the layout of each HTML element corresponding to a child node included in the substructure to be processed, when displayed on each of the two browsers, based on the determined layout matching criteria.

具体的には、図7に示すように、比較部14は、HTML要素1から見たHTML要素2の配置が、ブラウザAで表示する場合とブラウザBで表示する場合とで、一致するか否かを比較する。なお、以下では、ブラウザXで表示されるHTML要素iを「HTML要素i-X」と表記する。また、表示するブラウザを区別することなくHTML要素について説明する場合には、単に「HTML要素i」と表記する。 Specifically, as shown in FIG. 7, the comparison unit 14 determines whether or not the arrangement of the HTML element 2 viewed from the HTML element 1 matches between the case of display by the browser A and the case of display by the browser B. Compare Note that the HTML element i displayed by the browser X is hereinafter referred to as "HTML element iX". Also, when describing an HTML element without distinguishing between browsers that display it, it is simply written as "HTML element i".

例えば、図6に示す配置一致基準DB20で、上位階層について定められている配置一致基準、すなわち、HTML要素間の上下左右の位置関係が一致するか否かを比較する場合について説明する。 For example, a case will be described in which the layout matching criteria defined for the upper hierarchy in the layout matching criteria DB 20 shown in FIG.

この場合、比較部14は、階層構造情報に含まれる各HTML要素の位置及びサイズに基づいて、HTML要素1とHTML要素2との間の横方向(x座標)及び縦方向(y座標)の重複部分の有無を判定する。図8に示すように、横方向に重複部分があり、縦方向に重複部分がない場合、比較部14は、HTML要素1とHTML要素2との配置は上下の関係であると判定する。また、図9に示すように、横方向に重複部分がなく、縦方向に重複部分がある場合、比較部14は、HTML要素1とHTML要素2との配置は左右の関係であると判定する。 In this case, based on the position and size of each HTML element included in the hierarchical structure information, the comparison unit 14 divides the horizontal direction (x coordinate) and vertical direction (y coordinate) between HTML element 1 and HTML element 2. Determine the presence or absence of overlapping parts. As shown in FIG. 8, when there is an overlapping portion in the horizontal direction but no overlapping portion in the vertical direction, the comparison unit 14 determines that the HTML element 1 and the HTML element 2 are arranged vertically. As shown in FIG. 9, when there is no overlap in the horizontal direction but there is an overlap in the vertical direction, the comparison unit 14 determines that the HTML element 1 and the HTML element 2 are arranged in a left-right relationship. .

比較部14は、上記の上下左右の関係の判定結果と、HTML要素1及びHTML要素2の基準位置(例えば、左上角)の座標とに基づいて、HTML要素1から見てHTML要素2が上、下、左、又は右のいずれに位置するかを特定する。比較部14は、この特定結果が、ブラウザAで表示する場合と、ブラウザBで表示する場合とで同一か否かを比較する。同一の場合には、HTML要素1とHTML要素2との配置関係は、ブラウザA及びB間で一致し、異なる場合には、配置関係が一致しない、という比較結果になる。 The comparison unit 14 determines whether the HTML element 2 is on the upper side when viewed from the HTML element 1 based on the determination result of the above-described vertical and horizontal relationship and the coordinates of the reference positions (for example, the upper left corner) of the HTML element 1 and the HTML element 2. , below, left, or right. The comparison unit 14 compares whether or not the specified result displayed by the browser A and the case displayed by the browser B are the same. If they are the same, the layout relationship between HTML element 1 and HTML element 2 matches between browsers A and B, and if they are different, the comparison result is that the layout relationship does not match.

また、例えば、図6に示す配置一致基準DB20で、下位階層について定められている配置一致基準、すなわち、HTML要素間の角度の一致度を比較する場合について説明する。 Also, for example, a case will be described in which the placement matching criteria defined for the lower layers in the placement matching criteria DB 20 shown in FIG. 6, that is, the matching degrees of angles between HTML elements are compared.

この場合、比較部14は、図10に示すように、HTML要素1-Aの基準位置(例えば、左上角)からHTML要素2-Aの基準位置へのベクトルと、基準方向とのなす角θを求める。同様に、比較部14は、HTML要素1-Bの基準位置からHTML要素2-Bの基準位置へのベクトルと、基準方向とのなす角θを求める。基準方向は、例えば、HTML要素1とHTML要素2との位置関係が上下の場合には垂直方向、左右の場合には水平方向とすることができる。 In this case, as shown in FIG. 10, the comparison unit 14 determines the angle θ Ask for A. Similarly, the comparison unit 14 obtains the angle θ B between the reference direction and the vector from the reference position of the HTML element 1-B to the reference position of the HTML element 2-B. For example, the reference direction can be the vertical direction when the positional relationship between the HTML element 1 and the HTML element 2 is vertical, and the horizontal direction when the positional relationship is horizontal.

そして、比較部14は、θとθとの差(|θ-θ|)と、予め定めた閾値θthとを比較する。|θ-θ|<θthの場合には、HTML要素1とHTML要素2との配置関係は、ブラウザA及びB間で一致し、|θ-θ|≧θthの場合には、配置関係が一致しない、という比較結果になる。 Then, the comparison unit 14 compares the difference between θ A and θ B (|θ A −θ B |) with a predetermined threshold value θ th . When |θ A −θ B |<θ th , the layout relationship between HTML element 1 and HTML element 2 matches between browsers A and B, and when |θ A −θ B |≧θ th will result in a comparison result that the arrangement relationship does not match.

比較部14は、比較結果を出力部16へ受け渡す。 The comparison unit 14 transfers the comparison result to the output unit 16 .

出力部16は、比較部14から受け渡された比較結果に基づいて、配置一致基準を超えて2つのブラウザ間で配置が異なるHTML要素を、HTML文書を2つのブラウザの各々で表示する場合における非互換要素として記録したリストを出力する。例えば、リストには、非互換要素の要素名、どの配置一致基準を満たさなかったか等の情報を含めることができる。なお、非互換要素を記録したリストを出力する場合に限定されず、各HTML要素について、互換性の有無を記録したリストを出力するなどしてもよい。 Based on the comparison results passed from the comparison unit 14, the output unit 16 outputs HTML elements whose layout differs between the two browsers beyond the layout matching criteria when the HTML document is displayed on each of the two browsers. Output the list recorded as incompatible elements. For example, the list may contain information such as the element name of the incompatible elements, which placement matching criteria were not met, and so on. It should be noted that the output is not limited to the case of outputting a list recording incompatible elements, and a list recording whether or not each HTML element is compatible may be output.

第1実施形態に係る表示比較装置10は、例えば図11に示すコンピュータ40で実現することができる。コンピュータ40は、CPU(Central Processing Unit)41と、一時記憶領域としてのメモリ42と、不揮発性の記憶部43とを備える。また、コンピュータ40は、入力部、表示部等の入出力装置44と、記憶媒体49に対するデータの読み込み及び書き込みを制御するR/W(Read/Write)部45とを備える。また、コンピュータ40は、インターネット等のネットワークに接続される通信I/F46を備える。CPU41、メモリ42、記憶部43、入出力装置44、R/W部45、及び通信I/F46は、バス47を介して互いに接続される。 The display comparison device 10 according to the first embodiment can be realized by a computer 40 shown in FIG. 11, for example. The computer 40 includes a CPU (Central Processing Unit) 41 , a memory 42 as a temporary storage area, and a nonvolatile storage section 43 . The computer 40 also includes an input/output device 44 such as an input unit and a display unit, and an R/W (Read/Write) unit 45 that controls reading and writing of data to and from a storage medium 49 . The computer 40 also has a communication I/F 46 connected to a network such as the Internet. The CPU 41 , memory 42 , storage unit 43 , input/output device 44 , R/W unit 45 and communication I/F 46 are connected to each other via bus 47 .

記憶部43は、HDD(Hard Disk Drive)、SSD(Solid State Drive)、フラッシュメモリ等によって実現できる。記憶媒体としての記憶部43には、コンピュータ40を、表示比較装置10として機能させるための表示比較プログラム50が記憶される。表示比較プログラム50は、取得プロセス52と、比較プロセス54と、出力プロセス56とを有する。また、記憶部43は、配置一致基準DB20を構成する情報が記憶される情報記憶領域60を有する。 The storage unit 43 can be realized by a HDD (Hard Disk Drive), SSD (Solid State Drive), flash memory, or the like. A display comparison program 50 for causing the computer 40 to function as the display comparison device 10 is stored in the storage unit 43 as a storage medium. The display comparison program 50 has an acquisition process 52 , a comparison process 54 and an output process 56 . The storage unit 43 also has an information storage area 60 in which information forming the arrangement matching reference DB 20 is stored.

CPU41は、表示比較プログラム50を記憶部43から読み出してメモリ42に展開し、表示比較プログラム50が有するプロセスを順次実行する。CPU41は、取得プロセス52を実行することで、図5に示す取得部12として動作する。また、CPU41は、比較プロセス54を実行することで、図5に示す比較部14として動作する。また、CPU41は、出力プロセス56を実行することで、図5に示す出力部16として動作する。また、CPU41は、情報記憶領域60から情報を読み出して、配置一致基準DB20をメモリ42に展開する。これにより、表示比較プログラム50を実行したコンピュータ40が、表示比較装置10として機能することになる。なお、プログラムを実行するCPU41はハードウェアである。 The CPU 41 reads out the display comparison program 50 from the storage unit 43, develops it in the memory 42, and sequentially executes the processes of the display comparison program 50. FIG. The CPU 41 operates as the acquisition unit 12 shown in FIG. 5 by executing the acquisition process 52 . Further, the CPU 41 operates as the comparison unit 14 shown in FIG. 5 by executing the comparison process 54 . Further, the CPU 41 operates as the output unit 16 shown in FIG. 5 by executing the output process 56 . Further, the CPU 41 reads information from the information storage area 60 and develops the arrangement matching criteria DB 20 in the memory 42 . As a result, the computer 40 executing the display comparison program 50 functions as the display comparison device 10 . Note that the CPU 41 that executes the program is hardware.

なお、表示比較プログラム50により実現される機能は、例えば半導体集積回路、より詳しくはASIC(Application Specific Integrated Circuit)等で実現することも可能である。 The function realized by the display comparison program 50 can also be realized by, for example, a semiconductor integrated circuit, more specifically an ASIC (Application Specific Integrated Circuit) or the like.

次に、第1実施形態に係る表示比較装置10の作用について説明する。表示比較装置10にHTML文書が入力されると、表示比較装置10において、図12に示す表示比較処理が実行される。なお、表示比較処理は、開示の技術の表示比較方法の一例である。 Next, operation of the display comparison device 10 according to the first embodiment will be described. When an HTML document is input to the display comparison device 10, the display comparison processing shown in FIG. 12 is executed in the display comparison device 10. FIG. The display comparison process is an example of the display comparison method of technology disclosed herein.

ステップS12で、取得部12が、入力されたHTML文書を受け取り、表示する画面サイズが異なるブラウザA及びブラウザBの各々で表示されるHTML文書に含まれる各HTML要素を階層構造で表した階層構造情報の各々を取得する。例えば、取得部12は、Selenium WebDriverなどを用いて、図2に示すようなHTML要素の親子関係を示す情報と、各HTML要素の画面上での位置及びサイズを示す情報とを含むDOM情報を、ブラウザA及びブラウザBのそれぞれについて取得する。なお、ブラウザA及びブラウザBのいずれで表示する場合も木構造は同様となるが、画面上での位置及びサイズは、ブラウザによってそれぞれ異なるHTML要素も存在する。取得部12は、取得した階層構造情報を比較部14へ受け渡す。 In step S12, the acquisition unit 12 receives the input HTML document, and has a hierarchical structure representing each HTML element included in the HTML document displayed on each of the browser A and the browser B having different display screen sizes. Get each of the information. For example, the acquisition unit 12 uses Selenium WebDriver or the like to obtain DOM information including information indicating the parent-child relationship of HTML elements as shown in FIG. 2 and information indicating the position and size of each HTML element on the screen. , browser A and browser B. Although the tree structure is the same for both browsers A and B, there are also HTML elements whose position and size on the screen differ depending on the browser. The acquisition unit 12 transfers the acquired hierarchical structure information to the comparison unit 14 .

次に、ステップS14で、比較部14が、取得部12から受け渡された階層構造情報が示すHTML文書を示す木構造において、処理対象ノードを設定する。最初に設定する処理対象ノードは、例えばルートノード(図2の例では、ノード「HTML」)とすることができる。 Next, in step S<b>14 , the comparison unit 14 sets a node to be processed in the tree structure indicating the HTML document indicated by the hierarchical structure information passed from the acquisition unit 12 . The processing target node that is set first can be, for example, the root node (the node "HTML" in the example of FIG. 2).

次に、ステップS16で、比較部14が、上記ステップS14で設定した処理対象ノードを親ノードとする部分構造を抽出する。 Next, in step S16, the comparison unit 14 extracts a partial structure whose parent node is the processing target node set in step S14.

次に、ステップS18で、比較部14が、上記ステップS16で抽出した部分構造が属する階層を、階層構造情報に基づいて特定し、特定した階層に応じた配置一致基準を、配置一致基準DB20から取得する。 Next, in step S18, the comparison unit 14 identifies the hierarchy to which the partial structure extracted in step S16 belongs based on the hierarchical structure information, and extracts the layout matching criteria corresponding to the identified hierarchy from the layout matching criteria DB 20. get.

次に、ステップS20で、比較部14が、上記ステップS18で取得した配置一致基準に基づいて、部分構造に含まれる子ノードに相当するHTML要素間の配置関係を、ブラウザAで表示する場合と、ブラウザBで表示する場合とで比較する。 Next, in step S20, the comparison unit 14 displays the layout relationship between HTML elements corresponding to the child nodes included in the partial structure on the browser A based on the layout matching criteria acquired in step S18. , and when displayed on browser B.

次に、ステップS22で、比較部14が、部分構造に含まれる子ノードに相当するHTML要素間の配置が、配置一致基準を超えているか否か、すなわち、配置が異なるか否かを判定する。配置一致基準を超えている場合には、ステップS24へ移行し、超えていない場合には、ステップS26へ移行する。 Next, in step S22, the comparison unit 14 determines whether or not the arrangement between the HTML elements corresponding to the child nodes included in the partial structure exceeds the arrangement matching criterion, that is, whether or not the arrangement is different. . If the arrangement matching criterion is exceeded, the process proceeds to step S24, and if not exceeded, the process proceeds to step S26.

ステップS24では、出力部16が、上記ステップS16で抽出された部分構造に含まれる子ノードに相当するHTML要素に関する情報を非互換要素リストに記録する。 In step S24, the output unit 16 records information on HTML elements corresponding to child nodes included in the partial structure extracted in step S16 in the incompatible element list.

次に、ステップS26で、比較部14が、階層構造情報に含まれるノードのうち、子ノードを持つノード、すなわち末端のノード以外のノードで、処理対象ノードに設定されていない未処理のノードが存在するか否かを判定する。未処理のノードが存在する場合には、ステップS14に戻り、未処理ノードが存在しない場合には、ステップS28へ移行する。 Next, in step S26, the comparison unit 14 determines that, among the nodes included in the hierarchical structure information, a node having a child node, that is, a node other than the terminal node, and an unprocessed node that is not set as a node to be processed. Determine if it exists. If there is an unprocessed node, the process returns to step S14, and if there is no unprocessed node, the process moves to step S28.

ステップS28では、出力部16が、非互換要素リストを出力し、表示比較処理を終了する。 In step S28, the output unit 16 outputs the incompatible element list and ends the display comparison process.

上記の処理について、ブラウザAがデスクトップPC用のブラウザ、ブラウザBがタブレットPC用のブラウザの場合で、図2に示す木構造で表されるHTML文書のHTML要素の配置を比較する場合について説明する。 Regarding the above processing, a case where browser A is a browser for a desktop PC and browser B is a browser for a tablet PC, and the arrangement of HTML elements in the HTML document represented by the tree structure shown in FIG. 2 is compared will be described. .

例えば、ノード「HTML」と、その子ノード「ヘッダ」、「本文」、及び「div」とを含む部分構造は、図2に示すように上位階層に属するため、図6に示すような配置一致基準DB20から、上位階層に対応付けて記憶されている配置一致基準が取得される。そして、図13の上図に示すように、部分構造に含まれる子ノードに相当するHTML要素「ヘッダ」、「本文」、及び「div」間の配置関係が、上位階層用の配置一致基準に基づいて比較される。例えば、上位階層用の配置一致基準が、HTML要素間の上下左右の位置関係が一致するか否かを比較する基準であるとする。この場合、「ヘッダ」に対して「div」及び「本文」が下に位置するという関係が、ブラウザA及びB共に成り立つため、HTML要素間の配置は一致すると判定することができる。 For example, since a partial structure including the node "HTML" and its child nodes "header", "text", and "div" belongs to the upper hierarchy as shown in FIG. From the DB 20, the placement matching criteria stored in association with the upper hierarchy are acquired. Then, as shown in the upper diagram of FIG. 13, the layout relationship among the HTML elements "header", "body", and "div" corresponding to the child nodes included in the partial structure is used as the layout match criteria for the upper hierarchy. are compared based on For example, it is assumed that the placement matching criteria for upper layers are criteria for comparing whether or not the top, bottom, left, and right positional relationships between HTML elements match. In this case, since the relationship that "div" and "text" are positioned below "header" holds true in both browsers A and B, it can be determined that the layouts of the HTML elements match.

また、例えば、ノード「本文」と、その子ノード「項目1」及び「項目2」とを含む部分構造は、図2に示すように下位階層に属するため、図6に示すような配置一致基準DB20から、下位階層に対応付けて記憶されている配置一致基準が取得される。そして、図13の下図に示すように、部分構造に含まれる子ノードに相当するHTML要素「項目1」と「項目2」間の配置関係が、下位階層用の配置一致基準に基づいて比較される。例えば、下位階層用の配置一致基準が、HTML要素間の角度の一致度を比較する基準であるとする。この場合、ブラウザAにおける「項目1」から見た「項目2」の角度θと、ブラウザBにおける「項目1」から見た「項目2」の角度θとには差がなく、HTML要素間の配置は一致すると判定することができる。 Also, for example, a partial structure including the node "text" and its child nodes "item 1" and "item 2" belongs to the lower hierarchy as shown in FIG. , the arrangement matching criteria stored in association with the lower hierarchy are obtained. Then, as shown in the lower diagram of FIG. 13, the layout relationships between the HTML elements "item 1" and "item 2" corresponding to the child nodes included in the partial structure are compared based on the layout matching criteria for the lower hierarchy. be. For example, let us say that the placement matching criterion for the lower hierarchy is a criterion for comparing the degree of matching of angles between HTML elements. In this case, there is no difference between the angle θ A of “item 2” viewed from “item 1” in browser A and the angle θ B of “item 2” viewed from “item 1” in browser B, and the HTML element It can be determined that an arrangement between the two matches.

以上説明したように、第1実施形態に係る表示比較装置によれば、表示する画面サイズが異なる2つのブラウザの各々で表示されるHTML文書の階層構造情報における部分構造が属する階層に応じた配置一致基準を決定する。そして、決定した配置一致基準に基づいて、部分構造に含まれるHTML要素間の配置関係を、2つのブラウザの各々で表示する場合について比較する。これにより、マルチデバイス環境で表示されるHTML文書の非互換性を検出可能に、画面サイズが異なる複数のブラウザで表示される場合のHTML要素の配置を比較することができる。 As described above, according to the display comparison apparatus according to the first embodiment, the arrangement according to the hierarchy to which the partial structure belongs in the hierarchical structure information of the HTML document displayed by each of the two browsers having different display screen sizes. Determine match criteria. Then, based on the determined layout matching criteria, the layout relationships between the HTML elements included in the partial structure are compared for each of the two browsers. As a result, it is possible to detect incompatibility of HTML documents displayed in a multi-device environment, and to compare the arrangement of HTML elements when displayed on a plurality of browsers with different screen sizes.

また、階層に応じた配置一致基準を、下位階層ほど、高い一致度を要求する基準とすることで、レスポンシブ・デザインで作成されたHTML文書などのように、ブラウザに応じて許容されるレイアウトの変更を考慮して、適切に配置の一致を判定することができる。 In addition, by setting the layout matching criteria according to the hierarchy to a criterion that requires a higher degree of matching in the lower hierarchy, layouts that are permissible according to browsers, such as HTML documents created with responsive design, can be used. Changes can be taken into account to appropriately determine alignment matches.

<第2実施形態>
次に、第2実施形態について説明する。第1実施形態では、HTML文書が、上位階層と下位階層とで構成される場合について説明したが、第2実施形態では、上位階層と、下位階層と、上位階層と下位階層との間の中間階層とで構成される場合について説明する。
<Second embodiment>
Next, a second embodiment will be described. In the first embodiment, the case where the HTML document is composed of the upper hierarchy and the lower hierarchy was explained. A case will be described where it is configured with a hierarchy.

なお、第2実施形態に係る表示比較装置において、第1実施形態に係る表示比較装置10と同様の構成については、同一符号を付して詳細な説明を省略する。 In the display comparison device according to the second embodiment, the same components as those of the display comparison device 10 according to the first embodiment are denoted by the same reference numerals, and detailed description thereof will be omitted.

図5に示すように、第2実施形態に係る表示比較装置210は、機能的には、取得部12と、比較部214と、出力部16とを含む。また、表示比較装置210の所定の記憶領域には、配置一致基準DB220が記憶される。 As shown in FIG. 5 , the display comparison device 210 according to the second embodiment functionally includes an acquisition unit 12 , a comparison unit 214 and an output unit 16 . Also, in a predetermined storage area of the display comparison device 210, an arrangement matching reference DB 220 is stored.

図14に、配置一致基準DB220の一例を示す。図14の例では、上位階層では、部分構造に含まれる子ノードに相当するHTML要素間の上下左右の位置関係が一致するか否かを比較する配置一致基準が定められている。また、中間階層では、部分構造に含まれる子ノードに相当するHTML要素の縦横並びを変換した上で、HTML要素間の距離及び角度の少なくとも一方の一致度を比較する配置一致基準が定められている。また、下位階層では、部分構造に含まれる子ノードに相当するHTML要素の縦横並びを変換することなく、HTML要素間の距離及び角度の少なくとも一方の一致度を比較する配置一致基準が定められている。 FIG. 14 shows an example of the arrangement matching criteria DB 220. As shown in FIG. In the example of FIG. 14, in the upper hierarchy, a layout matching criterion is defined for comparing whether or not the vertical and horizontal positional relationships between HTML elements corresponding to child nodes included in the partial structure match. Also, in the middle layer, after converting the vertical and horizontal arrangement of HTML elements corresponding to child nodes included in the partial structure, a layout matching standard is defined for comparing at least one of distance and angle between HTML elements. there is In the lower hierarchy, a placement matching standard is defined for comparing at least one of distance and angle between HTML elements without converting the vertical and horizontal arrangement of HTML elements corresponding to child nodes included in the partial structure. there is

比較部214は、第1実施形態における比較部14と同様に、部分構造が属する階層に応じた配置一致基準を決定する。そして、比較部214は、決定した配置一致基準に基づいて、処理対象の部分構造に含まれる子ノードに相当するHTML要素の各々について、2つのブラウザの各々で表示する場合の配置を比較する。 The comparison unit 214 determines a placement matching criterion according to the hierarchy to which the partial structure belongs, like the comparison unit 14 in the first embodiment. Then, the comparison unit 214 compares the layout of each of the HTML elements corresponding to the child nodes included in the substructure to be processed, when displayed on each of the two browsers, based on the determined layout matching criteria.

上述したように、マルチデバイス環境に対応させて、レスポンシブ・デザインで作成されたHTML文書を表示する場合、同一の部分構造に属するHTML要素は、横並びから縦並び、又は縦並びから横並びへの変換が許容される場合がある。 As described above, when displaying an HTML document created with a responsive design to support a multi-device environment, HTML elements belonging to the same partial structure are converted from horizontal to vertical or vice versa. may be allowed.

そこで、比較部214は、決定した配置一致基準において、縦横並びの変換が許容されている場合には、HTML要素の縦横並びを変換する場合と変換しない場合との両方の場合で、HTML要素の配置を比較する。HTML要素の縦横並びを変換する場合、具体的には、比較部214は、一方のブラウザで表示する場合のHTML要素の配置を、横並びから縦並びに、又は縦並びから横並びに変換し、他方のブラウザで表示する場合のHTML要素の配置との一致度を比較する。比較部214は、HTML要素の縦横並びを変換する場合と変換しない場合とのいずれかの場合で、配置一致基準を満たせば、ブラウザ間でHTML要素の配置が一致すると判定する。 Therefore, if the determined arrangement matching criteria allow horizontal and vertical alignment conversion, the comparison unit 214 determines whether the horizontal and vertical alignment of the HTML elements is converted and when the HTML elements are not converted. Compare placements. When converting the horizontal and vertical arrangement of HTML elements, specifically, the comparison unit 214 converts the arrangement of HTML elements when displayed in one browser from horizontal to vertical or from vertical to horizontal, Compare the degree of matching with the arrangement of HTML elements when displayed in a browser. The comparison unit 214 determines that the layout of the HTML elements matches between the browsers if the layout matching criteria are satisfied in either the case of converting the vertical and horizontal arrangement of the HTML elements or the case of not converting them.

第2実施形態に係る表示比較装置10は、例えば図11に示すコンピュータ40で実現することができる。コンピュータ40の記憶部43には、コンピュータ40を、表示比較装置210として機能させるための表示比較プログラム250が記憶される。表示比較プログラム250は、取得プロセス52と、比較プロセス254と、出力プロセス56とを有する。また、記憶部43は、配置一致基準DB220を構成する情報が記憶される情報記憶領域60を有する。 The display comparison device 10 according to the second embodiment can be realized by a computer 40 shown in FIG. 11, for example. A display comparison program 250 for causing the computer 40 to function as the display comparison device 210 is stored in the storage unit 43 of the computer 40 . The display comparison program 250 has an acquisition process 52 , a comparison process 254 and an output process 56 . The storage unit 43 also has an information storage area 60 in which information forming the arrangement matching reference DB 220 is stored.

CPU41は、表示比較プログラム250を記憶部43から読み出してメモリ42に展開し、表示比較プログラム250が有するプロセスを順次実行する。CPU41は、比較プロセス254を実行することで、図5に示す比較部214として動作する。他のプロセスについては、第1実施形態に係る表示比較プログラム50と同様である。これにより、表示比較プログラム250を実行したコンピュータ40が、表示比較装置210として機能することになる。 The CPU 41 reads out the display comparison program 250 from the storage unit 43, develops it in the memory 42, and sequentially executes the processes of the display comparison program 250. FIG. The CPU 41 operates as the comparison unit 214 shown in FIG. 5 by executing the comparison process 254 . Other processes are the same as those of the display comparison program 50 according to the first embodiment. Thereby, the computer 40 executing the display comparison program 250 functions as the display comparison device 210 .

なお、表示比較プログラム250により実現される機能は、例えば半導体集積回路、より詳しくはASIC等で実現することも可能である。 Note that the function realized by the display comparison program 250 can also be realized by, for example, a semiconductor integrated circuit, more specifically an ASIC or the like.

次に、第2実施形態に係る表示比較装置210の作用について説明する。表示比較装置210にHTML文書が入力されると、表示比較装置210において、図15に示す表示比較処理が実行される。なお、第2実施形態における表示比較処理において、第1実施形態における表示比較処理と同一の処理については、同一符号を付して詳細な説明を省略する。また、表示比較処理は、開示の技術の表示比較方法の一例である。 Next, operation of the display comparison device 210 according to the second embodiment will be described. When the HTML document is input to the display comparison device 210, the display comparison processing shown in FIG. 15 is executed in the display comparison device 210. FIG. In addition, in the display comparison processing in the second embodiment, the same processing as the display comparison processing in the first embodiment is denoted by the same reference numeral, and detailed description thereof is omitted. Also, the display comparison process is an example of the display comparison method of technology disclosed herein.

ステップS12~S18を経て、ステップS219へ移行する。ステップS219では、比較部214が、上記ステップS18で取得した配置一致基準において、縦横並びの変換が許容されている場合には、一方のブラウザで表示する場合のHTML要素の縦横並びを変換する。具体的には、比較部214が、図3において丸印が併記されている両矢印が示す変換のように、HTML要素間の間隔の割合及び並び順を保持したまま、HTML要素の配置を、横並びから縦並びに、又は縦並びから横並びに変換する。 After steps S12 to S18, the process proceeds to step S219. In step S219, the comparison unit 214 converts the horizontal and vertical alignment of the HTML elements when displayed on one of the browsers, if the arrangement matching criteria acquired in step S18 permits horizontal and vertical alignment conversion. Specifically, the comparison unit 214 changes the arrangement of HTML elements to Convert side-by-side to vertical or vertical-to-side-by-side.

次に、ステップS220で、比較部214が、上記ステップS18で取得した配置一致基準に基づいて、上記ステップS16で抽出した部分構造に含まれる子ノードに相当するHTML要素の各々について、2つのブラウザの各々で表示する場合の配置を比較する。この際、配置一致基準において、縦横並びの変換が許容されている場合、比較部214は、上記ステップS12で取得した階層構造情報が示すHTML要素の配置、すなわち縦横変換をしない場合の配置をブラウザ間で比較する。さらに、比較部214は、一方のブラウザで表示する場合のHTML要素の縦横並びを変換した配置と、他方のブラウザで表示する場合のHTML要素の配置とを比較する。 Next, in step S220, the comparing unit 214, based on the placement matching criteria acquired in step S18, uses two browser Compare the arrangement when displayed in each of the . At this time, if the alignment matching criteria permit vertical-horizontal conversion, the comparison unit 214 displays the layout of the HTML elements indicated by the hierarchical structure information acquired in step S12, i.e., the layout when vertical-horizontal conversion is not performed. compare between Further, the comparison unit 214 compares the arrangement of the HTML elements whose vertical and horizontal arrangement is converted when displayed on one browser and the arrangement of the HTML elements when displayed on the other browser.

次に、ステップS222で、比較部214が、部分構造に含まれる子ノードに相当するHTML要素間の配置が、配置一致基準を超えているか否か、すなわち、配置が異なるか否かを判定する。この際、比較部214は、HTML要素の縦横並びを変換する場合と変換しない場合とのいずれの場合も、配置一致基準を超えている場合に、ブラウザ間でHTML要素の配置が異なると判定する。 Next, in step S222, the comparison unit 214 determines whether or not the arrangement between the HTML elements corresponding to the child nodes included in the partial structure exceeds the arrangement matching criterion, that is, whether or not the arrangement is different. . At this time, the comparison unit 214 determines that the layout of the HTML elements is different between browsers if the layout match criteria are exceeded in both cases of the vertical and horizontal arrangement of the HTML elements being converted and not being converted. .

以下、第1実施形態と同様に、ステップS24~S28が実行される。 Thereafter, steps S24 to S28 are executed in the same manner as in the first embodiment.

以上説明したように、第2実施形態に係る表示比較装置によれば、第1実施形態と同様に、表示する画面サイズが異なる2つのブラウザの各々で表示されるHTML文書の階層構造情報における部分構造が属する階層に応じた配置一致基準を決定する。そして、決定した配置一致基準に基づいて、部分構造に含まれるHTML要素間の配置関係を、2つのブラウザの各々で表示する場合について比較する。決定した配置一致基準で、HTML要素の縦横並びの変換が許容されている場合には、一方のブラウザで表示する場合のHTML要素の縦横並びを変換した場合についても、他方のブラウザで表示する場合のHTML要素の配置と比較する。これにより、第1実施形態と同様の効果を奏することができると共に、レスポンシブ・デザインで作成されたHTML文書などのように、ブラウザに応じて許容されるレイアウトの変更を考慮して、適切に配置の一致を判定することができる。 As described above, according to the display comparison apparatus according to the second embodiment, as in the first embodiment, the portion of the hierarchical structure information of the HTML document displayed by each of the two browsers having different display screen sizes is displayed. A placement matching criterion is determined according to the hierarchy to which the structure belongs. Then, based on the determined layout matching criteria, the layout relationships between the HTML elements included in the partial structure are compared for each of the two browsers. If the determined layout matching criteria allow the vertical and horizontal conversion of HTML elements, even if the horizontal and vertical orientation of the HTML elements is converted when displayed on one browser, when displayed on the other browser. Compare with the arrangement of HTML elements in As a result, the same effects as in the first embodiment can be obtained, and the layout can be appropriately arranged in consideration of changes in the layout that are allowed according to the browser, such as HTML documents created with responsive design. match can be determined.

なお、配置一致基準DBに記憶される階層に応じた配置一致基準は、第1実施形態の図6の例、及び第2実施形態の図14の例に限定されず、下位階層ほど、一致とみなす条件が厳しくなるような配置一致基準であればよい。 Note that the arrangement matching criteria stored in the arrangement matching criteria DB according to the hierarchy are not limited to the example of FIG. 6 of the first embodiment and the example of FIG. 14 of the second embodiment. Any layout matching criterion may be used as long as the conditions to be considered are strict.

例えば、配置一致基準として、全階層で、部分構造に含まれる子ノードに相当するHTML要素間の距離及び角度の少なくとも一方の一致度を比較する配置一致基準を定めておくことができる。この場合、一致度を判定するための閾値を、上位階層の場合より下位階層の場合の方が、高い一致度を要求する値として定めておけばよい。 For example, as a placement matching standard, a placement matching standard for comparing at least one of distance and angle between HTML elements corresponding to child nodes included in a partial structure in all layers can be defined. In this case, the threshold value for judging the degree of matching may be determined as a value that requires a higher degree of matching in the case of the lower hierarchy than in the case of the upper hierarchy.

また、例えば、上位階層では、HTML要素間の角度の一致度を比較する配置一致基準を定め、下位階層では、HTML要素間の距離及び角度の両方の一致度を比較する配置一致基準を定めてもよい。 Also, for example, a placement matching standard for comparing the degree of matching of angles between HTML elements is defined in the upper layer, and a placement matching standard for comparing the degree of matching of both distance and angle between HTML elements is defined in the lower layer. good too.

また、上記第1及び第2実施形態における、階層に応じた配置一致基準に加え、部分構造の子ノードに相当するHTML要素の種類に応じて、配置一致基準を異ならせてもよい。この場合の配置一致基準DB320の一例を図16に示す。図16の例では、上位階層と下位階層とで配置一致基準を異ならせると共に、HTML要素の種類がイメージかテキストかに応じても、配置一致基準を異ならせている。ここでは、イメージの場合よりテキストの場合の方が、配置の一致を厳しく判定する例を示している。なお、HTML要素の種類は、イメージ及びテキストに限定されず、他の種類を含んでいてもよい。 In addition to the placement matching criteria according to the hierarchy in the first and second embodiments, the placement matching criteria may be changed according to the type of HTML element corresponding to the child node of the partial structure. FIG. 16 shows an example of the placement matching criteria DB 320 in this case. In the example of FIG. 16, the placement matching criteria are made different between the upper layer and the lower layer, and the placement matching criteria are also made different according to whether the HTML element type is image or text. Here, an example is shown in which alignment matching is determined more strictly for text than for images. Note that the types of HTML elements are not limited to images and text, and may include other types.

また、上記実施形態では、部分構造が属する階層を、階層構造情報(木構造)から判定する場合について説明したが、これに限定されない。HTML文書に対する部分構造の占める割合が大きいほど、上記実施形態の上位階層と同様に、表示サイズが異なるブラウザ間でHTML要素のレイアウトが変化し易い特徴がある。そこで、部分構造のサイズや、HTML文書に対する部分構造の占める割合に応じて、配置一致基準を特定するようにしてもよい。 Further, in the above-described embodiment, a case has been described in which a hierarchy to which a partial structure belongs is determined from hierarchical structure information (tree structure), but the present invention is not limited to this. The larger the ratio of the partial structure to the HTML document, the easier it is for the layout of HTML elements to change between browsers with different display sizes, as in the upper hierarchy of the above embodiment. Therefore, the placement matching criteria may be specified according to the size of the partial structure or the ratio of the partial structure to the HTML document.

また、上記実施形態では、表示比較プログラムが記憶部に予め記憶(インストール)されている態様を説明したが、これに限定されない。開示の技術に係るプログラムは、CD-ROM、DVD-ROM、USBメモリ等の記憶媒体に記憶された形態で提供することも可能である。 Further, in the above-described embodiment, the display comparison program has been pre-stored (installed) in the storage unit, but the present invention is not limited to this. The program according to the technology disclosed herein can also be provided in a form stored in a storage medium such as a CD-ROM, DVD-ROM, USB memory, or the like.

以上の各実施形態に関し、更に以下の付記を開示する。 The following additional remarks are further disclosed regarding each of the above embodiments.

(付記1)
表示する画面サイズが異なる2つのブラウザの各々で表示されるHTML文書に含まれる各要素を階層構造で表した階層構造情報の各々を取得し、
前記階層構造情報が示す前記HTML文書全体の階層構造における、前記階層構造情報に含まれる部分構造が属する階層に応じた基準に基づいて、前記部分構造に含まれる要素の各々について、前記2つのブラウザの各々で表示する場合の配置を比較する
ことを含む処理をコンピュータに実行させるための表示比較プログラム。
(Appendix 1)
Acquiring each piece of hierarchical structure information that expresses each element included in an HTML document displayed in each of two browsers having different screen sizes in a hierarchical structure,
In the hierarchical structure of the entire HTML document indicated by the hierarchical structure information, the two browsers for each of the elements included in the partial structure based on a criterion according to the hierarchy to which the partial structure included in the hierarchical structure information belongs. A display comparison program for causing a computer to perform a process including comparing the arrangement when displayed on each of the .

(付記2)
前記基準を超えて前記2つのブラウザ間で配置が異なる要素を、前記HTML文書を前記2つのブラウザの各々で表示する場合における非互換要素として出力することをさらに含む処理を前記コンピュータに実行させるための付記1に記載の表示比較プログラム。
(Appendix 2)
for causing the computer to execute a process further comprising: outputting elements that exceed the standard and are arranged differently between the two browsers as incompatible elements when the HTML document is displayed on each of the two browsers; The display comparison program according to Supplementary Note 1 of .

(付記3)
前記基準として、前記部分構造が属する階層が下位階層であるほど、前記2つのブラウザ間で表示される要素の配置について、高い一致度を要求する基準を用いる付記1又は付記2に記載の表示比較プログラム。
(Appendix 3)
The display comparison according to appendix 1 or appendix 2, wherein, as the criterion, the lower the hierarchy to which the partial structure belongs, the higher the degree of matching for the arrangement of elements displayed between the two browsers. program.

(付記4)
前記基準として、少なくとも、前記部分構造が前記HTML文書全体の構造に関連する上位階層に属する場合と、前記部分構造が前記HTML文書の局所構造となる下位階層に属する場合とで、異なる基準を用いる付記1~付記3のいずれか1項に記載の表示比較プログラム。
(Appendix 4)
As the criteria, different criteria are used at least when the partial structure belongs to a higher hierarchy related to the structure of the entire HTML document and when the partial structure belongs to a lower hierarchy that is a local structure of the HTML document. The display comparison program according to any one of Appendices 1 to 3.

(付記5)
前記基準として、前記上位階層では、前記部分構造に含まれる要素間の上下左右の位置関係の一致度、前記下位階層では、前記部分構造に含まれる要素間の距離及び角度の少なくとも一方の一致度を用いる付記4に記載の表示比較プログラム。
(Appendix 5)
As the criteria, in the upper layer, the matching degree of vertical and horizontal positional relationships between elements included in the partial structure, and in the lower layer, the matching degree of at least one of distance and angle between elements included in the partial structure. Display comparison program according to appendix 4 using

(付記6)
前記基準として、前記部分構造に含まれる要素間の距離及び角度の少なくとも一方の一致度を用いる場合、前記一致度を判定するための閾値を、前記上位階層の場合より前記下位階層の場合の方が、高い一致度を要求する値にする付記5に記載の表示比較プログラム。
(Appendix 6)
When at least one of the distance and angle between elements included in the partial structure is used as the criterion, the threshold for determining the degree of matching is set higher for the lower hierarchy than for the upper hierarchy. 6. The display comparison program of Claim 5, wherein is set to a value that requires a high degree of matching.

(付記7)
前記要素間の距離及び角度の少なくとも一方の一致度を比較する際、前記2つのブラウザのいずれか一方で表示する場合の要素の配置を、横並びから縦並びに変換、又は、縦並びから横並びに変換して、前記一致度を比較する付記5又は付記6に記載の表示比較プログラム。
(Appendix 7)
When comparing the matching degree of at least one of the distance and angle between the elements, the arrangement of the elements when displayed in one of the two browsers is converted from horizontal to vertical or from vertical to horizontal. 7. The display comparison program according to appendix 5 or appendix 6, which compares the degrees of coincidence with each other.

(付記8)
前記階層構造を、前記上位階層と、前記下位階層と、前記上位階層と前記下位階層との間の中間階層とに分類する場合、
前記基準として、
前記上位階層では、前記部分構造に含まれる要素間の上下左右の位置関係の一致度、
前記中間階層では、前記2つのブラウザのいずれか一方で表示する場合の要素の配置を、横並びから縦並びに変換、又は、縦並びから横並びに変換することを許容した上での、前記部分構造に含まれる要素間の距離及び角度の少なくとも一方の一致度、
前記下位階層では、前記2つのブラウザのいずれか一方で表示する場合の要素の配置を変換することなく、前記部分構造に含まれる要素間の距離及び角度の少なくとも一方の一致度
を用いる
付記7に記載の表示比較プログラム。
(Appendix 8)
When classifying the hierarchical structure into the upper hierarchy, the lower hierarchy, and an intermediate hierarchy between the upper hierarchy and the lower hierarchy,
As the criteria,
In the upper hierarchy, the matching degree of vertical and horizontal positional relationships between elements included in the partial structure;
In the intermediate hierarchy, the arrangement of elements when displayed in one of the two browsers is allowed to be converted from horizontal to vertical or vice versa, and the partial structure is converted to degree of agreement of at least one of distances and angles between included elements;
In the lower hierarchy, the matching degree of at least one of the distance and angle between the elements included in the partial structure is used without converting the arrangement of the elements when displayed in one of the two browsers. Display comparison program as described.

(付記9)
前記基準を、前記部分構造に含まれる要素の種類に応じて異ならせる付記1~付記8のいずれか1項に記載の表示比較プログラム。
(Appendix 9)
9. The display comparison program according to any one of Appendices 1 to 8, wherein the reference is changed according to the types of elements included in the partial structure.

(付記10)
表示する画面サイズが異なる2つのブラウザの各々で表示されるHTML文書に含まれる各要素を階層構造で表した階層構造情報の各々を取得する取得部と、
前記階層構造情報が示す前記HTML文書全体の階層構造における、前記階層構造情報に含まれる部分構造が属する階層に応じた基準に基づいて、前記部分構造に含まれる要素の各々について、前記2つのブラウザの各々で表示する場合の配置を比較する比較部と、
を含む表示比較装置。
(Appendix 10)
an acquisition unit that acquires each piece of hierarchical structure information in which each element included in an HTML document displayed by each of two browsers having different display screen sizes is expressed in a hierarchical structure;
In the hierarchical structure of the entire HTML document indicated by the hierarchical structure information, the two browsers for each of the elements included in the partial structure based on a criterion according to the hierarchy to which the partial structure included in the hierarchical structure information belongs. a comparison unit that compares the arrangement when displayed in each of
display comparison device including;

(付記11)
前記基準を超えて前記2つのブラウザ間で配置が異なる要素を、前記HTML文書を前記2つのブラウザの各々で表示する場合における非互換要素として出力する出力部をさらに含む付記10に記載の表示比較装置。
(Appendix 11)
11. The display comparison according to Supplementary Note 10, further comprising an output unit that outputs an element whose arrangement is different between the two browsers beyond the reference as an incompatible element when the HTML document is displayed on each of the two browsers. Device.

(付記12)
前記比較部は、前記基準として、前記部分構造が属する階層が下位階層であるほど、前記2つのブラウザ間で表示される要素の配置について、高い一致度を要求する基準を用いる付記10又は付記11に記載の表示比較装置。
(Appendix 12)
Supplementary Note 10 or Supplementary Note 11, wherein the comparison unit uses, as the standard, a standard that requires a higher degree of matching for the arrangement of elements displayed between the two browsers as the hierarchy to which the partial structure belongs is lower. The display comparison device according to .

(付記13)
前記比較部は、前記基準として、少なくとも、前記部分構造が前記HTML文書全体の構造に関連する上位階層に属する場合と、前記部分構造が前記HTML文書の局所構造となる下位階層に属する場合とで、異なる基準を用いる付記10~付記12のいずれか1項に記載の表示比較装置。
(Appendix 13)
The comparison unit uses, as the criteria, at least a case where the partial structure belongs to a higher hierarchy related to the structure of the entire HTML document and a case where the partial structure belongs to a lower hierarchy that is a local structure of the HTML document. 13. The display comparison device according to any one of appendices 10 to 12, using different criteria.

(付記14)
前記比較部は、前記基準として、前記上位階層では、前記部分構造に含まれる要素間の上下左右の位置関係の一致度、前記下位階層では、前記部分構造に含まれる要素間の距離及び角度の少なくとも一方の一致度を用いる付記13に記載の表示比較装置。
(Appendix 14)
The comparison unit uses, as the criteria, the matching degree of vertical and horizontal positional relationships between elements included in the partial structure in the upper hierarchy, and the distance and angle between elements included in the partial structure in the lower hierarchy. 14. The display comparison device according to claim 13, using at least one degree of matching.

(付記15)
前記比較部は、前記基準として、前記部分構造に含まれる要素間の距離及び角度の少なくとも一方の一致度を用いる場合、前記一致度を判定するための閾値を、前記上位階層の場合より前記下位階層の場合の方が、高い一致度を要求する値にする付記14に記載の表示比較装置。
(Appendix 15)
When at least one of a distance and an angle between elements included in the partial structure is used as the criterion, the comparison unit sets a threshold value for determining the degree of matching to the lower layer than the upper layer. 15. The display comparison device according to appendix 14, wherein a higher degree of matching is required in the case of hierarchy.

(付記16)
前記比較部は、前記要素間の距離及び角度の少なくとも一方の一致度を比較する際、前記2つのブラウザのいずれか一方で表示する場合の要素の配置を、横並びから縦並びに変換、又は、縦並びから横並びに変換して、前記一致度を比較する付記14又は付記15に記載の表示比較装置。
(Appendix 16)
When comparing at least one of the distance and angle between the elements, the comparison unit converts the arrangement of the elements when displayed in one of the two browsers from horizontal to vertical or vertical. 16. The display comparison device according to appendix 14 or appendix 15, which converts from a row to a horizontal row and compares the degree of matching.

(付記17)
前記階層構造を、前記上位階層と、前記下位階層と、前記上位階層と前記下位階層との間の中間階層とに分類する場合、
前記比較部は、前記基準として、
前記上位階層では、前記部分構造に含まれる要素間の上下左右の位置関係の一致度、
前記中間階層では、前記2つのブラウザのいずれか一方で表示する場合の要素の配置を、横並びから縦並びに変換、又は、縦並びから横並びに変換することを許容した上での、前記部分構造に含まれる要素間の距離及び角度の少なくとも一方の一致度、
前記下位階層では、前記2つのブラウザのいずれか一方で表示する場合の要素の配置を変換することなく、前記部分構造に含まれる要素間の距離及び角度の少なくとも一方の一致度
を用いる
付記16に記載の表示比較装置。
(Appendix 17)
When classifying the hierarchical structure into the upper hierarchy, the lower hierarchy, and an intermediate hierarchy between the upper hierarchy and the lower hierarchy,
The comparison unit, as the reference,
In the upper hierarchy, the matching degree of vertical and horizontal positional relationships between elements included in the partial structure;
In the intermediate hierarchy, the arrangement of elements when displayed in one of the two browsers is allowed to be converted from horizontal to vertical or vice versa, and the partial structure is converted to degree of agreement of at least one of distances and angles between included elements;
In the lower hierarchy, the matching degree of at least one of the distance and the angle between the elements included in the partial structure is used without converting the arrangement of the elements when displayed in one of the two browsers. Display comparison device as described.

(付記18)
前記比較部は、前記基準を、前記部分構造に含まれる要素の種類に応じて異ならせる付記10~付記17のいずれか1項に記載の表示比較装置。
(Appendix 18)
18. The display comparison device according to any one of appendices 10 to 17, wherein the comparison unit varies the reference according to the types of elements included in the partial structure.

(付記19)
表示する画面サイズが異なる2つのブラウザの各々で表示されるHTML文書に含まれる各要素を階層構造で表した階層構造情報の各々を取得し、
前記階層構造情報が示す前記HTML文書全体の階層構造における、前記階層構造情報に含まれる部分構造が属する階層に応じた基準に基づいて、前記部分構造に含まれる要素の各々について、前記2つのブラウザの各々で表示する場合の配置を比較する
ことを含む処理をコンピュータが実行する表示比較方法。
(Appendix 19)
Acquiring each piece of hierarchical structure information that expresses each element included in an HTML document displayed in each of two browsers having different screen sizes in a hierarchical structure,
In the hierarchical structure of the entire HTML document indicated by the hierarchical structure information, the two browsers for each of the elements included in the partial structure based on a criterion according to the hierarchy to which the partial structure included in the hierarchical structure information belongs. A display comparison method in which a computer performs a process including comparing the placement when displayed on each of the .

(付記20)
表示する画面サイズが異なる2つのブラウザの各々で表示されるHTML文書に含まれる各要素を階層構造で表した階層構造情報の各々を取得し、
前記階層構造情報が示す前記HTML文書全体の階層構造における、前記階層構造情報に含まれる部分構造が属する階層に応じた基準に基づいて、前記部分構造に含まれる要素の各々について、前記2つのブラウザの各々で表示する場合の配置を比較する
ことを含む処理をコンピュータに実行させるための表示比較プログラムを記憶した記憶媒体。
(Appendix 20)
Acquiring each piece of hierarchical structure information that expresses each element included in an HTML document displayed in each of two browsers having different screen sizes in a hierarchical structure,
In the hierarchical structure of the entire HTML document indicated by the hierarchical structure information, the two browsers for each of the elements included in the partial structure based on a criterion according to the hierarchy to which the partial structure included in the hierarchical structure information belongs. A storage medium storing a display comparison program for causing a computer to execute a process including comparing the arrangement when displayed in each of the.

10、210 表示比較装置
12 取得部
14、214 比較部
16 出力部
20、220、320 配置一致基準DB
40 コンピュータ
41 CPU
42 メモリ
43 記憶部
49 記憶媒体
50、250 表示比較プログラム
10, 210 display comparison device 12 acquisition unit 14, 214 comparison unit 16 output unit 20, 220, 320 arrangement matching reference DB
40 computer 41 CPU
42 memory 43 storage unit 49 storage medium 50, 250 display comparison program

Claims (10)

表示する画面サイズが異なる2つのブラウザの各々で表示されるHTML文書に含まれる各要素を階層構造で表すと共に、各要素の画面上での位置及びサイズの情報を含む階層構造情報の各々を取得し、
前記階層構造情報が示す前記HTML文書全体の階層構造における、前記階層構造情報に含まれる部分構造が属する階層に応じた、前記2つのブラウザ間での要素の配置の一致度の基準に基づいて、前記部分構造に含まれる要素の各々について、前記2つのブラウザの各々で表示する場合の配置が一致するか否かを比較し、
前記基準を超えて前記2つのブラウザ間で配置が異なる要素を、前記HTML文書を前記2つのブラウザの各々で表示する場合における非互換要素として出力する
ことを含む処理をコンピュータに実行させるための表示比較プログラム。
Each element contained in the HTML document displayed by each of two browsers with different screen sizes is expressed in a hierarchical structure, and each hierarchical structure information including information on the position and size of each element on the screen is displayed. Acquired,
Based on a standard of matching degree of arrangement of elements between the two browsers according to the hierarchy to which the partial structure included in the hierarchical structure information belongs in the hierarchical structure of the entire HTML document indicated by the hierarchical structure information, comparing each of the elements included in the partial structure with respect to whether or not the arrangement when displayed on each of the two browsers matches ;
Outputting elements whose arrangement is different between the two browsers beyond the standard as incompatible elements when the HTML document is displayed on each of the two browsers.
A display comparison program for causing a computer to execute processing including:
前記基準として、前記部分構造が属する階層が下位階層であるほど、前記2つのブラウザ間で表示される要素の配置について、高い一致度を要求する基準を用いる請求項1に記載の表示比較プログラム。 2. The display comparison program according to claim 1 , wherein the lower the hierarchy to which the partial structure belongs, the higher the degree of matching required for arrangement of elements displayed between the two browsers. 前記基準として、少なくとも、前記部分構造が前記HTML文書全体の構造に関連する上位階層に属する場合と、前記部分構造が前記HTML文書の局所構造となる下位階層に属する場合とで、異なる基準を用いる請求項1又は請求項2に記載の表示比較プログラム。 As the criteria, different criteria are used at least when the partial structure belongs to a higher hierarchy related to the structure of the entire HTML document and when the partial structure belongs to a lower hierarchy that is a local structure of the HTML document. The display comparison program according to claim 1 or 2 . 前記基準として、前記上位階層では、前記部分構造に含まれる要素間の上下左右の位置関係の一致度、前記下位階層では、前記部分構造に含まれる要素間の距離及び角度の少なくとも一方の一致度を用いる請求項に記載の表示比較プログラム。 As the criteria, in the upper layer, the matching degree of vertical and horizontal positional relationships between elements included in the partial structure, and in the lower layer, the matching degree of at least one of distance and angle between elements included in the partial structure. 4. The display comparison program according to claim 3 , using . 前記基準として、前記部分構造に含まれる要素間の距離及び角度の少なくとも一方の一致度を用いる場合、前記一致度を判定するための閾値を、前記上位階層の場合より前記下位階層の場合の方が、高い一致度を要求する値にする請求項に記載の表示比較プログラム。 When at least one of the distance and angle between elements included in the partial structure is used as the criterion, the threshold for determining the degree of matching is set higher for the lower hierarchy than for the upper hierarchy. 5. The display comparison program according to claim 4 , wherein is set to a value requiring a high degree of matching. 前記要素間の距離及び角度の少なくとも一方の一致度を比較する際、前記2つのブラウザのいずれか一方で表示する場合の要素の配置を、横並びから縦並びに変換、又は、縦並びから横並びに変換して、前記一致度を比較する請求項又は請求項に記載の表示比較プログラム。 When comparing the matching degree of at least one of the distance and angle between the elements, the arrangement of the elements when displayed in one of the two browsers is converted from horizontal to vertical or from vertical to horizontal. 6. The display comparison program according to claim 4 or 5 , wherein the degree of coincidence is compared. 前記階層構造を、前記上位階層と、前記下位階層と、前記上位階層と前記下位階層との間の中間階層とに分類する場合、
前記基準として、
前記上位階層では、前記部分構造に含まれる要素間の上下左右の位置関係の一致度、
前記中間階層では、前記2つのブラウザのいずれか一方で表示する場合の要素の配置を、横並びから縦並びに変換、又は、縦並びから横並びに変換することを許容した上での、前記部分構造に含まれる要素間の距離及び角度の少なくとも一方の一致度、
前記下位階層では、前記2つのブラウザのいずれか一方で表示する場合の要素の配置を変換することなく、前記部分構造に含まれる要素間の距離及び角度の少なくとも一方の一致度
を用いる
請求項に記載の表示比較プログラム。
When classifying the hierarchical structure into the upper hierarchy, the lower hierarchy, and an intermediate hierarchy between the upper hierarchy and the lower hierarchy,
As the criteria,
In the upper hierarchy, the matching degree of vertical and horizontal positional relationships between elements included in the partial structure;
In the intermediate hierarchy, the arrangement of elements when displayed in one of the two browsers is allowed to be converted from horizontal to vertical or vice versa, and the partial structure is converted to degree of agreement of at least one of distances and angles between included elements;
7. In the lower hierarchy, a matching degree of at least one of distance and angle between elements included in the partial structure is used without converting arrangement of elements when displayed in one of the two browsers. The display comparison program described in .
前記基準を、前記部分構造に含まれる要素の種類に応じて異ならせる請求項1~請求項のいずれか1項に記載の表示比較プログラム。 8. The display comparison program according to any one of claims 1 to 7 , wherein the reference is made different according to the types of elements included in the partial structure. 表示する画面サイズが異なる2つのブラウザの各々で表示されるHTML文書に含まれる各要素を階層構造で表すと共に、各要素の画面上での位置及びサイズの情報を含む階層構造情報の各々を取得する取得部と、
前記階層構造情報が示す前記HTML文書全体の階層構造における、前記階層構造情報に含まれる部分構造が属する階層に応じた、前記2つのブラウザ間での要素の配置の一致度の基準に基づいて、前記部分構造に含まれる要素の各々について、前記2つのブラウザの各々で表示する場合の配置が一致するか否かを比較する比較部と、
前記基準を超えて前記2つのブラウザ間で配置が異なる要素を、前記HTML文書を前記2つのブラウザの各々で表示する場合における非互換要素として出力する出力部と、
を含む表示比較装置。
Each element contained in the HTML document displayed by each of two browsers with different screen sizes is expressed in a hierarchical structure, and each hierarchical structure information including information on the position and size of each element on the screen is displayed. an acquisition unit that acquires
Based on a standard of matching degree of arrangement of elements between the two browsers according to the hierarchy to which the partial structure included in the hierarchical structure information belongs in the hierarchical structure of the entire HTML document indicated by the hierarchical structure information, a comparison unit that compares whether or not the arrangement of each of the elements included in the partial structure matches when displayed on each of the two browsers;
an output unit configured to output an element whose layout is different between the two browsers beyond the standard as an incompatible element when the HTML document is displayed on each of the two browsers;
display comparison device including;
表示する画面サイズが異なる2つのブラウザの各々で表示されるHTML文書に含まれる各要素を階層構造で表すと共に、各要素の画面上での位置及びサイズの情報を含む階層構造情報の各々を取得し、
前記階層構造情報が示す前記HTML文書全体の階層構造における、前記階層構造情報に含まれる部分構造が属する階層に応じた、前記2つのブラウザ間での要素の配置の一致度の基準に基づいて、前記部分構造に含まれる要素の各々について、前記2つのブラウザの各々で表示する場合の配置が一致するか否かを比較し、
前記基準を超えて前記2つのブラウザ間で配置が異なる要素を、前記HTML文書を前記2つのブラウザの各々で表示する場合における非互換要素として出力する
ことを含む処理をコンピュータが実行する表示比較方法。
Each element contained in the HTML document displayed by each of two browsers with different screen sizes is expressed in a hierarchical structure, and each hierarchical structure information including information on the position and size of each element on the screen is displayed. Acquired,
Based on a standard of matching degree of arrangement of elements between the two browsers according to the hierarchy to which the partial structure included in the hierarchical structure information belongs in the hierarchical structure of the entire HTML document indicated by the hierarchical structure information, comparing each of the elements included in the partial structure with respect to whether or not the arrangement when displayed on each of the two browsers matches ;
Outputting elements whose arrangement is different between the two browsers beyond the standard as incompatible elements when the HTML document is displayed on each of the two browsers.
A display comparison method in which a computer performs processing including:
JP2019002848A 2019-01-10 2019-01-10 Display comparison program, apparatus and method Active JP7215176B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019002848A JP7215176B2 (en) 2019-01-10 2019-01-10 Display comparison program, apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019002848A JP7215176B2 (en) 2019-01-10 2019-01-10 Display comparison program, apparatus and method

Publications (2)

Publication Number Publication Date
JP2020113002A JP2020113002A (en) 2020-07-27
JP7215176B2 true JP7215176B2 (en) 2023-01-31

Family

ID=71667034

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019002848A Active JP7215176B2 (en) 2019-01-10 2019-01-10 Display comparison program, apparatus and method

Country Status (1)

Country Link
JP (1) JP7215176B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022195726A1 (en) 2021-03-16 2022-09-22 富士通株式会社 Information processing program, information processing method, and information processing device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110019676A1 (en) 2009-07-21 2011-01-27 Cisco Technology, Inc. Extended subnets
JP2016071418A (en) 2014-09-26 2016-05-09 富士通株式会社 Display area specification device, display area specification method, and program
US20180052808A1 (en) 2016-08-16 2018-02-22 Adobe Systems Incorporated Creation and display of a webpage with alternative layouts for different webpage widths

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110019676A1 (en) 2009-07-21 2011-01-27 Cisco Technology, Inc. Extended subnets
JP2016071418A (en) 2014-09-26 2016-05-09 富士通株式会社 Display area specification device, display area specification method, and program
US20180052808A1 (en) 2016-08-16 2018-02-22 Adobe Systems Incorporated Creation and display of a webpage with alternative layouts for different webpage widths

Also Published As

Publication number Publication date
JP2020113002A (en) 2020-07-27

Similar Documents

Publication Publication Date Title
US10409856B2 (en) Approaches for associating terms with image regions
JP4918776B2 (en) Electronic document comparison program, electronic document comparison device, and electronic document comparison method
JP6827116B2 (en) Web page clustering method and equipment
CN110659527B (en) Form detection in electronic forms
US10528649B2 (en) Recognizing unseen fonts based on visual similarity
CN107315680B (en) Method and system for detecting Hybrid mobile application user interface
US10878024B2 (en) Dynamic thumbnails
US20150213313A1 (en) Methods and systems for efficient automated symbol recognition using multiple clusters of symbol patterns
US20190141110A1 (en) Design Analysis for Framework Assessment
JP4544324B2 (en) Document processing apparatus and program
JP5612557B2 (en) Method, computer readable medium and system for determining table cell height
JP7215176B2 (en) Display comparison program, apparatus and method
US8977956B2 (en) Document aesthetics evaluation
CN112035772A (en) Page evaluation method, device and equipment
CN111368241A (en) Webpage element identification method based on XPath
JP2013137761A (en) Determination for transparent painting-out based on reference background color
JP2020191057A (en) Layout analysis method, reading assist device, circuit, and medium
Li et al. Comic image understanding based on polygon detection
WO2022142549A1 (en) Text recognition method and apparatus, and storage medium
CN117151106A (en) Method and device for generating document outline, electronic equipment and storage medium
JP6542712B2 (en) Logical relation recognition device, logical relation recognition method and logical relation recognition program
CN114283436A (en) Table identification method, device, equipment and storage medium
JP2018055256A (en) Information processing apparatus, information processing method, and program
JP6805903B2 (en) Display difference detection programs, devices, and methods
TW308677B (en) Method of automatic separating text box and segmenting word in Chinese/English recognition system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211007

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220830

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220831

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220922

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230102

R150 Certificate of patent or registration of utility model

Ref document number: 7215176

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150