Rev 8451 | Rev 8457 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8451 | Rev 8454 | ||
---|---|---|---|
Line 28... | Line 28... | ||
28 | if (tag.is("del")) { style.s = tag.opened; return; } |
28 | if (tag.is("del")) { style.s = tag.opened; return; } |
29 | if (tag.is("pre")) { style.pre = tag.opened; return; } |
29 | if (tag.is("pre")) { style.pre = tag.opened; return; } |
30 | if (tag.is("blockquote")) { style.blq = tag.opened; return; } |
30 | if (tag.is("blockquote")) { style.blq = tag.opened; return; } |
31 | if (tag.is("dl")) { if (tag.opened) NewLine(); return; } |
31 | if (tag.is("dl")) { if (tag.opened) NewLine(); return; } |
32 | if (tag.is("tr")) { if (tag.opened) NewLine(); return; } |
32 | if (tag.is("tr")) { if (tag.opened) NewLine(); return; } |
33 | if (tag.is("td")) { if (tag.opened) AddCharToTheLine(' '); return; } |
33 | if (tag.is("td")) { /*if (tag.opened) AddCharToTheLine(' ');*/ return; } |
34 | if (tag.is("button")) { style.button = tag.opened; stolbec++; return; } |
34 | if (tag.is("button")) { style.button = tag.opened; stolbec++; return; } |
35 | if (tag.is("w:r")) { if (!tag.opened) style.b = false; return; } |
35 | if (tag.is("w:r")) { if (!tag.opened) style.b = false; return; } |
36 | if (tag.is("h1")) { tag_h1234_caption(); return; } |
36 | if (tag.is("h1")) { tag_h1234_caption(); return; } |
37 | if (tag.is("h2")) { tag_h1234_caption(); return; } |
37 | if (tag.is("h2")) { tag_h1234_caption(); return; } |
38 | if (tag.is("h3")) { tag_h1234_caption(); return; } |
38 | if (tag.is("h3")) { tag_h1234_caption(); return; } |
Line 52... | Line 52... | ||
52 | if (tag.is("title")) { tag_title(); return; } |
52 | if (tag.is("title")) { tag_title(); return; } |
53 | if (tag.is("body")) { tag_body(); return; } |
53 | if (tag.is("body")) { tag_body(); return; } |
54 | if (tag.is("html")) { t_html = tag.opened; return; } |
54 | if (tag.is("html")) { t_html = tag.opened; return; } |
55 | if (tag.is("dd")) { |
55 | if (tag.is("dd")) { |
56 | //NewLine(); |
56 | //NewLine(); |
57 | //if (tag.opened) stolbec += 5; //stolbec overflow! |
57 | //if (tag.opened) stolbec += 5; //may overflow! |
58 | return; |
58 | return; |
59 | } |
59 | } |
60 | } |
60 | } |
Line 61... | Line 61... | ||
61 | 61 | ||
Line 263... | Line 263... | ||
263 | char img_path[4096]=0; |
263 | char img_path[4096]=0; |
264 | dword imgbuf[44]; |
264 | dword imgbuf[44]; |
265 | dword cur_img; |
265 | dword cur_img; |
266 | int img_x, img_y, img_w, img_h; |
266 | int img_x, img_y, img_w, img_h; |
Line -... | Line 267... | ||
- | 267 | ||
- | 268 | if (!tag.get_value_of("data-large-image")) |
|
267 | 269 | if (!tag.get_value_of("data-src")) |
|
Line 268... | Line 270... | ||
268 | if (!tag.get_value_of("src")) return; |
270 | if (!tag.get_value_of("src")) return; |
269 | 271 | ||
270 | if (streqrp(tag.value, "data:")) { |
272 | if (streqrp(tag.value, "data:")) { |
Line 279... | Line 281... | ||
279 | $pop eax |
281 | $pop eax |
280 | if (EAX) goto IMGOK; else goto NOIMG; |
282 | if (EAX) goto IMGOK; else goto NOIMG; |
281 | } |
283 | } |
Line 282... | Line 284... | ||
282 | 284 | ||
- | 285 | if (!strcmp(tag.value + strrchr(tag.value, '.'), "svg")) goto NOIMG; |
|
- | 286 | if (!strcmp(tag.value + strrchr(tag.value, '.'), "webp")) goto NOIMG; |
|
283 | if (!strcmp(tag.value + strrchr(tag.value, '.'), "svg")) goto NOIMG; |
287 | |
284 | strlcpy(#img_path, tag.value, sizeof(img_path)-1); |
288 | strlcpy(#img_path, tag.value, sizeof(img_path)-1); |
Line 285... | Line 289... | ||
285 | get_absolute_url(#img_path, history.current()); |
289 | get_absolute_url(#img_path, history.current()); |
286 | 290 | ||
Line 300... | Line 304... | ||
300 | IMGOK: |
304 | IMGOK: |
301 | cur_img = EAX; |
305 | cur_img = EAX; |
302 | img_h = ESDWORD[cur_img+8]; |
306 | img_h = ESDWORD[cur_img+8]; |
303 | img_w = ESDWORD[cur_img+4]; |
307 | img_w = ESDWORD[cur_img+4]; |
Line 304... | Line 308... | ||
304 | 308 | ||
305 | if (img_w / 6 + stolbec > list.column_max) { |
309 | if (img_w / 8 + stolbec > list.column_max) { |
306 | NewLine(); |
310 | NewLine(); |
307 | } |
311 | } |
308 | img_x = stolbec*list.font_w+3; |
312 | img_x = stolbec*list.font_w + 3; |
Line -... | Line 313... | ||
- | 313 | img_y = draw_y; |
|
- | 314 | ||
309 | img_y = draw_y; |
315 | if (img_h < list.item_h) img_y += list.item_h - img_h / 2 - 1; else img_y -= 2; |
Line 310... | Line 316... | ||
310 | 316 | ||
Line 311... | Line 317... | ||
311 | img_w = math.min(img_w, canvas.bufw - img_x); |
317 | img_w = math.min(img_w, canvas.bufw - img_x); |
- | 318 | ||
- | 319 | style.cur_line_h = math.max(list.item_h, img_h); |
|
312 | 320 | ||
313 | style.cur_line_h = math.max(list.item_h, img_h); |
321 | stolbec += img_w / 8; |
314 | 322 | if (img_w % 8) stolbec++; |
|
Line 315... | Line 323... | ||
315 | stolbec += img_w / 6; |
323 |