• R/O
  • HTTP
  • SSH
  • HTTPS

clientJs: コミット

クライアント側 js 開発用


コミットメタ情報

リビジョンd56e8cc1e13089eb6cbc9dcc6900d7f1828b93df (tree)
日時2016-11-08 13:17:44
作者itozyun <itozyun@user...>
コミッターitozyun

ログメッセージ

Version 0.6.220, Fix the bug of X.HTMLParser.

変更サマリ

差分

--- a/0.6.x/js/02_dom/04_XBoxModel.js
+++ b/0.6.x/js/02_dom/04_XBoxModel.js
@@ -20,7 +20,7 @@ X_ViewPort[ 'listenOnce' ]( X_EVENT_INIT, function(){
2020 X_Node_BoxModel.CONTENT_BOX;
2121
2222 if( X_Node_BoxModel_defaultBoxModel === X_Node_BoxModel.CONTENT_BOX ){
23- X_Node_BoxModel_boxSizingEnabled = node[ 'cssText' ]( 'width:10px;padding:1px;border:2px solid #0;margin:4px;' +
23+ X_Node_BoxModel_boxSizingEnabled = node[ 'cssText' ]( 'width:10px;padding:1px;border:2px solid red;margin:4px;' +
2424 'box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;-ms-box-sizing:border-box;' )
2525 [ 'width' ]() === 10;
2626 };
--- a/0.6.x/js/02_dom/05_XNodeAttr.js
+++ b/0.6.x/js/02_dom/05_XNodeAttr.js
@@ -190,7 +190,7 @@ function X_Node_attr( nameOrObj /* v */ ){
190190 };
191191 return this;
192192 } else
193- if( typeof nameOrObj === 'string' ){
193+ if( X_Type_isString( nameOrObj ) ){
194194 // getter
195195 switch( nameOrObj ){
196196 case 'id' :
--- a/0.6.x/js/02_dom/09_XHTMLParser.js
+++ b/0.6.x/js/02_dom/09_XHTMLParser.js
@@ -59,12 +59,12 @@ var X_HTMLParser_CHARS = {
5959 lastHtml = html,
6060 chars, last, text, index;
6161
62- while ( html ) {
62+ while( html ){
6363 chars = true;
6464 last = stack[ stack.length - 1 ];
6565
6666 // Make sure we're not in a script or style element
67- if ( last && special[ handler.isXML ? last.toUpperCase() : last ] === 1 ) {
67+ if( last && special[ handler.isXML ? last.toUpperCase() : last ] === 1 ){
6868 if( 0 <= ( index = html.toUpperCase().indexOf( '</' + ( handler.isXML ? last.toUpperCase() : last ) ) ) ){
6969 handler.chars( html.substring( 0, index ) );
7070 if( index = X_HTMLParser__parseEndTag( stack, handler, html ) ){
@@ -79,22 +79,22 @@ var X_HTMLParser_CHARS = {
7979 };
8080 } else {
8181 // Comment
82- if ( html.indexOf("<!--") === 0 ) {
83- if ( 0 < ( index = html.indexOf("-->") ) ) {
82+ if( html.indexOf("<!--") === 0 ){
83+ if( 0 < ( index = html.indexOf("-->") ) ){
8484 handler.comment( html.substring( 4, index ) );
8585 html = html.substring( index + 3 );
8686 chars = false;
8787 };
8888
8989 // end tag
90- } else if ( html.indexOf("</") === 0 ) {
91- if ( 2 < ( index = X_HTMLParser__parseEndTag( stack, handler, html ) ) ) {
90+ } else if( html.indexOf("</") === 0 ){
91+ if( 2 < ( index = X_HTMLParser__parseEndTag( stack, handler, html ) ) ){
9292 html = html.substring( index );
9393 chars = false;
9494 };
9595
9696 // start tag
97- } else if ( html.indexOf("<") === 0 ) {
97+ } else if( html.indexOf("<") === 0 ){
9898 if( index = X_HTMLParser__parseStartTag( stack, last, handler, html ) ){
9999 html = html.substring( index );
100100 chars = false;
@@ -104,7 +104,7 @@ var X_HTMLParser_CHARS = {
104104 };
105105 };
106106
107- if ( chars ) {
107+ if( chars ){
108108 index = html.indexOf("<");
109109
110110 text = index < 0 ? html : html.substring( 0, index );
@@ -171,14 +171,16 @@ var X_HTMLParser_CHARS = {
171171 case 4 : // 属性名の終わりを待つ
172172 chr === '=' ?
173173 ( ( phase = 6 ) && ( attrName = html.substring( start, i ) ) ) :
174- ( whiteSpace[ chr ] & 16 ) &&
175- ( ( phase = 5 ) && ( attrName = html.substring( start, i ) ) );
174+ ( whiteSpace[ chr ] & 16 ) ?
175+ ( ( phase = 5 ) && ( attrName = html.substring( start, i ) ) ) :
176+ ( chr === '>' || ( empty = html.substr( i, 2 ) === '/>' ) ) &&
177+ ( ( phase = 9 ) && ( attrs[ attrs.length ] = html.substring( start, i ) ) );
176178 break;
177179 case 5 : // 属性の = または次の属性または htmlタグの閉じ
178180 !( whiteSpace[ chr ] & 16 ) &&// ie4 未対応の属性には cite = http:// となる
179181 // 1 :
180182 ( alphabets[ chr ] & 3 ) ?
181- ( ( phase = 4 ) && ( attrs[ attrs.length ] = attrName ) && ( start = i ) ) :
183+ ( ( phase = 3 ) && ( attrs[ attrs.length ] = attrName ) && ( start = i ) ) : // <textarea readonly>
182184 chr === '=' ?
183185 ( phase = 6 ) :
184186 ( chr === '>' || ( empty = html.substr( i, 2 ) === '/>' ) ) &&
@@ -199,7 +201,7 @@ var X_HTMLParser_CHARS = {
199201 ( chr === '>' ) ?
200202 ( ( phase = 9 ) && saveAttr( attrs, attrName, html.substring( start, i ) ) ) :
201203 !escape && !uri[ attrName ] && ( empty = html.substr( i, 2 ) === '/>' ) && // attr の val が uri で / で終わりかつ、未対応属性の場合
202- ( phase = 9 );
204+ ( ( phase = 9 ) && saveAttr( attrs, attrName, html.substring( start, i ) ) );
203205 break;
204206 };
205207 escape = chr === '\\' && !escape; // \\\\ is not escape for "
旧リポジトリブラウザで表示