forked from KolibriOS/kolibrios
WebView: omit lists inside <nav> tag for better readability
git-svn-id: svn://kolibrios.org@9302 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
0726cf15e7
commit
ba3c6816a1
@ -19,7 +19,8 @@ struct STYLE {
|
||||
pre,
|
||||
blq,
|
||||
button,
|
||||
image;
|
||||
image,
|
||||
nav, header;
|
||||
LIST tag_list;
|
||||
dword title;
|
||||
dword cur_line_h;
|
||||
@ -28,8 +29,8 @@ struct STYLE {
|
||||
|
||||
void STYLE::reset()
|
||||
{
|
||||
b = u = s = h = blq = pre = title = false;
|
||||
font = false;
|
||||
b = u = s = h = font = pre = blq =
|
||||
title = button = image = nav = header = false;
|
||||
cur_line_h = NULL;
|
||||
tag_list.reset();
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ void TWebBrowser::SetStyle()
|
||||
if (tag.is("img")) { tag_img(); return; }
|
||||
if (tag.is("div")) { tag_div(); return; }
|
||||
if (tag.is("br")) { /*draw_x++;*/NewLine(); return; }
|
||||
if (tag.is("nav")) { style.nav = tag.opened; return; }
|
||||
if (tag.is("header")) { NewLine(); return; }
|
||||
if (tag.is("article")) { NewLine(); return; }
|
||||
if (tag.is("footer")) { NewLine(); return; }
|
||||
@ -177,6 +178,7 @@ void TWebBrowser::tag_ol_ul_dt()
|
||||
break;
|
||||
case 'u':
|
||||
case 'o':
|
||||
if (style.nav) && (style.tag_list.level) NewLine();
|
||||
style.tag_list.upd_level(tag.opened, type);
|
||||
if (!tag.opened) && (!style.pre) NewLine();
|
||||
}
|
||||
@ -184,6 +186,7 @@ void TWebBrowser::tag_ol_ul_dt()
|
||||
|
||||
void TWebBrowser::tag_li()
|
||||
{
|
||||
if (style.nav) return;
|
||||
if (tag.opened) {
|
||||
if (!style.tag_list.level) style.tag_list.upd_level(1, 'u');
|
||||
if (!style.pre) NewLine();
|
||||
|
@ -107,4 +107,4 @@ char editbox_icons[] = FROM "res/editbox_icons.raw";
|
||||
|
||||
#define DEFAULT_URL URL_SERVICE_HOMEPAGE
|
||||
|
||||
char version[]="WebView 3.61";
|
||||
char version[]="WebView 3.62";
|
Loading…
Reference in New Issue
Block a user