mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-26 00:26:52 +03:00
WebView 1.0 Beta 6: fix new line in <pre> text (ViewSouce), speed optimizations
git-svn-id: svn://kolibrios.org@4726 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
caaecffc19
commit
9bef1cf48b
@ -127,6 +127,7 @@ void TWebBrowser::Parse(){
|
|||||||
byte ignor_param;
|
byte ignor_param;
|
||||||
char temp[768];
|
char temp[768];
|
||||||
dword bufpos = bufpointer;
|
dword bufpos = bufpointer;
|
||||||
|
int line_len;
|
||||||
|
|
||||||
b_text = i_text = u_text = s_text = blq_text = t_html = t_body =
|
b_text = i_text = u_text = s_text = blq_text = t_html = t_body =
|
||||||
li_text = link = ignor_text = text_color_index = text_colors[0] = li_tab =
|
li_text = link = ignor_text = text_color_index = text_colors[0] = li_tab =
|
||||||
@ -165,6 +166,7 @@ void TWebBrowser::Parse(){
|
|||||||
chrcat(#line, ' ');
|
chrcat(#line, ' ');
|
||||||
bukva = temp = NULL;
|
bukva = temp = NULL;
|
||||||
Perenos();
|
Perenos();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case '\9':
|
case '\9':
|
||||||
if (pre_text) //èíà÷å èä¸ì íà 0x0d
|
if (pre_text) //èíà÷å èä¸ì íà 0x0d
|
||||||
@ -224,7 +226,7 @@ void TWebBrowser::Parse(){
|
|||||||
if (bukva == '\9') || (bukva == '\x0a') || (bukva == '\x0d') bukva = ' ';
|
if (bukva == '\9') || (bukva == '\x0a') || (bukva == '\x0d') bukva = ' ';
|
||||||
if (!ignor_param) && (bukva <>' ')
|
if (!ignor_param) && (bukva <>' ')
|
||||||
{
|
{
|
||||||
if (strlen(#tag)<sizeof(tag)) strcat(#tag, #bukva);
|
if (strlen(#tag)<sizeof(tag)) chrcat(#tag, bukva);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -240,7 +242,7 @@ void TWebBrowser::Parse(){
|
|||||||
if (strcmp(#tag, "/condition")!=0) break;
|
if (strcmp(#tag, "/condition")!=0) break;
|
||||||
}
|
}
|
||||||
if (tag[strlen(#tag)-1]=='/') tag[strlen(#tag)-1]=NULL; //for br/
|
if (tag[strlen(#tag)-1]=='/') tag[strlen(#tag)-1]=NULL; //for br/
|
||||||
if (tagparam) && (strlen(#tagparam) < 4000) GetNextParam();
|
if (tagparam) GetNextParam();
|
||||||
|
|
||||||
if (stolbec + strlen(#line) > list.column_max) Perenos();
|
if (stolbec + strlen(#line) > list.column_max) Perenos();
|
||||||
DrawPage();
|
DrawPage();
|
||||||
@ -251,13 +253,14 @@ void TWebBrowser::Parse(){
|
|||||||
default:
|
default:
|
||||||
DEFAULT_MARK:
|
DEFAULT_MARK:
|
||||||
if (bukva<=15) bukva=' ';
|
if (bukva<=15) bukva=' ';
|
||||||
|
line_len = strlen(#line);
|
||||||
if (!pre_text) && (bukva == ' ')
|
if (!pre_text) && (bukva == ' ')
|
||||||
{
|
{
|
||||||
if (line[strlen(#line)-1]==' ') break; //óáğàòü 2 ïğîáåëà ïîäğÿä
|
if (line[line_len-1]==' ') break; //no double spaces
|
||||||
if (!stolbec) && (!line) break; //ñòğîêà íå ìîæåò íà÷èíàòüñÿ ñ ïğîáåëà
|
if (!stolbec) && (!line) break; //no paces at the beginning of the line
|
||||||
}
|
}
|
||||||
if (strlen(#line)<sizeof(line)) chrcat(#line, bukva);
|
if (line_len < sizeof(line)) chrcat(#line, bukva);
|
||||||
if (stolbec + strlen(#line) > list.column_max) Perenos();
|
if (stolbec + line_len > list.column_max) Perenos();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DrawPage();
|
DrawPage();
|
||||||
|
@ -29,14 +29,14 @@
|
|||||||
char homepage[] = FROM "html\homepage.htm";
|
char homepage[] = FROM "html\homepage.htm";
|
||||||
|
|
||||||
#ifdef LANG_RUS
|
#ifdef LANG_RUS
|
||||||
char version[]=" ’¥ªáâ®¢ë© ¡à 㧥à 1.0 Beta 5.5";
|
char version[]=" ’¥ªáâ®¢ë© ¡à 㧥à 1.0 Beta 6";
|
||||||
?define IMAGES_CACHE_CLEARED "Šíè ª à⨮ª ®ç¨é¥"
|
?define IMAGES_CACHE_CLEARED "Šíè ª à⨮ª ®ç¨é¥"
|
||||||
?define T_LAST_SLIDE "<EFBFBD>â® ¯®á«¥¤¨© á« ©¤"
|
?define T_LAST_SLIDE "<EFBFBD>â® ¯®á«¥¤¨© á« ©¤"
|
||||||
char loading[] = "‡ £à㧪 áâà ¨æë...<br>";
|
char loading[] = "‡ £à㧪 áâà ¨æë...<br>";
|
||||||
char page_not_found[] = FROM "html\page_not_found_ru.htm";
|
char page_not_found[] = FROM "html\page_not_found_ru.htm";
|
||||||
char accept_language[]= "Accept-Language: ru\n";
|
char accept_language[]= "Accept-Language: ru\n";
|
||||||
#else
|
#else
|
||||||
char version[]=" Text-based Browser 1.0 Beta 5";
|
char version[]=" Text-based Browser 1.0 Beta 6";
|
||||||
?define IMAGES_CACHE_CLEARED "Images cache cleared"
|
?define IMAGES_CACHE_CLEARED "Images cache cleared"
|
||||||
?define T_LAST_SLIDE "This slide is the last"
|
?define T_LAST_SLIDE "This slide is the last"
|
||||||
char loading[] = "Loading...<br>";
|
char loading[] = "Loading...<br>";
|
||||||
|
Loading…
Reference in New Issue
Block a user