WebView 2.0 beta 1:

- rewrite tag parsing procedure to use collections
- completely refactor TWB component
- fix a couple of issues: broken tabs in <pre>, mishandle of local page not found, anchors memory leak
- so finally all id's and names are included as anchors*
(*some anchors in web still don't work)

git-svn-id: svn://kolibrios.org@7752 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
2020-03-26 00:12:32 +00:00
parent 00d0aad98e
commit d05eee0368
12 changed files with 393 additions and 365 deletions

View File

@@ -36,6 +36,7 @@ proc_info Form;
dword TOOLBAR_H = 40;
dword STATUSBAR_H = 0;
dword col_bg = 0xE3E2E2;
dword panel_color = 0xE3E2E2;
dword border_color = 0x8C8C8C;
@@ -49,12 +50,14 @@ enum {
EDIT_SOURCE,
};
#define URL_SIZE 4000;
#include "..\TWB\TWB.c"
#include "show_src.h"
char editURL[sizeof(URL)];
char URL[URL_SIZE];
char editURL[URL_SIZE];
int mouse_twb;
edit_box address_box = {250,60,30,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,sizeof(URL),#editURL,#mouse_twb,2,19,19};
edit_box address_box = {250,60,30,0xffffff,0x94AECE,0xffffff,0xffffff,0x10000000,URL_SIZE-2,#editURL,#mouse_twb,2,19,19};
#define SKIN_Y 24
@@ -179,15 +182,14 @@ void EventGoToPage()
void SetPageDefaults()
{
strcpy(#header, #version);
strncpy(#header, #version, sizeof(header)-1);
WB1.list.count = WB1.list.first = 0;
cur_encoding = CH_NULL;
if (o_bufpointer) o_bufpointer = free(o_bufpointer);
}
void OpenPage()
{
char getUrl[sizeof(URL)];
char getUrl[URL_SIZE];
strcpy(#editURL, #URL);
history.add(#URL);
if (!strncmp(#URL,"CodeView:",8))
@@ -236,7 +238,7 @@ void ShowPage()
{
DrawEditBoxWebView();
if (!bufsize) LoadInternalPage(#page_not_found, sizeof(page_not_found));
WB1.Prepare();
WB1.ParseHtml();
}
void DrawStatusBar() {return;};