1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-06 23:44:43 -04:00
Commit Graph

350 Commits

Author SHA1 Message Date
Witold Filipczyk
3d96b0d7d7 Revert "Compile with C++."
This reverts commit 4f4df33638.
2019-04-21 12:27:40 +02:00
Witold Filipczyk
4f4df33638 Compile with C++.
Weak points:
- alignof
- js problems

Todo:
- make js work with C++ and mozjs-17
- then mozjs-24
- then mozjs-52
- then mozjs-60
- decrease number of warnings
2019-02-17 20:46:16 +01:00
أحمد المحمودي (Ahmed El-Mahmoudy)
dbab898f38 Fix spelling mistakes 2019-01-14 04:51:10 +01:00
Witold Filipczyk
6dfdd36398 form_control -> el_form_control 2018-09-09 19:18:53 +02:00
Witold Filipczyk
d8be2c505e Rename struct box to struct el_box.
In the future I want to copy some code from netsurf, so I'm preparing.
2018-09-09 19:14:56 +02:00
Witold Filipczyk
3b279e5ec6 No warning 2018-03-10 10:36:25 +01:00
rkd77
d539a45c98
Merge pull request #3 from aelmahmoudy/color_link_num
Allow link number colors to be changed.
2017-11-26 10:58:04 +01:00
Witold Filipczyk
48ba074969 mem_free_set instead two lines 2017-11-23 10:33:10 +01:00
rkd77
be719e1ac1
Merge pull request #10 from aelmahmoudy/select_forms
Make select forms look more like other forms.
2017-11-22 12:02:06 +01:00
rkd77
77ea5759ed
Merge pull request #9 from aelmahmoudy/preferred_document_width_option
Add preferred_document_width option.
2017-11-22 11:59:17 +01:00
rkd77
addd051c97
Merge pull request #6 from aelmahmoudy/dont_underline_unselected_forms
Dont underline unselected forms
2017-11-22 11:54:50 +01:00
rkd77
2b786ac7fe
Merge pull request #2 from aelmahmoudy/underline_links
Underline links even in numbered links mode
2017-11-22 11:42:02 +01:00
Nils Dagsson Moskopp
aae79c95fe Add rendering for html source element 2017-11-22 03:19:33 +01:00
Yozo Hida
49988d305f Do not underline forms (unless selected). 2017-11-22 01:16:50 +01:00
Yozo Hida
948d019fc0 Add preferred_document_width option.
Option document.browse.preferred_document_width controls the
width of the document, so that documents are rendered with narrower
width than screen width.  Makes it easier to read paragraphs.

Patch originally from Shalon Wood <dstar@pele.cx>, see bug #1063.

Instead of using max_document_width as the hard limit to the document
width, it uses a soft limit, where if the document does not fit (due to
tables, etc.), then larger width is used.  This reduces the need for
horizontal scrolling for wide documents.

Also added toggle-document-width action to toggle between preferred
width and full screen width.  This is bound to 'M' by default.  Initial
toggle status is determined by document.browse.use_preferred_document_width
option.

During dumps, document.dump.width option is still used.  Perhaps we
should consolidate document.dump.width option with
document.browse.preferred_document_width ?
2017-11-21 16:09:13 +01:00
Yozo Hida
7e58737619 Make select forms look more like other forms.
Insert "[_" and "_]" as part of the form link, and
include it as part of the link.
2017-11-21 16:06:33 +01:00
Yozo Hida
a4d8f25a9c Allow link number colors to be changed.
These settings are specified by

  document.colors.link_number
  document.colors.use_link_number_color

The latter setting determines whether the color is used when document
colors are being used.

