Homework 5: Web browser, part 2

Processing HTML

HTML (HyperText Markup Language) is the language used to define the appearance of a web page. The primary task of a browser is to render a document that corresponds to the downloaded HTML instructions. An HTML document contains tags that are interspersed with regular text. To process an HTML document, we can proceed as follows:
  1. Separate the text into tag and non-tag elements.
  2. Determine the properties of each tag.
  3. Render the doucment by iterating through the processed text from start to finish:

Tag Structure

The following tags should be supported:

Additional Text Processing

Buttons

Your browser should implement the proper behavior for the Forward, Back, Home, Stop, and Reload buttons. Store pages visited in the current session in an appropriate data structure. The Forward and Back buttons will then access this data structure in order to perform their work.

Augument the user interface to enable the user to set the home page. At your option, you may also allow the user to tell the browser to always load this page when it starts up. Also augment the user interface to enable the user to view the HTML source for a given page.

Hyperlinks

All hyperlinks should be visually differentiated from the surrounding text. Clicking on a hyperlink with the mouse should load the hyperlinked page. Relative hyperlinks should be handled properly. Also, clicking on a hyperlink in the link window for the page should also work.

URL Bar

The user should be able to enter a URL in the URL bar. When the user performs an appropriate action, the URL in the URL bar should be loaded into the browser.

Threading

Create a thread that will be responsible for the network communication. At your discretion, the thread can also handle parsing and rendering.

Deadlines

For Friday, 10/23: For Monday, 10/26: EXTENDED DEADLINE For Friday, 10/30: For Monday, 11/2: