browser bugfixes

git-svn-id: svn://kolibrios.org@7799 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2020-04-16 06:39:58 +00:00
parent e510a94760
commit 52e6b02de2
4 changed files with 6 additions and 5 deletions

View File

@ -341,7 +341,7 @@ void TWebBrowser::SetStyle() {
// Autodetecting encoding if no encoding was set
if (tag.opened) && (custom_encoding==-1) && (cur_encoding == CH_CP866) {
if (strstr(bufpointer, "\208\190")) ChangeEncoding(CH_UTF8);
else if (chrnum(bufpointer, '\x246')>5) ChangeEncoding(CH_CP1251);
else if (chrnum(bufpointer, '\246')>5) ChangeEncoding(CH_CP1251);
}
return;
}

View File

@ -701,6 +701,7 @@ void LoadInternalPage(dword _bufdata, _in_bufsize){
DrawActiveTab();
if (source_mode) {
source_mode = false;
WB1.custom_encoding = CH_CP866;
ShowSource(WB1.bufpointer, _in_bufsize);
} else {
WB1.DrawPage();
@ -708,7 +709,7 @@ void LoadInternalPage(dword _bufdata, _in_bufsize){
}
}
byte UrlExtIs(dword base, ext)
bool UrlExtIs(dword base, ext)
{
if (!strcmpi(base + strlen(base) - strlen(ext), ext)) return true;
return false;

View File

@ -134,7 +134,7 @@ void DrawTabsBar()
{
dword i;
tab_w = GetTabWidth();
for (i=0; i<tab.count; i++) DrawTab(i);
for (i=0; i<tab.count; i++) DrawTab(i);
i = DrawNewTabButton();
DrawBar(i, TOOLBAR_H, Form.cwidth-i, TAB_H-1, MixColors(system.color.work_dark, system.color.work, 128));
DrawBar(i, TOOLBAR_H+TAB_H-1, Form.cwidth-i, 1, system.color.work_graph);
@ -142,7 +142,7 @@ void DrawTabsBar()
void EventTabClose(int _id)
{
DeleteButton(tab.count);
DeleteButton(TAB_ID + tab.count-1);
if (_id == tab.active) {
tab.close(_id);
tab.restore(tab.active);

View File

@ -1,4 +1,4 @@
char version[]="WebView 2.46d";
char version[]="WebView 2.46f";
#ifdef LANG_RUS
char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0";