Permalink
Browse files

Reorganized web page attribute data handling.

- Up to now the web browser used several fixed size arrays to hold the various types attribute data of the web page. This turned out to be way to inflexible for any non-trivial web page. Therefore now all attribute data is stored in a single buffer one after the other as they arrive from the parser only occupying the memory actually needed. This allows for pages with many links with rather short URLs as well as pages with few link with long URLs as well as pages with several simple forms as well as pages with one form with many form inputs.

- Using the actual web page buffer to hold the text buffers of text entry fields was in general a cool idea but in reality it  is often necessary to enter text longer than the size of the text entry field. Therefore the text buffer is now stored in the new unified attribute data buffer.

- Splitting up the process of canonicalizing a link URL and actually navigating to the resulting URL allowed to get rid of the 'tmpurl' buffer used during form submit. Now the form action is canonicalized like a usual link, then the form input name/value pairs are written right into the 'url' buffer and afterwards the navigation is triggered.

- Support for the 'render states' was completely removed. The only actually supported render state was centered output. The new unified attribute buffer would have complicated enumerating all widgets added to the page in order to adjust their position. Therefore I decided to drop the whole feature as the <center> tag is barely used anymore and newer center attributes are to hard to parse.
  • Loading branch information...
Oliver Schmidt
Oliver Schmidt committed Mar 6, 2013
1 parent cdb16c0 commit c7b8bac0065f1292ecd1701fc7e2bbb121556f5e
@@ -1,5 +1,4 @@
html_slasha "/a\0"
html_slashcenter "/center\0"
html_slashdiv "/div\0"
html_slashform "/form\0"
html_slashh "/h\0"
@@ -9,7 +8,6 @@ html_slashstyle "/style\0"
html_a "a\0"
html_body "body\0"
html_br "br\0"
html_center "center\0"
html_form "form\0"
html_frame "frame\0"
html_h1 "h1\0"
@@ -1,9 +1,6 @@
const char html_slasha[4] =
/* "/a\0" */
{0x2f, 0x61, 00, };
const char html_slashcenter[9] =
/* "/center\0" */
{0x2f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 00, };
const char html_slashdiv[6] =
/* "/div\0" */
{0x2f, 0x64, 0x69, 0x76, 00, };
@@ -31,9 +28,6 @@ const char html_body[6] =
const char html_br[4] =
/* "br\0" */
{0x62, 0x72, 00, };
const char html_center[8] =
/* "center\0" */
{0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 00, };
const char html_form[6] =
/* "form\0" */
{0x66, 0x6f, 0x72, 0x6d, 00, };
@@ -1,5 +1,4 @@
extern const char html_slasha[4];
extern const char html_slashcenter[9];
extern const char html_slashdiv[6];
extern const char html_slashform[7];
extern const char html_slashh[4];
@@ -9,7 +8,6 @@ extern const char html_slashstyle[8];
extern const char html_a[3];
extern const char html_body[6];
extern const char html_br[4];
extern const char html_center[8];
extern const char html_form[6];
extern const char html_frame[7];
extern const char html_h1[4];
Oops, something went wrong.

0 comments on commit c7b8bac

Please sign in to comment.