From 40ec5cc46e67bd0cf1223493d5a3b395ae48462f Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 21 Nov 2021 03:19:08 +0000 Subject: [PATCH] WebView fix for tables: line postion and autoclose some tags git-svn-id: svn://kolibrios.org@9293 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/browser/TWB/set_style.h | 8 +++++++- programs/cmm/browser/WebView.c | 2 +- programs/cmm/browser/build.bat | 7 ++++++- programs/cmm/browser/{compile_en.sh => build.sh} | 0 programs/cmm/browser/compile_en.bat | 6 ------ programs/cmm/browser/compile_ru.bat | 6 ------ programs/cmm/browser/compile_ru.sh | 1 - programs/cmm/browser/const.h | 2 +- programs/cmm/browser/res/test.htm | 8 ++++---- 9 files changed, 19 insertions(+), 21 deletions(-) rename programs/cmm/browser/{compile_en.sh => build.sh} (100%) delete mode 100644 programs/cmm/browser/compile_en.bat delete mode 100644 programs/cmm/browser/compile_ru.bat delete mode 100755 programs/cmm/browser/compile_ru.sh diff --git a/programs/cmm/browser/TWB/set_style.h b/programs/cmm/browser/TWB/set_style.h index 6227f38c6..a77eee1cd 100644 --- a/programs/cmm/browser/TWB/set_style.h +++ b/programs/cmm/browser/TWB/set_style.h @@ -200,7 +200,7 @@ void TWebBrowser::tag_hr() dword hrcol = 0x00777777; if (tag.get_value_of("color")) hrcol = GetColor(tag.value); if (draw_x != left_gap) NewLine(); - if (secondrun) canvas.DrawBar(5, style.cur_line_h / 2 + draw_y - 1, draw_w-10, 1, hrcol); + if (secondrun) canvas.DrawBar(5+left_gap, style.cur_line_h / 2 + draw_y - 1, draw_w-10, 1, hrcol); draw_x++; NewLine(); return; @@ -342,6 +342,12 @@ void TWebBrowser::tag_table_reset() void TWebBrowser::tag_table() { + if (!tag.opened) { + if (style.font) tag_font(); + if (link) tag_a(); + style.b = false; + } + if (tag.is("table")) { if(tag.opened) { table.depth++; diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c index 7a3f634bf..321df6e79 100644 --- a/programs/cmm/browser/WebView.c +++ b/programs/cmm/browser/WebView.c @@ -44,6 +44,7 @@ //===================================================// bool debug_mode = false; bool show_images = true; +bool source_mode = false; _history history; @@ -63,7 +64,6 @@ dword TOOLBAR_H = PADDING+TSZE+PADDING+2; _http http = 0; -bool source_mode = false; progress_bar prbar; proc_info Form; diff --git a/programs/cmm/browser/build.bat b/programs/cmm/browser/build.bat index 1c9873cf1..ac6ced297 100644 --- a/programs/cmm/browser/build.bat +++ b/programs/cmm/browser/build.bat @@ -1,6 +1,11 @@ @ECHO OFF -call "compile_ru.bat" +@c-- /D=LANG_RUS WebView.c +@del WebView +@rename WebView.com WebView +@del warning.txt + +if not exist WebView ( @pause ) if exist WebView ( "C:\Program Files (x86)\WinImage\winimage.exe" "C:\Users\leency\Desktop\kolibri.img" /H /Q /I WebView diff --git a/programs/cmm/browser/compile_en.sh b/programs/cmm/browser/build.sh similarity index 100% rename from programs/cmm/browser/compile_en.sh rename to programs/cmm/browser/build.sh diff --git a/programs/cmm/browser/compile_en.bat b/programs/cmm/browser/compile_en.bat deleted file mode 100644 index 76b2516b1..000000000 --- a/programs/cmm/browser/compile_en.bat +++ /dev/null @@ -1,6 +0,0 @@ -@c-- /D=LANG_ENG WebView.c -@del WebView -@rename WebView.com WebView -@del warning.txt - -if not exist WebView ( @pause ) \ No newline at end of file diff --git a/programs/cmm/browser/compile_ru.bat b/programs/cmm/browser/compile_ru.bat deleted file mode 100644 index d20bd5c2b..000000000 --- a/programs/cmm/browser/compile_ru.bat +++ /dev/null @@ -1,6 +0,0 @@ -@c-- /D=LANG_RUS WebView.c -@del WebView -@rename WebView.com WebView -@del warning.txt - -if not exist WebView ( @pause ) \ No newline at end of file diff --git a/programs/cmm/browser/compile_ru.sh b/programs/cmm/browser/compile_ru.sh deleted file mode 100755 index 925ac45d5..000000000 --- a/programs/cmm/browser/compile_ru.sh +++ /dev/null @@ -1 +0,0 @@ -../c--/c--.elf -D=LANG_RUS WebView.c \ No newline at end of file diff --git a/programs/cmm/browser/const.h b/programs/cmm/browser/const.h index 4f7a9cb14..5e480ca1a 100644 --- a/programs/cmm/browser/const.h +++ b/programs/cmm/browser/const.h @@ -107,4 +107,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw"; #define DEFAULT_URL URL_SERVICE_HOMEPAGE -char version[]="WebView 3.52b"; \ No newline at end of file +char version[]="WebView 3.52c"; \ No newline at end of file diff --git a/programs/cmm/browser/res/test.htm b/programs/cmm/browser/res/test.htm index 32b3d604c..b72ca41d1 100644 --- a/programs/cmm/browser/res/test.htm +++ b/programs/cmm/browser/res/test.htm @@ -7,6 +7,9 @@ Kolibri Store
Simplest: +nostalgy.net.ru +pci.ids +dgmag.in bash.im opennet LOR @@ -14,8 +17,7 @@ samlib.ru/b mirrors.pdp-11.ru Simple: -pci.ids -dgmag.in +lionovsky.us os-menuet.narod.ru mestack.narod.ru coolthemes.narod.ru @@ -23,13 +25,11 @@ Total Hardware 1999 GUI Gallery menuetos.net -
Moderate: fdd5-25 acmp.ru old-dos.ru weitek - Complex: artcon.ru nubo.ru