1. 20 Mar, 1998 1 commit
    • Andrew Hodgkinson's avatar
      Programming warehouse link removed from all hotlists - the page has gone. · 76dfaa46
      Andrew Hodgkinson authored
      Some compile-time hacks in place to use MemLib, a dynamic area based
      malloc replacement which shrinks its heap when possible. All builds
      have these switched off at the moment. Seemed to work with just Browse,
      though there would be problems with message blocks stored in dynamic
      areas because of the Wimp's '&3800000' check - however, it failed when
      HTMLLib was made to use it, too. Don't know why yet.
      
      ItemInfo.[c/h] source added, with Res file additions for testbed Browse
      and Phoenix.
      
      Small fetch windows now work properly regardless of toolbar settings
      in the Choices.
      
      Reload now reloads all images too, rather than only reloading them for
      as long as the main page was being fetched.
      
      Added a simple 'Find' facility.
      
      Realised that event handlers in eventlib are called in reverse order
      of registration, so the miscellaneous event handler is now registered
      first rather than last.
      
      Multiuser code added (most only active if SINGLE_USER is undefined). As
      part of this, hotlist code now knows about read-only items (done for the
      Customer-style 'Resources' file, but works generally anyway).
      handle_add_hotlist doesn't try to save the hotlist itself anymore (the
      hotlist_add function does all that through hotlist_modified anyway).
      
      Customer build Choices and Controls updated slightly (e.g. ClaimHelp
      off, hotlist to save on quit only).
      
      Customer build now uses Phoenix-style buttons. Sprites files which
      worked at the time (but will probably be out of date now) and included
      most of the original Customer-style sprites are in
      'Utils.Icons.Customer'.
      
      Choices, Messages and Res files for all builds now stripped down to only
      single user items or single plus multiuser for Customer build and testbed
      build. Before, all contained a few multiuser bits in at least the Choices
      file if not more.
      
      Grammatical error ("Fetching frames contents" (sic.)) corrected in
      default message, Toolbars.c, and all of the Messages files.
      
      Customer build brought back to a servicable level (including
      implementation of the Find dialogue box with animation and fixing
      up authorisation and 'Stop' state in the tristate). Quite a few
      missing #ifndef REMOTE_HOTLIST bits from hotlist code added...
      
      Customer build will not use <Choices$Write> or Boot:Choices for any
      file finding now. UseProxy defaults to 'yes', MaxImages to 2. Res
      file includes Proxy Address setting (save_save_choices() now writes
      the ProxyAddress line).
      76dfaa46
  2. 13 Feb, 1998 1 commit
    • Andrew Hodgkinson's avatar
      RefoSingle option added to Controls. · 8d7d65dd
      Andrew Hodgkinson authored
      Precautions taken in table code to avoid divide by zero errors.
      
      Framesets defining more frames than the frameset implies, for whatever
      reason, should never cause a crash now - just report a 'Frames definition
      is badly nested' error (if STRICT_PARSER defined). Along the same lines,
      in a single document defining a set of nested frames, two /FRAMESETs in
      succession could cause a fairly nasty crash. Fixed.
      
      TIFFs do not get loaded by double-click now.
      
      If holding down SHIFT to save a link contents to disc, you can also hold
      down CTRL to bypass the cache (sets the browser's reloading flag). Noticed
      when testing this that windows_create_browser didn't take account of the
      Controls file 'UseSmall' entry when adjust-shift-clicking on links. It
      does now.
      
      There is now a complete and up to date set of interactive help messages
      built into the Ursula, Customer and Phoenix build Res files.
      8d7d65dd
  3. 06 Feb, 1998 1 commit
    • Andrew Hodgkinson's avatar
      *Don't* try to load FilterManager 0.18 in !Run[D] files. Requires · 4c272928
      Andrew Hodgkinson authored
      WindowManager 3.98. Sets URI handler environment variables for
      http, ftp and gopher.
      
      Fixed 'doesn't reformat for unsized images' bug - only happens when the
      deferred reformatter is enabled, hadn't remembered to check this in my
      debug build where this is turned off. Oops.
      
      Caret position in forms could get left behind despite attempts to rectify
      this in v1.31 - now fixed (and faster, fortunately).
      
      Hourglass + percentage displayed for History and Image History when
      loading - it can take a while for very big histories, though in
      practice you only see the visit history loading (has to do a lot
      more work, and is thus quite a bit slower than the image history).
      
      POST forms worked when targetted to frames, but were broken when
      not targetted! (Forms data inherited from one browser to the same
      browser; ended up freeing the flex block...). Fixed.
      
      Now support 303 response code (redirect to GET). Treated as 301, i.e.
      not support if STRICT_PARSER is defined, otherwise drops through to
      the 302 handling code.
      
      Pointer shouldn't get stuck in odd shapes when going to a new page now;
      it gets reset to a standard shape every time the null handler that
      checks the position is called, though (whether or not the handler thinks
      the pointer is over a different token, if that token is NULL, it sets
      the standard shape). A possible work around would be for a browser to
      remember the pointer shape too; that's for the future, though.
      
      Early stage table formatting functions could blow themselves apart if
      tables_count_table decided there were no rows, columns or both. A
      net table size of zero cells is now dealt with; slow, partial table
      fetches in multiple windows with image loading turned on will now
      *hopefully* be stable, where v1.31 would have bombed out repeatedly.
      
      A nested frameset within one document will now inherit the border
      width (frame spacing) and border colour of its parent. This is done
      by copying the maxlen and indent fields of the parent token over
      the child, and note it's done in the browser (fetch_preprocess_token),
      not HTMLLib.
      
      Border colour on a FRAMESET now used, with the first colour on any
      FRAME within it overriding, as in NN 4 and MSIE 4.
      
      <LI> bullets really do stick to the text next to them now (I'd done
      that in an experimental piece of code and forgotten to merge it back
      before the last check-in).
      
      Browse$HotlistURL/URIFile and Browse$HomeURL/URIFile now work from
      _TaskName in the Messages file, and are thus of the generic form
      <App>$HotlistURL etc. - Docs.Notes and Docs.User updated appropriately.
      
      Event 0x11d00 through to 0x11d7f will make the browser look up Controls
      file entries 'JumpTo00' through to 'JumpTo7f' and read a URL from them.
      This will be fetched in the ancestor window of the source of the event,
      or a new window if such an ancestor can't be found [for Daytona demo].
      
      NB: Nasty frames-related crash at http://www.teledanmark.dk/menu/start.htm
      is *not* fixed in this source. NOBR is not supported.
      4c272928
  4. 31 Jan, 1998 1 commit
    • Andrew Hodgkinson's avatar
      Check for WindowManager 3.97 and ensure Unicode$Path is set in all !Run[D]... · ebd74985
      Andrew Hodgkinson authored
      Check for WindowManager 3.97 and ensure Unicode$Path is set in all !Run[D] files, don't set the Alias$@PrintType_FF4 variable, and updated
      
      Customer build ROM obey file variants. Various other changes to
      the Run files for new module versions, updated paths to support
      new positions of choices, hotlist and histories (see later), etc.
      
      !Sprites[22] files hold small !app icons for some variants, and
      an ic_browse sprite. Some variants now have a Sprites and Sprites22
      file instead of just Sprites, with the former containing various
      mode 12 or 15 specific sprites.
      
      Text files dragged to the URL writable are treated as ANT URL files. This
      relies on URLBarWrit (Toolbars.h) being a unique ID, which it should be,
      but beware of the Hotlist and Choices numberspaces...
      
      INPUT TYPE=BUTTON supported. Form items without a FORM tag are now shown
      (as MSIE 4, but not NN 4).
      
      '*', '-', '@', '_' and '.' are not escaped when submitting forms now. The
      Web interface to the IMDb now works.
      
      INPUT TYPE=HIDDEN items will not affect the line height anymore - so
      http://www.hotmail.com/ now has correctly aligned writable icons, for
      example. Similarly, TAG_FORM and TAG_FORM_END items could push up
      line height and don't anymore.
      
      HRs with a specified pixel width will now influence the size of a table
      cell (they didn't before).
      
      BRs now checked by tagno field when the browser needs to know something
      was an actual BR tag rather than just a line break signal, and by the
      style bit entry when only the indication of a line break is required.
      
      Table widths of 0 or 0% are ignored.
      
      Trace.c updated to report height and background fields in a table_stream.
      
      fm_putsl() writes a terminator into the string; the Forms.c routines were
      calling this for displaying INPUT TYPE=PASSWORD fields using the FE_PassCode
      literal string (a line of stars). This write into a read only data area
      would make the debugger fault the access. A local char array is now used
      instead, to get round this (note the use of var[]=literal rather than
      var[sizeof(literal)]; strcpy(var, literal) due to some weird compiler bug
      that copies the wrong thing into 'var' under some (undefined...)
      circumstances).
      
      Text areas don't scroll back to the top line when clicked in anymore;
      single line writables don't scroll back to the left either. When
      reentering a text area from 'above', the caret appears at the top line
      rather than 'somewhere further down'...
      
      ARROWS_MOVE_OUT compile time option at the top of Forms.c defines whether
      you must press Tab/Shift+Tab to move between writable fields in forms or
      if up/down will drop out of them, though if keyboard control is on this
      is enforced (or you get trapped inside the form!).
      
      urlutils_filetype_from_url now uses MimeMap module.
      
      If fetcher is told a page is text, it'll check for a filename extension and
      may choose to use this instead (e.g. it may find it's HTML instead). This
      is to try and get around duff servers... (e.g. http://www.batalarms.co.uk/).
      
      Save dialogues shouldn't flicker when options that don't change the
      filetype are selected (before, the draggable sprite was always reset for
      each selection). Noticed the erroneous setting of a static variable in
      SaveFile.c by a call to this by SaveObject.c, and so added a flag to
      savefile_set_filetype to deal with this - would have been possible to get
      the wrong filetype sent to applications or at best the wrong filetype
      sprite in the dialogue without that.
      
      The caret shouldn't jump out of a form back to the URL writable if the page
      reformats now.
      
      Table background colours now supported (as in the colour you see in the
      border space if the cellspacing is large enough; this is as in MSIE, not
      as in Navigator). Drawfile output routines updated accordingly.
      
      Corrected erroneous use of wimpt_dx() / wimpt_dy() in a couple of places
      in Images.c, which meant that (say) 1x1 images didn't work correctly in
      medium resolution display modes.
      
      Now have support for save as text (component ID and event 0x12) and save
      as Draw (component ID and event 0x13) buttons. Dubious conditions for
      greying and ungreying the print, save source and view source buttons and
      menu options sorted out as part of implementing the same for the two new
      buttons; added greying out of their associated menu items in passing.
      
      Turned kerning on in draw file objects (does mean a rather heinous
      increase in file size, but this is the only way to ensure the draw file
      matches the visible page).
      
      Comments before functions in SaveDraw.c are now complete and up to date.
      
      Image and visit histories now generate a crude hash number to speed up
      searching for items. It does give a speed increase, though it's a
      disappointingly small one.
      
      Issue of left/right margins and cellpaddings sorted out. Now have
      redraw_left/right_margin for finding out the basic gap you must leave.
      redraw_left/right_gap then gives any extra indentation for LI, BLOCKQUOTE
      or whatever. The last two can be subtracted from the display width to
      get an available page width for any section of text. Note that
      redraw_left_gap replaces redraw_margin. The redraw_start_x function
      uses the above to work out where a line's left hand edge should be,
      taking account of left/right/centre alignment. HRs have been fixed now
      (they were quite broken in v1.30, I think) based on this new model and
      the behaviour of MSIE/NN 4.
      
      Fixed width of cells with no contents - cell padding values wouldn't
      have worked properly as the reformatter returns 0 rather than the left
      hand margin size if given no stream.
      
      Removed FM_Absolute flags for Font_Paint (spotted by DBrown) - sets bit
      2, which is reserved...?
      
      IMG width and height in % terms now works correctly; a % of available
      width (after margins and indents) or height on the main page or for
      a table cell, if the image lies in one. Because of the chicken-and-egg
      problem with the latter, the cell must specify a width and/or height
      for things to work properly. If this is not done, you'll usually end
      up with a 1:1 scaled image (as in Navigator 4, rather than ending up
      with no image or even no cell (!), as in MSIE 4).
      
      HEIGHT attribute on a TABLE tag is supported, but only in a crude
      fashion; the extra height (if there is any) is distributed over the
      rows in a linear fashion. This is probably all you have to do in
      practice, but I haven't checked. To maintain a notion of min/max
      height as well as width would of course require a great deal more
      work...
      
      If using client pull to reload a page with a fragment ('...#name')
      specified, then the reload wouldn't work on the same page; it'd just
      jump to the fragment position. This won't happen if b->reloading is
      set now (so works in conjunction with client pull on the same page
      forcing a non-cached fetch). Similarly, if POSTing to such a URL,
      a fetch will proceed (both these fixes done originally for
      http://jupiter.beseen.com/chat/rooms/g/1678/).
      
      browser_inherit split to browser_inherit and browser_inherit_post_data;
      the code for the latter didn't clear any post_data in the child before
      copying from the parent either, and could cause flex errors (now fixed).
      
      Res file for Ursula ('Desktop' Browse) build tweaked - bits in the
      font choices dialogue renamed, and button bar rearranged to hold the
      new Save As Draw button. Other builds have had Save As Draw and
      Save As Text buttons added, or not, depending upon availability of
      suitable sprites, required UI simplicity, etc.
      
      Now have:
      
        Browse$ChoicesFile
        Browse$ControlsFile
        Browse$ChoicesSave
        Browse$ControlsSave
      
      (the last two are new) for loading and saving of the Choices or Controls
      files. If unset, <App$Dir>.Choices or <App$Dir>.Controls will be set.
      E.g., you could set Browse$ChoicesFile to be:
      
        <App$Dir>.Choices,Choices:WWW.(app).Choices
      
      for loading and
      
        <Choices$Write>.WWW.(app).Choices
      
      for saving. (The browser never saves Controls at the moment, so the
      relevant variable above isn't effectively implemented, but could be
      in future). Similarly, to support asymetric loading/saving of the Hotlist,
      there are HotlistSave, HistorySave and ImageHistorySave entries in Choices
      to complement HotlistPath, HistoryPath and ImageHistoryPath (which are used
      for loading). save_save_choices will create directories as needed to obtain
      the given path (and has also been fixed in various areas that hadn't been
      tested out until now; e.g. zero termination of the AppName$ChoicesFile
      variable expansion...). !Run[D] files updated appropriately.
      
      Table widthing code rewritten. Slower, but a lot better on the whole.
      Still has some problems - still needs a final 'make sure nothing is
      below minimum width' scan, which it should be possible to do without.
      No time to fix this at present!
      
      The reformatter will now 'glue together' an LI token followed by any
      non-LI token; so a bullet point followed by an item should not be able to
      have a line break inserted after the bullet because of very tight width
      constraints (it could before - yuk...).
      
      'about:' brings up a page about the browser and any Plug-Ins, as with
      Navigator (for example).
      
      URI files support titles, as per spec. version 8. Saving a current
      location to the Hotlist will thus give a sensible title now (unless
      you're in a frame, so there's no title to get...). Of course, v1.00
      files without a title still work.
      
      Note that NOBR is *not* supported in this build and this combined with
      the new table widther may cause problems on some sites (e.g. Microsoft's
      home page!).
      ebd74985
  5. 18 Dec, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Not all resources are up to date in this check-in, and documentation both... · 169c398a
      Andrew Hodgkinson authored
      Not all resources are up to date in this check-in, and documentation both within source and stuff in 'Docs' is out of date or missing - I was very pushed for time on this one... Hopefully will do another 'tidy up' check-in before close on Friday; until then, beware of anything other than the Ursula (Desktop browser) build. Anyway...
      
      Export As Draw done. As part of this, FONT SIZE and SUP / SUB adjustment
      of font size is done in fm_token_font_info rather than fm_find_token_font.
      
      Bullets and switches are plotted as indirected sprite items, rather than
      indirected text + sprite items - this relied on being in a redraw loop to
      pick the sprites up from the local pool (failed during printing).
      
      URI files now have a LF line ending rather than CR... '*' recognised
      as an empty field when loading via. RAM transfer now (only worked for
      loading from disc before).
      
      Gave placeholder bounding boxes 4 OS units more minimum extra gap
      vertically and reduced horizontal addition to this value * 1.5, rather
      than * 2 (see reformat_get_placeholder_size).
      
      Background image tiling starts at ymax - h + 4, rather than ymax, so
      there isn't the bottom line of pixels from the top tile always present
      at the top of the window. The '+4' is for caution's sake.
      
      Can now save a frame's HTML source, that of its parent or its ancestor,
      and the same for the URI pointing to those documents - see Menus.h for
      the relevant component IDs that should lead to the SaveFile dialogue.
      
      Have hopefully fixed timeout = 0 values (i.e. 'forever') on things
      like LinkTo; before, image fetches could override the state (so you'd
      only ever see brief flickers of a given URL as the pointer went over
      a link).
      
      Save File dialogue will remember the state of option or radio buttons
      for a given parent component origin and restore that state when the
      dialogue is next opened from the same place (stops turning on saving
      as a URL file also turning on 'save background images' for Draw file
      export, etc.).
      
      Use of a META tag to reload the *same* page now sets the 'reloading'
      flag in the browser so that it doesn't go through a proxy - otherwise
      pages which are meant to update periodically through client pull
      don't work, as they keep coming out of the cache.
      
      Can now handle images specifying just a width or height in the HTML
      (other dimension is scaled accordingly, but note that the placeholder
      size must still be 'dumb' until the image data comes in). An image
      will now override an image history size entry for the same entry
      with a different size.
      169c398a
  6. 12 Dec, 1997 1 commit
    • Andrew Hodgkinson's avatar
      There are a few known significant problems with this code but it's being... · b36c2bb4
      Andrew Hodgkinson authored
      There are a few known significant problems with this code but it's being checked in so the Choices can be worked on. Note that Res files etc. are not up to date across all builds. Progress is as follows...
      
      Bug report prompted me to do this - now ignore <p> tags straight after
      <li> tags, so '<ul><li><p>Some text' works as the author (or automatic
      generator, more commonly) intended.
      
      A <p> tag before a table will be acted upon now (it was ignored before).
      Something like <li><p><table...> will give a line break and paragraph
      space after the <li> despite the changes mentioned above, as in other browsers.
      Both browsers differ from Navigator, where the table appears alongside
      the <li> tag.
      
      Multiple BR tags work as in MSIE / Navigator (they don't collapse to
      zero height anymore).
      
      For the above, line height (and so, <br><br> or <p> spacing) is now
      calculated inside reformat_text_line_height, and is used with either
      a token to get the text height at a given size (e.g. for general line
      spacing or multiple BR tags) or NULL for normal size text (e.g. for
      P spacing, though this value is in practice later scaled by 7/8ths in
      reformat_check_height). Note this behaviour is exhibited by MSIE 4;
      v3 gave two BRs the same spacing as one P (i.e. not font size
      dependent).
      
      Save dialogues can have an option button or couple of radios to
      switch between various formats (e.g. URI or URL, sprite or original
      format). See 'Docs.Notes' for more. The back-end to this is now
      implemented (i.e. at the moment, save as URI or URL, save as original
      image format). Note that when saving background images, a leafname
      based on the original fetch URL is now offered rather than a generic
      'Background'.
      
      Internal URL scheme changed to be all lower case, so relativisation
      through URL_Fetcher still makes sense... :-/
      
      Holding down 'shift' when clicking on stop reverses the interpretation
      of the Controls file 'StopWebServe' entry.
      
      Fixed row / column count for exporting tables as text; fixed a few
      bits and pieces of internal URL scheme stuff which got broken when
      HTMLLib started using URL_Fetcher's relativisation.
      b36c2bb4
  7. 04 Dec, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Fixed some glitches in the modified status bar code (e.g. status inference... · dff9a8ae
      Andrew Hodgkinson authored
      Fixed some glitches in the modified status bar code (e.g. status inference wasn't working properly).
      
      Shift+Toggle size always opened to not obscure the icon bar. If CMOS is
      set to always show the icon bar, then Shift+Toggle size is meant to
      reverse sense and open to absolute full size. It now does this.
      
      !Run[D] files now require URL 0.22, HTTP 0.64, FTP 0.22, Gopher 0.08
      and File 0.32.
      
      Minor overhaul of 'Docs.Notes' (with 'Docs.User' similarly updated) to
      include a few new bits and pieces.
      
      Timeout values of 0 now mean 'forever'. Plug-in status messages now have
      their own timeout setting. New Messages token 'Actv' for extra info when
      a status message times out and the status line drops to 'Viewing' or
      'Ready' when there is still a Busy state registered by the Plug-in.
      
      Small Fetch windows don't become visible briefly for Plug-in fetches
      when the fetch is complete (for SeeFetches:no, where these windows
      should be hidden all the time).
      
      WebServe may be controlled through the Browse front-end via.
      Wimp_MAppControl reason code 4 (Wimp_MAppControl_Configure). Note the
      renaming internally of 'WebServ' or 'WebServe' has been changed to
      'Proxy' (with lower case equivalents where relevant); proxy name
      and starting details come from the Messages file 'ProxyName' and
      'ProxyComm' tokens. More in 'Docs.Notes'.
      
      Res files updated for image history and PRE/TT font aspect ratio
      choices. 'Don't expire' labels changed to 'Expire' (oops, didn't
      notice the change in the development Browse's Res file when I
      updated all of the others until now...).
      
      When printing, Wimp_PlotIcon appears to ignore R4 and R5, plots
      'somewhere' on the page, and tries to get the sprite from the global
      pool. This latter part normally causes an error to be raised; though
      on my machine I just get a corrupted error message. The Desktop font
      gets lost at this point too. All have yet to be fixed; as an
      interim work around, Wimp_PlotIcon objects are never drawn at all
      if the global 'printing' flag is set.
      dff9a8ae
  8. 02 Dec, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Implemented Message_PlugIn_ReshapeRequest, Message_PlugIn_Status and · 960e879c
      Andrew Hodgkinson authored
      Message_PlugIn_Busy. Plug-in code more robust when given invalid
      browser instance handles by the plug-in.
      
      Line spacing is now calculated on the basis of the normal style base serif
      font, with all other fonts being forced into that line height. This does
      mean that an unusually tall (say) sans serif font may get clipped. It
      appears to be the only way to get around wildly different baseline
      depths returned from the font metrics - you can't work out line spacing
      based on each different font style; the line spacing will vary.
      
      Table heighting (as opposed to widthing...) improved considerably; rowspan
      can no longer cause very tall cells in odd places. Having trouble getting
      rid of the single pixel breaks between vertically adjacent cells, though
      I've not tried too hard. Widthing, though, seems fairly badly broken at
      present... :-/
      
      Set/clear of page_is_text flag made more robust (it looked as though there
      was the potential for this to get stuck in a set state, though I've never
      see the front-end behave in a manner which indicates this is the case).
      The reformatter will now decrease leading if this flag is set (plain text
      pages look daft with a line spacing that is OK for 'rich' text pages).
      No reformatting is done if the page width changes by dragging on the
      resize icon, though toggle size / full screen will still reformat even
      if the contents are only text (browser needs to sort out various width
      flags at this point).
      
      Cut down on excessive redrawing when reformatting due to a change in
      window dimensions is not done. If display_width hasn't changed, then no
      redraw is needed. If this causes redraw problems, then whatever is
      changing display_width needs investigating. It shouldn't be kludged
      (basically) by forcing a redraw instead of a reformat.
      
      TT/PRE/etc. text can now have a non-100% aspect ratio. 80-90% looks
      best (ArcWeb, for example, uses 86%). New option 'TTAspect' in
      the Choices files.
      
      Debug builds link to a non-debug Unicode library now; stops stderr
      being dumped to the bottom left of the screen if you've not redirected
      it in the Run file.
      
      RISC OS 3.1 seems to need more initial WimpSlot than later OS versions.
      The 64 deep nested table set gives a 'No stack for trap handler' error
      (which it really means in this case!) without 800K, even though 3.71
      is happy with just 640K. So, the !Run file checks if Boot$OSVersion
      is exactly 300, 310 or 311, and sets the WimpSlot accordingly.
      
      !Run[D] files now require latest fetcher module versions (URL 0.21,
      File 0.31, HTTP 0.58).
      960e879c
  9. 27 Nov, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Image history can be emptied from the History menu. · 499a3422
      Andrew Hodgkinson authored
      Significant reduction in number of times reformatter is called during
      a table widthing session results in a dramatic speed increase for nested
      tables (e.g. 64 deep with a paragraph of text in the deepest table takes
      about two seconds to load with near-instantaneous subsequent reformats,
      as opposed to taking optimistically 28 days for a 32 deep table!).
      This code relies on a very big stack of assumptions...
      
      Save as plain text implemented.
      
      Choices, Messages and Res files brought up to date where necessary.
      Version number taken to 1.28, 04-Dec-97 (so I don't forget later,
      basically...).
      499a3422
  10. 26 Nov, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Image history - sizes of images are remembered for future reference (if the... · 2a2b2672
      Andrew Hodgkinson authored
      Image history - sizes of images are remembered for future reference (if the sizes aren't specified in the HTML, they can be looked for in the image history instead to minimise reformatting requirements). Choices file options ImageHistoryPath, ImageExpiryAge, ImageMaxSize and
      
      SaveImageHistory added to support this (all have a direct analogy to
      the global History items of the same name after removing 'Image').
      
      Text area items are now the correct height for the number of rows
      specified in the HTML, don't scroll a line too early, and have the
      caret placed at the start of the text when moved into from above
      or at the end when moved into from below (rather than always at
      the end, which was behaviour inherited from single line writables,
      where this is desirable). The top of the text area is aligned to
      the top of any line of text on the same line, with the text area
      dropping below the text, rather than the bottom of the area matching
      the text baseline and extending upwards.
      
      Filename extensions for download files are only stripped if an
      attempt to convert to a RISC OS filetype through the Mime Mapper module
      does not return an error or Data (0xffd) filetype. '.cgi' is a special
      case which is always stripped.
      
      Altered heading styles - all are bold, none are italic, H3 is as big
      as H2 was, H2 is a little larger, and others scale down to H6 being
      the size as normal text (but, as I say, bold).
      
      Sorted out tables and forms. We can just look for tagno=TAG_FORM, and
      get rid of the wobbly form_flag; also discarded the redundant
      reprocess_table flag in fetch_preprocess_token. Two separate forms
      in consecutive table cells (for example) which used to fail - they
      were submitted as one single form - will now work correctly.
      
      Fixed nasty bug in FontManage.c where font size 7 would intermittently
      fail. The stupid font sizes that it could ask the Font Manager for may
      be responsible for the occasional Font Manager crashes that have been
      noticed. Array for font sizes was declared as [Limits_FontSizes], but
      indices 1 to Limits_FontSizes are actually used - so needed a '+ 1'
      in the declaration... :-/
      
      Replaced the case insensitive string comparison functions in Utils.c
      with more efficient versions by S.Brodie.
      
      MAXLENGTH specifier in INPUT tags is now supported. If unspecified or
      specifically zero, the browser overrides and allows any length.
      2a2b2672
  11. 19 Nov, 1997 1 commit
    • Andrew Hodgkinson's avatar
      This is an intermediate check-in to allow work on Choices for the new table... · 7caf92e2
      Andrew Hodgkinson authored
      This is an intermediate check-in to allow work on Choices for the new table options and History choices as detailed below. Res files are not up to date except where indicated and there are several known bugs that will be fixed before the 'final' v1.27 is created. Any work on resources should only be done for the testbed !Browse.
      
      Client side image maps implemented. There is code to draw highlighted
      borders in CSIM.c, but this is not wired in yet; other than that,
      the implementation is functionally complete. As part of this, centralised
      the fetching of a targetted URL taking into account user request of a
      new view and full screen mode, in fetchpage_fetch_targetted. The forms
      library now uses this too, so form buttons respond to both adjust-clicks
      and TARGET attributes.
      
      Fixed APPLET handling where '.class' isn't present in the CODE attribute.
      
      Paragraphs squashed at the top of cells/pages - browser would insert white
      space before.
      
      Now append a ' ' to the end of History menu items to prevent the Wimp
      thinking the end of entries represents a keyboard shortcut (e.g. 'Home').
      
      Netscape's handling of 'meta http-equiv="refresh"' is to start counting
      when the fetch has completed and everything else has died down. The browser
      will now not start counting until the animation handler is deregistered
      (so formatting is complete) to show similar behaviour (note that this
      checks the main handler, not the 'idle but returning to first frame'
      drift handler).
      
      URLs from requests for fetches by Plug-Ins are now relativised.
      
      Page width change tolerance prior to reformat upped from 16 to 32 OS
      units. Hoping to provoke a loosely connected bug with this change!
      
      TableOuter, TableInner and SeeFetches choices added to all Choices
      files, with appropriate loading and saving code in Main.c and Save.c.
      AuthorFTP and AuthorFSh messages added for FTP authentication, and
      dialogue handling code (the component in FetchHTML.c) updated to
      recognise an FTP fetch and alter the dialogue presentation
      appropriately.
      
      All Messages file version numbers taken up to 1.27 (20 Nov 1997).
      
      Following a UseNet suggestion, Ctrl+Toggle Size will increase the window
      size to fill the screen vertically only; horizontal size/positioning is
      not changed.
      
      Shift+Tab in the URL writable will cycle through alternative fetcher
      protocols (from both the Controls file and checking the fetcher modules
      are actually present).
      
      Hotlist doesn't require '://' in URLs when loading HTML, just ':/' - so
      'file:/' URLs now will be reloaded correctly.
      
      History system rewritten completely. GHistSize and VHistSize options
      removed, and replaced by MaxSize and ExpiryAge. Now have global history
      menus with most recently visited items at the top, and local history
      menus which reflect the path that forward/back buttons would take.
      Browsers are robust to background expiry of the History though this is
      not implemented - date expiry and size checks are carried out on
      history_record only. This does mean that with two windows open one could
      have the history expired underneath it whilst another fetched, though;
      the code handles this and update toolbars (greying items) as necessary.
      It is possible to have the history limits so tight that even one entry
      will not fit and again the code copes with this, though values read
      from Choices are limit checked to ensure rather more useful results!
      
      Implemented 'Save' button in save dialogues. Remembers pathnames and just
      replaces the leaf now (hard coded exceptions for <Wimp$Scrap>... and
      <Wimp$ScrapDir>...) - it did before, but only if you'd typed the path
      in. Not many people did, given that you couldn't press Return or click on
      a Save button to use that path...
      
      In a similar vein, files of type Data or DOS will be checked for a '/xxx'
      type extension and the MimeMap module will be used to find a more meaningful
      filetype. If this can be handled, the file is loaded. This only works for
      files dragged to the browser - the behaviour with inline data in web pages
      will depend on the File module, and similarly, if File doesn't spot what is
      going on and claims that the object is data, the browser will just open a
      save dialogue for it.
      
      !RunD files taken up to 3072K WimpSlot.
      
      Hotlist's saved HTML page title wasn't internationalised - is now. This
      opened up a significant can of worms; on file write error, the file would
      never be closed, and if a caller of the save or load functions passed
      in a filename held in the global Messages lookup buffer then subsequent
      lookups in the callees would corrupt that filename. All sorted out now.
      
      Local (not very useful) or global (useful) histories can be saved as HTML,
      which opens up the possibility of sending your history to the hotlist
      by saving to it. Local and global histories can also be emptied, though
      this is probably not a feature that current release Desktop browsers need.
      Inheritance of local history and certain UI features is now done more or
      less for all cases where one browser window spawns another, too.
      
      Vertical alignment on images is rather less ropey than it was (e.g.
      ALIGN=TOP stands half a chance of working) but is still far from perfect.
      This was part of fixing a nasty little bug in Redraw.c's setting of
      an image position via. image_set_token_image_position, which was making
      (amongst possibly many other things) client side image maps fail.
      Image update where images had large borders was affected by a similar
      problem too (more cans with more worms...).
      
      Fixed image background filler functions; two problems. When cross
      referenced images were replaced by base images in a browser because the
      original owner was closing down, the original owner browser would stay
      registered with ImageLib. Fixed; secondly, when images were deleted from
      the image array causing those above to be renumbered, images registered
      with ImageLib did not have their numbers updated (this was the one that
      lead to the visible drop out of background images with PNGs on the Acorn
      Internet home page when there were two views of the page and the first
      was closed). This is now also sorted out.
      7caf92e2
  12. 30 Oct, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Removed 'The Onion' link from some Hotlist files. Time showed that the site... · 62293187
      Andrew Hodgkinson authored
      Removed 'The Onion' link from some Hotlist files. Time showed that the site wasn't entirely Family Friendly (TM)... Removed Shift Control (it's gone offline now), and corrected the Telegraph URL from ...the-telegraph...
      
      to just ...telegraph...
      
      StrongHelp manual generator now tries to work out the number of lines in
      the table on the root page more intelligently.
      
      Plug-in support extended to handle Shockwave. Quite a lot of underlying
      work for this, including a pseudo cache system for temporary files.
      
      Bug in redraw routines: they plotted background images within table
      cells, when nothing should have been drawn. Oops. When background images
      in cells are properly supported, this can get sorted out.
      
      Tweaked vertical plot position of HRs (up to 4 OS units too high before due
      to rounding).
      
      Various Res file bits and pieces, Ursula build taken up to v1.26 beta
      for release on the Browser site. *Note* not all resources are up to date!
      This will be done after AW97.
      62293187
  13. 22 Oct, 1997 1 commit
    • Andrew Hodgkinson's avatar
      fetch_get_raw_data will notice if up->fetching is zero and return a 'finished'... · 3a920561
      Andrew Hodgkinson authored
      fetch_get_raw_data will notice if up->fetching is zero and return a 'finished' status rather than trying to continue reading data for the fetch. Fetches should never fall through that far but at least it will cope if they do.
      
      3D table borders are now supported. 2D borders are used if the
      inter-cell spacing is too small to fit the borders in (display resolution
      dependent) - the external table border is 2D if the internal borders are,
      else 3D. For cellspacing of 0, internal table borders must plot over the
      outer edge of pixels inside the cell; for all greater spacings, the
      borders take up all or part of the gap between them. The external border
      will always fit around the outside of the cells, including the
      cellspacing value in the gap between the outer cells and the border.
      
      Anti-alias colour for placeholder ALT text was incorrect. Fixed.
      
      I'd changed 'point' to 'points' in some of the Font Choices dialogues;
      now changed back to 'point'.
      
      The routine to find out how large an otherwise unsized object or image
      placeholder based on its ALT text has been centralised in Reformat.c,
      so that the image and object routines can both access it without
      code duplication (this means non-image objects will now have the correct
      size if they contain ALT text, rather than assuming a standard default
      size as before). ALT text in images that were also objects was never
      plotted either, though the placeholder size would have been correct.
      This has been fixed.
      3a920561
  14. 20 Oct, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Weird - the line registering the ENavigateToBeShown event disappeared from · 211492c2
      Andrew Hodgkinson authored
      Main.c, so the last log was incorrect; Navigate menu items wouldn't have
      been greyed out. Probably a(nother?) CVS update screw up on my part; now
      fixed. This sort of thing is happening far too often...
      
      Font manager would crash in system font or if a font face was not found
      in the previous release - that hacky business of returning weird font
      handles when system font is to be used instead ensured a rather less than
      valid array reference on behalf of fm_claim_basic_typefaces.
      
      Added in a few more calls to the 'check the button bar' routines, to
      ensure that things like Stop are greyed/ungreyed when needed.
      
      Cellpadding code could lead to rmarg overlapping lmarg, or the sum
      being greater than dwidth, or something like that (!) in the reformatter.
      Anyway the results were unpleasant; this has been sorted out by range
      checking right and left margins w.r.t. display width in the relevant
      section of the code.
      
      People who specify 'td width = 2000' in tables expecting to get something
      sensible now do, though I was half inclined to leave it alone... I can
      only assume that they don't know about % specification or it didn't
      work in their browser at authorship time, and the huge width served as
      an attempt to get the table to fill the available window width. Anyway,
      the table reformatter spots when the maximum width a cell requires is
      less than half of what it asks for, and ignores the width specifier if
      this is the case.
      211492c2
  15. 18 Oct, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Sorted out Res files, including fixing position of 'bytes' label in one of the... · 20f5e4ab
      Andrew Hodgkinson authored
      Sorted out Res files, including fixing position of 'bytes' label in one of the Choices dialogues (I'd missed it out of a selection when everything else got moved down a bit). Unfaded Enc_Chinese menu entries, made sure text labels were wide enough for system font, changed 'Apply' on Choices dialogue to 'Set', and added ^K to hotlist keyboard shortcut lists.
      
      Print Setup (i.e. Print dialogue) buttons all set to 'local', so the
      stupid Toolbox doesn't close the dialogue and lose the caret before I
      can see if it was in there to start with...
      
      256 colour hotlist sprites taken back to standard 16 colour versions,
      since there's a significant speed penalty on slower machines. The
      testbed browser still has the 256 colour versions so the designs aren't
      completely lost.
      
      Changed access settings to exported builds to wr/r - lr/r was really getting
      on my nerves whenever I wanted to try something temporary out.
      
      View source, save source and print handlers would all try to work if
      there was no source to act on - despite the fact that toolbar buttons
      would be greyed out form them. This is fixed.
      
      The Navigate menu has components greyed to match the toolbar state,
      when opened. It isn't kept up to date dynamically, though this shouldn't
      really be a problem (reopen the submenu...). As part of this, finally
      sorted out conditions for the Stop button to be greyed, or the
      GoTo/Go/Stop tristate to be at 'Stop' versus 'GoTo'.
      
      Deferred reformatting is now disabled for external image fetches.
      
      Browser-local client pull flag removed; hitting the Stop button simply
      cancels any null handlers working for it. That way, client pull switches
      back on in passing at the next fetch (it was never really switched off).
      So to stop client pull, hit the stop button at any point.
      
      Done CELLPADDING attribute; cellpadding field in reformat_cell (Global.h)
      is redundant since the table token is accessible from there, and so it has
      been removed. CELLSPACING support also added.
      20f5e4ab
  16. 16 Oct, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Now handles PARAM tags. Sorted out Plug-In bug that was related to Java... · 2093c108
      Andrew Hodgkinson authored
      Now handles PARAM tags. Sorted out Plug-In bug that was related to Java setting a 0 by 0 graphics window before calling Wimp_Poll (fixed in Java).
      
      Implemented queue for Plug-Ins so multiple broadcasts aren't sent for
      several Objects in one data chunk.
      
      Added Docs directory with some documentation in it. More things to keep
      checking for stylistic consistency, horray ;-)
      
      Corrected !Run[D] for Ursula build to need AcornURI but not TaskModule
      (URI handler needed for !Mail to pick up mailto: links).
      
      Added display_height field to browser_data, analogous to display_width,
      to cope with % sized objects by width and height (see how HRs are
      handled in Redraw.c for an example of how it was always fairly easy
      with width, but not height until this addition). Though you do have
      to reload to get a new size; reformat isn't enough. Must see to this
      some time...
      
      Fixed bug where basic typefaces were claimed *before* the Choices file
      had been read. For unusual Choices settings, this could create some
      'interesting' problems now and again. This was part of narrower scope
      work in the Choices code to allow font changing without leaking font
      handles (now done; fm_shutdown only ditches fonts, it keeps internal
      structures - must then call  fm_lose_fonts for all browsers to get the
      bitfields up to date, then rewrite the typeface definitions and reclaim
      basic fonts). Noticed that fm_claim_basic_typefaces would claim multiple
      instances of the same font if there were several cases of the same font
      mapped to different typeface styles - fixed.
      
      Implemented PlugInControl settings, but not SupportObject (fully).
      2093c108
  17. 13 Oct, 1997 1 commit
    • Andrew Hodgkinson's avatar
      More reformatter code bugs fixed; this one regarding width of items. Any... · 0cdc76df
      Andrew Hodgkinson authored
      More reformatter code bugs fixed; this one regarding width of items. Any kerned string was overestimated (causing redraw bugs and caret position problems in forms, apart from other minor bits elsewhere) and the default size of a writable icon wasn't especially clever.
      
      Crude Plug-In support; just about manages Java, but can't fetch on
      behalf of Plug-In (for example). Had to change the default file access
      URL construction to be 'file:/' instead of 'file://', or local file
      fetches that reference Java applets won't work. This is in its very
      early stages, and is being checked in mostly so that various Choices
      issues can be worked on.
      0cdc76df
  18. 09 Oct, 1997 1 commit
  19. 07 Oct, 1997 2 commits
  20. 06 Oct, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Calling HtmlEndParse at the end of html_get_next_token and setting up->context... · 2e86b9d4
      Andrew Hodgkinson authored
      Calling HtmlEndParse at the end of html_get_next_token and setting up->context to NULL was wrong; fetch_fetcher would end up recalling html_get_next_token later which would then call HtmlParse even though the document parse had just finished! The HtmlEndParse call has now been moved to fetch_stop.
      
      Altered reformatter to claim fonts inside a browser, rather than
      claiming them for nothing and losing them afterwards.
      
      Got rid of TAG == TABLE and ISBODY tests, replacing with tagno == TAG_TABLE.
      Removed all references to TD, TH, TR and TABLE in the style word.
      2e86b9d4
  21. 05 Oct, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Big steps forward in vertical white space handling as a result of improvements... · 5db9badc
      Andrew Hodgkinson authored
      Big steps forward in vertical white space handling as a result of improvements in HTMLLib in this area ( -> all versions now 1.22 beta-2).
      
      As a result, the 'last_space' field in browser_data struct has been
      removed. Note that this relies quite heavily on setting of the PCDATA
      bit in the 'style' field of an HStream and the automatic collapsing
      of (for example) multiple P tags inside HTMLLib.
      
      Trace.c improved to recognise various bits in the 'style' field of an
      HStream structure.
      
      Phoenix defaults altered to a more 'standard' set of choices; Trinity
      as the serif font, with a slightly larger default font size. This is
      because there's a good chance it might get released to a wider audience
      than Acorn internal (though the animation and icon bar sprites will
      have to change before then...).
      
      MiscDefs updated for new SWI numbers in HTTP module; !Run[D] files thus
      updated to require HTTP 0.42 or later. At this point, all earlier
      modules are not backwards compatible in terms of direct calls to the
      HTTP module, though this only affects cookies_process_cookie at present.
      At the same time, checks for System$Path, InetDBase$Path, and setting
      of Inet$MimeMappings if not already defined have been added to the Run
      files along with RMEnsures of Resolver and MimeMap.
      
      Object and PlugIn c/h pairs created to handle OBJECT, EMBED and APPLET,
      and the RISC OS Plug-In interface respectively. Not part of the build
      process yet. Addition of 'odata' field in browser_data struct and
      definition of chunk CK_OBJB for memory_set_chunk_size() are in support
      of this.
      5db9badc
  22. 03 Oct, 1997 3 commits
    • Andrew Hodgkinson's avatar
      !Run[D] files updated to require FTP 0.14, and ensure that the Resolver and... · 625421c1
      Andrew Hodgkinson authored
      !Run[D] files updated to require FTP 0.14, and ensure that the Resolver and MimeMap modules are present. Paragraph tags can now affect images and other such objects - previously they only worked on text (this was noticed for a DIV element containing one image, which was preceeded by a P element but didn't have any white space above it).
      
      This is the source that will be released to PSI, and builds the Customer
      !Customer and internal !Phoenix releases at about 5:00pm on 10/03/97.
      625421c1
    • Andrew Hodgkinson's avatar
      !Run[D] files updated to require HTTP 0.41 and FTP 0.13. · 2be2fa5e
      Andrew Hodgkinson authored
      Redraw routines now allow tables to be indented with body text. Some page
      layouts rely on this.
      2be2fa5e
    • Andrew Hodgkinson's avatar
      Version in Messages taken to 1.22 (03 Oct). · 4d616ea4
      Andrew Hodgkinson authored
      Updated Res files in appropriate builds to hold various (similar) Choices
      designs.
      
      Choices related menus were flagged as Shared, but none of the dialogues
      (including ColourDBox) were - potential future problems, though shouldn't
      cause any leaks at present. This has been sorted out anyway.
      
      Encoding function encoding_init no longer returns an error from
      toolbox_create_object, so the Encoding menu and all those attached
      to it do not have to be present (e.g. the Customer build).
      
      SUB, SUP, STRIKE and U supported. U underlines the baseline of the body text
      font, whilst STRIKE will go through roughly the middle of the lower case
      chars even if the font is SUP or SUB. Note that Navigator appears to shift
      the underline point for SUB and SUP; it may be necessary to copy this
      behaviour, but testing on real sites must proceed before that. There could
      also be a problem with the automatic lowering of font size, which Navigator
      doesn't do, so any FONT SIZE = -n commands could make it too small. Again,
      this needs testing on real sites.
      
      'http://' is added to URLs with no protocol specified, unless they start with
      'ftp.', in which case the new behaviour is to add 'ftp://'.
      
      Choices code altered to do less error checking on components! They should be
      able to be missing without raising errors. Referencing of the subwindow
      array changed from *(subwindows + number) to subwindows[number].
      
      Made trace_tag_name code look pretty...
      
      reformat_useless_token now checks tagno is non-zero.
      
      User Agent string setting now done through URL_GetURL, on a per-session
      basis.
      
      Ellipsis character removed from all Messages files, replaced with '...'.
      There's little difference between the two in an outline font, and in System
      font the latter looks much better. Smart quotes left in, as they look
      better in all cases.
      4d616ea4
  23. 26 Sep, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Added support for HTMLLib HttpEndParse call. · 8c9a9091
      Andrew Hodgkinson authored
      Text items with no VALUE specified in the HTML were not cleared on
      hitting a Reset button as the text field of the token is NULL; fixed.
      SELECT lists with no default selection item were not being changed
      on hitting a Reset button; fixed. In radio groups with no default
      selection specified, no item will be selected. This goes against
      the HTML 2 spec but allows broken Navigator-esque forms behaviour.
      In consequence, radios can be deselected by clicking on the same
      one twice. I'd fixed the flickering experienced when doing this
      recently, but that, now, is irrelevant, since the state of a radio
      must always change.
      
      Reformatter's new 'find width of a SELECT field' didn't account for
      the width of <none> and <many> items, and now does (particularly
      important for broken items with no OPTION contents).
      
      Under certain circumstances, illegally named targets would open in the
      ancestor rather than a new window - a deliberate decision in the code,
      but now reversed due to a test suite failure; they'll open in a new
      window instead.
      
      Altered the left hand indent handling for lists so that headings and
      body text follow the Navigator 48 pixel indent and the bullet point
      items drop to the left of the left hand margin, rather than sitting
      on the margin with the text indented to the right.
      
      Tightened up the hotlist_load_directory checking of URLs, so that
      only those with '://' in - i.e. look fully specified - are accepted.
      HTML files are loaded into a new directory now.
      
      Items without a descriptive title in hotlist_new_url will have the URL
      substituted in instead. White space before and after descriptions and
      after URLs is stripped. Directories with zero length names or null
      strings (after white space is stripped) will still be created, with a
      generic name (see Messages, token 'HotlistUntitled').
      8c9a9091
  24. 24 Sep, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Tidied up Hotlist source a bit more, mostly so PSI can use the automatic · 26e079aa
      Andrew Hodgkinson authored
      StrongHelp generator on it. Revealed a spurious toolbox_hide_object call
      that would always fault and never do anything, and a few heinous uses
      of show_error which have all been removed.
      
      When dragging hotlist items, directories will now be highlighted whenever
      the item would be added to them, rather than just over the sprite. In
      practice this only changes if the item is open and has contents...
      
      Drag box selections had broken in the hotlist; fixed (uninitialised
      variable in hotlist_select_box). Adjust-drags now close the window on
      completion. Minor problem with Shift+Drag (copy) reversing order of items
      sorted out. Added hotlist_add_html_file and implemented loading of HTML.
      DO NOT add broken HTML files, this has not been coded for and URLs of the
      form http:///this/that (no host name) will hang the machine (bug in the
      cookie code of the HTTP module up to at least version 0.39).
      
      Made SELECT list items only as wide as the widest entry actually appears
      (using fm_get_string_width), rather than as wide as the widest character
      BBox in the font multiplied by the string length of the longest entry.
      
      Updated !Run[D] files to require HTTP 0.39, FTP 0.12 and File 0.23.
      26e079aa
  25. 22 Sep, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Now working on source merged with Kevin Bracey's internationalisation support.... · f61afadd
      Andrew Hodgkinson authored
      Now working on source merged with Kevin Bracey's internationalisation support. UNIFONT is undefined in the Make File for now. All Res and
      
      Choices files updated appropriately.
      
      Having sorted out the old Choices and Messages to form Choices, Controls
      and Messages, this build has had the same cleaning up done internally.
      This includes greater consistency in naming schemes and the removal of
      the inconsitent choices items - e.g. Choices file entries saying 'delay
      images' and 'plain backgrounds' where internally all the flags say 'show
      images' and 'show backgrounds'. ChoiceDefs.h and CtrlDefs.h added to
      clarify the meaning of some fields, though usage of these is not 100%
      in the source (there are cases where parameters are passed through to
      functions as ints, and those functions still check these against hard
      coded values rather than the #define stuff).
      
      Fetcher status return bits (connected, sent request, etc.) now reflected
      in status bar. Progress during fetchs to files are reported by %, where
      the size of the object is known. Exceeding 100% drops back to a byte
      counter, in case the estimated size was wrong. The progress counter
      may be updated after specific delays, rather than 'as often as possible',
      to reduce flicker (as requested by D.Brown some time ago).
      
      I've done a small rewrite of the fetch prioritisation scheme in FetchPage.c;
      how well this performs in general use across different processor speeds
      remains to be tested, but certainly it has some advantages. For each small
      fetch window before the rewrite, a 4cs tight loop was entered - this gave a
      noticable and substantial drain to the Desktop performance if more than one
      was opened. Now, several can be up at once with little hit. The actual file
      fetch is on half the priority it was before, with all others taken back
      just a bit - e.g. from 20cs per poll to 15cs per poll for flat out
      reformatting. You don't seem to lose much time on the format in practice,
      and the Desktop feels quite a bit lighter at the same time. There's the
      potential for smoother frameset loading in this scheme, too.
      
      When Shift+Clicking on a link meant you still fetched inside the main
      browser window, several fetches could occur in a frameset - one per frame.
      However, now that you can only do this by clicking on a link that leads to
      non-displayable data - or by turning off the small fetch windows by
      setting UseSmall to 'no' in Choices - a bug where fetchpage_preprocessed
      would stop such fetches as new ones were started was revealed.
      The API to frames_abort_fetching has now been extended to include a
      'stop file spooling too' flag, allowing a fix to be made by having
      fetchpage_preprocess's calls not set this (and it doesn't check the
      savelink flag is unset before proceeding, since frames_abort_fetching
      does that implicitly now).
      
      Had left the RAM transfer buffer at 16 bytes (from testing) accidentally...
      Oops. Upped it to 4K. In addition, when loading data by RAM transfer,
      the browser didn't notice if a RAMFetch bounced during the transfer. It
      would be treated as a 'first' RAMFetch bounce, basically, and try to go to
      file transfer - oops. Fixed.
      f61afadd
  26. 18 Sep, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Support for ANT URL broadcast message added. · 5a494095
      Andrew Hodgkinson authored
      Image deletion routines rewritten; nasty animated GIF bug now gone
      (it kept trying to update the cross-referenced image in the browser that
      no longer existed, and I've no idea how animated GIFs ever managed to *not*
      blow up if a cross referencing browser was shut down; and I've tested
      this...). There are now as many image structures as there are total images
      in the visible browsers, and no more; cross referenced images in the
      to-be-deleted browser have their ownership moved to the cross
      referencer before the cross referencee is wiped, with any required fetches
      being transferred with them.
      
      Reformatter sped up a bit by getting rid of strlen on the main text field
      of tokens in all places bar one, where it is called extremely rarely. This
      means direct app-to-app transfer of, say, a 359K text file to the browser
      won't run like a drain as it tries to do strlen on a 359K string over and
      over again! Most of the time the performance benefits won't really be
      noticable, but on the above text file, formatting time went down from
      290 seconds before the change to just under 7 seconds, a 41 fold speed
      increase or thereabouts (SA110 228MHz).
      
      MakeFile changed to force function name compilation on for debug builds
      (-fn in the DD...FLAGS); useful for certain functions such as
      register_null_handler, which can now output the name of the function
      being registered.
      
      ...Which helped show up some nasties in the animation handler and animation
      drift handler registration/deregistration process, which have been fixed
      (callers of fetchpage_release_nulls were unaware that the drift handler
      could be installed, and fragments of old code checking choices.anim_drift
      had a value other than 1 or 0 were still hanging around - bit tricky for
      a single bit item).
      
      Added support for VALIGN in table cells. Spotted a bug or two in the
      'what token is the pointer over' routines as a result, and fixed them - the
      worst was in browser_line_at_y, which checked the y coordinate was below
      the given one [the mouse], but didn't check the line height to see if the
      given y coordinate was *within* the line, rather than just above it. Never
      used to matter pre-tables, but a definite concern once multiple line
      arrays can exist on one page.
      5a494095
  27. 14 Sep, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Got the deferred reformatter working properly. It doesn't do that 'OK, the... · 5e7b0a62
      Andrew Hodgkinson authored
      Got the deferred reformatter working properly. It doesn't do that 'OK, the page is fetched and reformatted, but just to annoy you, I'm going to wait 5 seconds and then suddenly reformat the whole thing again' trick anymore. The fetcher was calling the reformatter in a delayed form even when the reformatter was already running, so it would carry on past the reformat point or from below what had become and invalidated line, and some time later, get back to the delayed reformat. Now, reformatting is only delayed by the fetcher when the reformatter is not running. In practice this means body text reformats as it fetches, but large tables will show delayed reformatting - which was exactly the intended behaviour of the feature when it was originally thought of.
      
      fetch_token_data_address removed; it was only needed in two places,
      both of which already knew when to read tp->text and when to ignore
      it. Its functionality is duplicated in an 'if' involving reformat_istext,
      anyway.
      
      !Run[D] files taken back to requiring HTTP 0.33, since 0.36 introduces
      many weird and wonderful problems.
      
      Typo in Messages files, 'All current images (sic.) fetches finished' -
      'images' is now 'image'.
      
      Shift+Click saving - you could save to an application. No problem. But
      the equivalent (just clicking on a link that led to an unknown datatype
      and getting the save dialogue that way) didn't work. It does now.
      Another problem was saving to an application that didn't support the
      datatype - oops, the dialogue would close but the fetch would sit there
      waiting to be told where to save. It doesn't close now (as expected).
      
      NB, doing several simultaneous fetches to a text editor may have problems
      as the editors are too clever for their own good. Despite receiving
      DataLoad messages for <Wimp$Scrap> for files of different types, sizes
      and datestamps, the editors can decide it's still the same file and:
      
      Zap      - Hats off, it gets it right, almost. You do get warned 'Multiple
                 copies - one on disc is newer' as everything after the first
                 text loads, but they do load, and in separate windows.
      StrongED - Does not load the subsequent files, so the browser gives 'Data
                 transfer failed' errors and opens up Scrap. Turning off 'Don't
                 load same file twice' fixes it - each file is loaded in a new
                 window with no warnings. At least in the first case, you don't
                 lose data, since the files are kept in Scrap.
      Edit     - Each time it loads the file, it *replaces* the other one in
                 memory, using the same window for each. This is the worst
                 behaviour as it isn't configurable (well, I don't know of a way
                 to change it...) and results in data loss as successive texts
                 get trounced by the new data.
      
      I can't see how I can fix this in the browser as it's basically silly
      behaviour on behalf of the editors. Other applications which don't try
      to work out if it's a new file or not are fine!
      
      When conducting image fetches, proxying is allowed unless reloading.
      When conducting page fetches, proxying was never allowed - so web cache
      stuff would have been, er, interesting. It now sets X-NoProxy: in the
      request header when reloading, but otherwise this is not included.
      
      AnimSpeed is, at last, independent of browser poll speed. They used to
      be tied together. Guess how the animation code used to work ;-)
      
      'Can't handle this datatype' - deprecated now that save dialogues can be
      popped up. The 'can't save objects in full screen mode' error would never
      be shown due to a bug, anyway; this now replaces 'can't handle', which
      has been removed from all Messages files.
      
      RefoWait, RefoHang and RefoTime moved from Controls back to Choices.
      
      Trying to get rid of strlen in the reformatter - it can get very slow
      (e.g. strlen of 8K chunks of text, or if a 330K text file is transferred
      from a text editor straight to the browser, strlen of a 330K string...).
      There will be unfinished bits of code in the reformatter that may seem
      unnecessary - they've just not been plugged in yet (since they don't
      actually work). Don't remove them!
      5e7b0a62
  28. 31 Aug, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Created Protocols source file and moved a lot of message handling from... · f3e8124f
      Andrew Hodgkinson authored
      Created Protocols source file and moved a lot of message handling from handle_messages - the latter now serves as a high level distributor to lower level functions in Protocols. Incidentally, URL files (as used by the ANT suite) can be loaded by dragging to the browser in the same way as URI files - Not A Lot Of People Know That, etc.
      
      Merged new hotlist display type Res file to existing resources, added
      support for DataSave message so items can be dragged from the hotlist
      to a specific window (RAM transfer for URI and URL files; ScrapFile for
      HTML and Text but deleted afterwards and there are appropriate guards
      to stop Reload just saying 'not found'; images run through ScrapFile and
      there is no choice but to leave them there and do a conventional fetch).
      
      All !RunD files now give a WimpSlot of 2304K. Some small changes to
      the Argo and Ursula build Res files to make the menu trees more sensible.
      Controls files now take 'file:/' instead of 'file://' in Protocols
      section. Definitions at top of URLutils.c *not* altered, as then you
      end up with invalid URLs - so it will accept 'file:/', but always generate
      'file://'. This is because some browsers exports 'file:/'. Sigh.
      
      make_no_[..._]memory_error functions now return a _kernel_oserror * rather
      than void. It's always &erb returned, but it enables users to use a more
      elegant 'return make_no_memory_error(1);', say, rather than something
      like 'make_no_memory_error(1); return &erb;'. I obviously should've written
      it like that at the outset, but never mind. All callers have been
      appropriately updated.
      
      The urlutils_leafname_from_url function now replaces illegal characters
      (A7000 Welcome Guide p54...) in the leaf with legal alternatives.
      
      Internal URL scheme is now a bit cleaner, with everything properly defined
      in URLutils.h. All references to http:, file: and ftp:, with or without
      a following '//' use the definitions in here now.
      
      More tidying and some reorganising of Hotlist source. Auto-open delay is
      now a Choices item. Some dependencies on statics removed (e.g. the
      counting functions don't accumulate into the global item_number now).
      The redraw functions used Wimp_TextOp - oops, so this has been amended
      to use whatever is supported on your Wimp. This is now in a new function
      (utils_text_width()), which the History menu routines also use (there was
      a bug in the width routine there anyway, which is therefore fixed in
      passing). Several other routines used Wimp_TextOp directly too, and
      they have been altered to use the new function as well.
      
      In hotlist code, one of the larger changes is in the API to hotlist_draw_r()
      (formerly _hotlist_draw()) which now takes item widths and heights as
      parameters - discovering these is quite slow, so doing it every time the
      function calls itself recursively is a little less efficient than
      passing the values in from elsewhere. Note that underscore prefixed
      functions are being slowly renamed to _r suffixed functions, to match
      the convention established by Tony Cheal with is table routines. This
      makes it much more obvious when something is recursive, as the same
      naming convention is used in every browser source file.
      
      Finally, note that I intend to ditch SaveDBox and use an alternate window
      with manual control of the messaging in Protocols.c. This will allow
      various improvements which at present the SaveDBox operational methods
      preclude. I'm going to have to do at least an alternate Window object for
      the SaveDBox module to use soon in any case. Getting rid of SaveDBox will
      help reduce, if only slightly, demands on the RMA.
      f3e8124f
  29. 28 Aug, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Very long log entry alert - but hey, beats 'Bug fixed' (sorry, Richard) ;-) · 532155bd
      Andrew Hodgkinson authored
      Open URL implementation more or less complete, though may undergo UI
      revision at a later date to allow named frames to be targetted. Hope to use
      the ideas in this code as the foundation for other general dialogues.
      
      In token stream dump for TRACE builds, table head items were not indented
      as far as they should have been - this is fixed; and manual toolbar redraw
      routines have been removed. They never worked, were commented out, and
      would never be used in that form anyway.
      
      DragBox source added, but it isn't at all complete and won't work - this is
      an 'in spare time' thing. We need custom drag boxes constrained to windows
      for the hotlist, and unconstrained for frame border resizing... Hey ho.
      
      Ancestor window extents match visible areas if there are frames (no more
      scrolling framesets...!). Frame resizing works whilst new documents fetch
      without pulling the extent down now. However, frame horizontal extents
      never shrink until a reload which is nasty, and this is all due for a
      rewrite. Frames border redrawing routine moved out of Redraw.c and into
      Frames.c. Bug regarding the mouse rectangle and frame border widths
      (rectangle was too large, so you could squash the edges) for edge-drag
      frame resizes fixed.
      
      Window width change reformat tolerance fixed; you could creep the window
      width down or up forever without any reformat, and centred objects would
      move but not be redrawn (thereby giving rise to subsequent redraw errors).
      
      Filetype on objects saved through Shift+Click correct. Save Source dialogue
      recognises if that source is plain text, rather than assuming HTML. A
      browser that fetches a file remembers the old store size it had before the
      save, so even though the data is now ditched, it reports the same amount of
      data fetched afterwards (looked awful when this could, for example,
      suddenly say '0' after a file save). Progress indicator is now fully aware
      of one or many file saves inside a frameset and reports the number of
      saves, a colon, and the cumulative saved data count, instead of reporting
      the sum total of fetched data in all frames, including non-file save stuff
      (note that for just 1 save, '1:' is not shown as a special case for the
      most common condition). A bug related to this, where you could in fact only
      do one fetch per frame*set*, has been corrected (only one fetch allowed per
      frame still, this is unlikely to ever change).
      
      Hotlist support added (D.Brown's source), with various bits of integration
      and modification still in progress there. Note additions to the Messages
      files. On the subject of Messages, the whole mucky business about what
      goes in Messages or Choices (and a few bugs where lookup_choice was used
      instead of lookup_token or vice versa) has been sorted out. Messages
      contains, more or less, just that. Choices contains user configurable
      stuff which generally can't mess things up too badly. A new file, Controls,
      is a Messages file holding the non-user configurable choices, which can
      generally make things go badly wrong if misused. A lot of these are tied
      to the Res file. StrongED users can get these to automatically fold out
      the various sections (EMail me for details). Sorry, but at the time of
      writing, Zap doesn't do folding... =8*P
      
      Two bugs with images. Asking for images to be shown in browser B when
      browser A uses the same ones and was loaded first didn't work correctly,
      and now does (a bit weird - browser A does the fetch and browser B does the
      display...). Second one occurred when the background image was also used on
      the page as a foreground image. This has been fixed by flagging background
      images in the image_info structure, and checking this before cross
      referencing. This bit also allowed the image_restart_fetches API to be
      extended, so that just background or foreground images may be fetched if
      they weren't already and the user asked the browser to show them. Before,
      the whole lot had to be fetched together (so turning on 'display
      backgrounds' will now kick off an image fetch if required, you don't
      need to reload the page anymore).
      
      Makefile copy options tweaked to be 'newer' (so if you're testing with some
      temporary Choices file or something, it won't write over it at the end of
      every export), and REMOTE_HOTLIST flag added for Customer builds - means
      the Hotlist.c functions aren't needed; the old, hotlist-by-file method is
      used. Added support for Customer build (see later), though there were very
      few additions needed in practice.
      
      Table printing fixed - in many ways it wasn't broken, it was image printing
      causing the oddities ever since the global image pool was introduced (this
      is, again, fixed). The 'reformat to fit page' option didn't work as coded
      any more; tables store cell addresses in the HStreams, so you can't then do
      a background reformat in a different browser. Hence, it now has to reformat
      to the page width, print, then put the page back again, all in the actual
      displayed browser. This doesn't feel as slow in use as it perhaps should,
      considering what is going on... Note that a line of a defined fraction (see
      Print.h) of page height will now split over page boundaries, so tall images
      or tall tables don't cause problems now (aside from the obvious problem of
      having the line split over a page at all!). There was a bug in the routine
      to print from a given start point until 'n' pages had been filled, in that
      it always filled 'n + 1' - now fixed. Finally, as part of the printing
      tweaks, a new dialogue exists - PrintStyle - with a similarly named source
      file added to deal with it.
      
      Global history auto save / load done, but only to the Choices file path -
      the whole browser is still strictly single user at present, with all the
      extra work for a multiuser Customer environment yet to be done. This has
      shown up a global history corruption problem which I haven't fixed yet.
      
      Rationalising TBEvents.h - things are migrating out of it, and into more
      appropriate sources (e.g. definitions relating to the Open URL dialogue are
      going into OpenURL.h, etc.). Event codes were at one stage deliberately
      diverged in numberspace from the component IDs of typical gadgets raising
      the events, to avoid anyone getting confused and thinking the IDs and event
      codes must match. However, this is in fact unlikely and it is much easier
      to remember the fewer numbers that result from tying the two together where
      possible. This has resulted in changes to event codes raised in the
      following objects of all Res files: Authorise, Find, OpenURL, and
      PrintStyle.
      
      And finally - !Run[D] files for all variants updated to require the latest
      toolbox and fetcher modules. All Res files updated for hotlists etc. and
      sprites files updated appropriately. All Messages, Choices and Controls
      files brought in sync., and an Customer build has been added (based on the
      Desktop build binary with different resources).
      
      That's all for now...
      532155bd
  30. 18 Aug, 1997 2 commits
  31. 12 Aug, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Quite a few general source changes throughout many files to sort out swapped... · b5ed816d
      Andrew Hodgkinson authored
      Quite a few general source changes throughout many files to sort out swapped toolbars. There will be more work on this shortly. svcprint.c has been modified to allow it to output to a file in PipeFS, so TML-less machines can still use the standard browser debug routines (albeit in a less than elegant fashion). Comments in that source file give more details. Plus a few more bug fixes.
      b5ed816d
  32. 08 Aug, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Checking in mostly because its Friday... Quite a few little bug fixes · b4491718
      Andrew Hodgkinson authored
      (adding up to a greater whole), which include removal of the dastardly
      'invalid image number' errors that trace builds would raise from time to
      time. Frame highlights are now better controlled (releaseably so).
      Generally, this build represents the first genuinely promising version
      of the browser for quite some time, despite the known library problems
      with comment handling etc.
      b4491718
  33. 05 Aug, 1997 1 commit
  34. 01 Aug, 1997 1 commit
  35. 31 Jul, 1997 1 commit
    • Andrew Hodgkinson's avatar
      Customer work complete, and this version just shipped. Had to comment out the... · 739c44af
      Andrew Hodgkinson authored
      Customer work complete, and this version just shipped. Had to comment out the code in Main.c that sets the user agent string to fake Netscape, as the persistent problems with forms in tables showed up much more on a modem link - net result was that the customer's log in page didn't work. Not faking Netscape gives an authorisation dialogue instead, allowing access to the site even if not by the most elegant of methods.
      739c44af
  36. 18 Jul, 1997 1 commit