See bug #1050.
2017-11-21 15:56:32 +01:00
Yozo Hida
468e7aaff9 Underline links even in numbered links mode 2017-11-21 15:50:23 +01:00
Marco Migliori
5e31308da0 text direction mark 2017-05-16 20:57:25 +02:00
Witold Filipczyk
257422f28c Reorganisation of code to make C++ happy 2016-04-20 22:21:31 +02:00
Witold Filipczyk
da15322705 Cast to (const char *) in strrchr calls 2016-04-20 21:03:27 +02:00
Witold Filipczyk
96e65c105f Explicit cast in strstr for C++ 2016-04-20 20:46:33 +02:00
Witold Filipczyk
1b06539694 Explicit cast to (const char *) in strcasestr for C++ 2016-04-20 20:11:08 +02:00
Witold Filipczyk
52d6f37c8e Explicit cast to (const char *) for strchr function (C++) 2016-04-20 19:43:37 +02:00
Witold Filipczyk
67673f5fe5 new -> new_ for C++ compatibility 2016-04-20 18:42:22 +02:00
Witold Filipczyk
f4981bb553 class -> class_ for C++ compatibility 2016-04-20 18:18:27 +02:00
Witold Filipczyk
2e721e051a template -> template_ for C++ compatibility 2016-04-20 18:05:00 +02:00
Fabienne Ducroquet
13f3da8416 Improve isolated combining characters handling
If there are isolated combining characters, e.g. at the beginning of a paragraph
or table cell:
– if it’s not the first screen column, combine them with whatever character is
printed to their left;
– otherwise, add a no-break space as the base character.

Previously, such combining characters were combined with the last letter
displayed, i.e. the last letter of the previous paragraph or cell.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2016-04-12 21:59:50 +02:00
Fabienne Ducroquet
a43ec1075c Display combining characters at the end of the current string in set_hline
without waiting for the next non zero width character. This way combining
characters at the end of the document are displayed.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2016-04-12 21:58:54 +02:00
Fabienne Ducroquet
c1140f54c4 Compute correct number of cells with CONFIG_COMBINE
Otherwise, there are unnecessary spaces at the end of lines in tables containing
combining characters.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2016-04-12 21:41:53 +02:00
Fabienne Ducroquet
ec30a09a36 Bug 1139: Fix internal error: "bad split" with CONFIG_COMBINE
A combining character sequence where the base character is a space remained
recorded as a space although the initial space was replaced with an internal
code corresponding to the combined character. This caused an internal error when
ELinks tried to split the line at that place and did not find the space.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2016-04-12 21:41:49 +02:00
Witold Filipczyk
4efea7e314 Added support for label_key in references of dumps.
Added base parameter to dec2qwerty and qwerty2dec to avoid strlen calls
im dumps.
2016-02-07 11:51:17 +01:00
Witold Filipczyk
69986f1bd1 Multiplication instead of pow calls and minor style changes. 2016-01-31 12:38:18 +01:00
Martin Miller
28b7bd1ec2 Transfer changes for ascii link labeling 2016-01-31 10:23:08 +01:00
Witold Filipczyk
c84dfd7e18 mem_free_if where aplicable. Initialised memory in encoding/* 2015-05-10 17:27:55 +02:00
Witold Filipczyk
ca4d770c0b Revert "Apply styles of html element for body element."
This reverts commit 5f9b54f594.
2015-05-09 22:11:13 +02:00
Witold Filipczyk
46767f6bf0 Introduced the document.browse.show_refresh_link option.
Whether to show Refresh: link line. Default 1.
2015-01-02 14:53:18 +01:00
Fabienne Ducroquet
ad7ff0386d Changes in the handling of the format flags for list elements
* Rename P_STAR as P_DISC and P_PLUS as P_SQUARE.

* Delete P_NONE because it was used only as the default flag in init_html_parser
  and a list with P_NONE then got bullets, so instead use P_DISC by default (as
  per the CSS specification), and P_NO_BULLET for lists with no bullets.

* Use as bullets the characters:
  - U+25E6 WHITE BULLET for the circle style;
  - U+25AA BLACK SMALL SQUARE (alias square bullet) for the square style;
  - U+2022 BULLET for the disc style (default).

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2013-09-07 10:51:54 +02:00
Kalle Olavi Niemitalo
87eac68dc3 Fix "parameter has incomplete type" on GCC 3.4.6
Fix this GCC 3.4.6 warning, which becomes an error
if configure --enable-debug adds -Werror to CFLAGS:

      [CC]   src/document/css/apply.o
In file included from /home/Kalle/src/elinks-0.12/src/document/html/internal.h:6,
                 from /home/Kalle/src/elinks-0.12/src/document/css/apply.c:35:
/home/Kalle/src/elinks-0.12/src/document/html/parser.h:149: warning: parameter has incomplete type
In file included from /home/Kalle/src/elinks-0.12/src/document/css/apply.c:35:
/home/Kalle/src/elinks-0.12/src/document/html/internal.h:125: warning: parameter has incomplete type

Even without this warning, "enum html_special_type;"
would not be standard C89.
(cherry picked from elinks-0.12 commit c9f487cdf4)

Conflicts:
	src/document/html/parser.h: 0.13.GIT had more #includes already.
2012-11-03 22:16:23 +02:00
witekfl
88be88c819 Revert "Show the URI in the title bar even if document title is set."
This reverts commit d06cccffd6.

Some people wants URL in the title bar, but some wants the title.
I restored previous version (the title). If you want the URL, create
the patch with a configurable option.
2012-09-02 19:19:02 +02:00
witekfl
4ec188d75e When shifting characters (for example with ALIGN_CENTER) set
colors of the empty area to the color of the first char of the centered
text. Previously it was set to the default background.
2012-07-11 11:17:24 +02:00
witekfl
aead2de59a Do not treat <li> specially and handle </li>. See test/ul_a_li.html. 2012-06-12 14:31:55 +02:00
witekfl
5f9b54f594 Apply styles of html element for body element.
See test/css/css_body.html and test/css/css_html.html
2012-05-22 15:22:48 +02:00
Miciah Dashiel Butler Masters
0189b6bfc9 Add support & test for the CSS list-style property
Recognise the list-style property and apply it by setting the
appropriate flag on the element's parattr based on the property's value.

Add test/list-style.html with an example of each possible list-style
value (many are unsupported by the HTML engine).
2011-11-14 04:34:50 +00:00
witekfl
d06cccffd6 Show the URI in the title bar even if document title is set.
ECMAcript's window.title overrides this.
2011-10-18 20:57:32 +02:00
Kalle Olavi Niemitalo
e22eae2e93 HTML: Rewrite parsing of meta refresh
The URL in <meta http-equiv="Refresh" content="42; URL=target.html">
can now freely contain spaces and semicolons.  There cannot be other
parameters between the delay and the URL.  If the URL is not quoted,
then it spans to the end of the attribute, except not to trailing
spaces.  If the URL is quoted, then it ends at the first closing
quotation mark.  All this is consistent with Debian Iceweasel 3.5.16.
2011-05-01 22:59:23 +03:00
Kalle Olavi Niemitalo
715571a5d6 HTML bug 1114: Don't doubly decode entities in attributes
The HTML parser decoded SGML entity references and numeric character
references in the following attributes, and then the renderer did the
same again:

link/@title
link/@hreflang
link/@type
link/@media
img/@alt
area/@alt
input[@type="image"]/@alt
input[@type="image"]/@name
input[@type="button"]/@value

The result was that e.g. title="&amp;#65;" displayed as "A"
even though it was supposed to display as "&#65;".

Fix by making the HTML parser tell the renderer that the entities have
already been decoded.
2011-05-01 22:54:45 +03:00
Witold Filipczyk
cbf70d5304 Refactoring: use struct string instead of unsigned char.
It probably doesn't make sense, but there is one warning less on OpenBSD.
2010-09-19 13:56:54 +02:00
Witold Filipczyk
d112adc8f3 include libgen.h for basename 2010-09-19 13:01:42 +02:00
Witold Filipczyk
79340fa4ac Better looking symbols for LI elements. 2010-08-11 21:22:21 +02:00