Commit Graph

1666 Commits

Author SHA1 Message Date
Michael Drake
a122b94efd URL escape: Simplify to avoid unnecessary allocation.
This removes the toskip parameter, which was only used by the RISC OS
front end.  The toskip param was used to skip 8 characters which did
not need to be escaped from the start of the URL.  The RISC OS front
end now orders the steps of its URL construction to avoid the need
for this.
2016-07-25 09:04:35 +01:00
Vincent Sanders
8066d1c8b4 move key press enums and operations to their own header 2016-07-01 14:27:04 +01:00
Vincent Sanders
66d0f14b32 move the public form API 2016-06-14 12:39:54 +01:00
Vincent Sanders
8861923455 Allow include directories to be added by sub makefiles 2016-06-06 14:47:27 +01:00
Vincent Sanders
76a68d7dd0 Update content to split public and internal API 2016-06-06 09:01:38 +01:00
Vincent Sanders
667605869f move plotters header into public API 2016-05-30 21:05:57 +01:00
Vincent Sanders
7fc0a4c481 move desktop window header into public API 2016-05-30 17:32:57 +01:00
Vincent Sanders
8711fbe47d move mouse and pointer state header into public API 2016-05-30 12:10:08 +01:00
Vincent Sanders
9ce71876ce move layout header into public API 2016-05-30 11:31:35 +01:00
Vincent Sanders
fe7eb85614 move misc header into public API 2016-05-30 11:23:32 +01:00
Vincent Sanders
aa5090c85b move utf8 header into public API 2016-05-30 11:20:15 +01:00
Vincent Sanders
903c4dbef9 move search header into public API 2016-05-30 10:57:22 +01:00
Vincent Sanders
2dab078f21 move bitmap API header to core include directory 2016-05-26 23:01:03 +01:00
Vincent Sanders
6722943b81 move the CSS content handler 2016-05-26 11:18:41 +01:00
Vincent Sanders
3224d7121a move image content handlers to accomodate core build changes 2016-05-23 23:32:16 +01:00
Vincent Sanders
d6b6dafe50 fix plain text render regression introduced in layout table changes 2016-04-28 10:50:13 +01:00
Vincent Sanders
6a36d4ec2b remove all core usage of warn_user API 2016-04-26 12:50:16 +01:00
Vincent Sanders
69cea38f41 update scrollbar_create error handling to return nserror 2016-04-26 12:14:56 +01:00
Vincent Sanders
974a4a21e1 split out the layout glyph sizing and splitting API
This refactors the core "font" sizing API to be handled through gui
 function tables similar to every other core/frontend calling API.
2016-04-23 23:32:21 +01:00
Vincent Sanders
7d9c9dba36 Split utils header into string functions and everything else
split out the string handling API from the rest of the utils header
and fix up all the fallout.
2016-04-21 22:36:21 +01:00
Vincent Sanders
ea08caccb9 implement tsla code review points in render monotonic time change 2016-04-20 19:57:44 +01:00
Vincent Sanders
a6dd92c571 use monotonic clock call for html reflow timing 2016-04-20 19:18:15 +01:00
Vincent Sanders
dee7426656 stop content header dragging in so many other headers 2016-04-19 23:20:29 +01:00
Vincent Sanders
33c7df0c40 complete the rename of the gui browser table
When the operations tables were created the browser table was renamed
to miscellaneous except the actual rename patch was never applied,
this fixes that situation.
2016-04-16 23:50:21 +01:00
Vincent Sanders
d15ab96a51 Fix size_t printf formatting
The printf formatting for size_t is set in c99 as %zu but in windows
it is %Iu this is solved by adding and inttypes style PRI macro for size_t

This also uses this macro everywhere size_t is formatted.
2016-03-17 22:00:54 +00:00
Vincent Sanders
7d4d500c1d Revert "Fix memory leak in error handling"
This reverts commit c53be10892.

Issue tracked in bug 2443
2016-03-16 08:36:36 +00:00
Vincent Sanders
c53be10892 Fix memory leak in error handling
error handling during form gadget construction could leak, this fixes
the leak on error. Fixes coverity CID 1109875
2016-03-14 15:54:10 +00:00
Vincent Sanders
1ace8538d1 Fix possible dereference of NULL
The return of calloc was not being checked and could have lead to a
NULL pointer dereference. This fixes coverity CID 1316337

Additionally the functions documentation comments were cleaned up.
2016-03-14 14:19:43 +00:00
Michael Drake
04e61b710f Fix object accounting for aborted HTML contents. 2016-02-11 11:45:38 +00:00
Michael Drake
d4a01d525a HTML: Remove some status bar updating code. 2016-02-10 16:09:16 +00:00
Michael Drake
3bee7b7e12 Layout: Don't generate :before and :after boxes for replaced elements.
In CSS 2.1 this was undefined.

  CSS 2.1 -- 12.1 The :before and :after pseudo-elements

    Note. This specification does not fully define the interaction
    of :before and :after with replaced elements (such as IMG in HTML).
    This will be defined in more detail in a future specification.

    -- https://www.w3.org/TR/CSS21/generate.html#before-after-content

In CSS 3 the :before and :after generated content boxes are not allowed
on replaced elements.

  CSS 3 Generated and Replaced Content Module
        12. Replaced content

  The box model defines different rules for the layout of replaced
  elements than normal elements. Replaced elements do not have
  '::before' and '::after' pseudo-elements; the 'content' property
  in the case of replaced content replaces the entire contents of
  the element's box.

  -- https://www.w3.org/TR/css3-content/#replacedContent
2016-02-09 16:42:28 +00:00
Michael Drake
8e580ccd19 Split out presentational hints handling. 2016-02-05 10:49:58 +00:00
Michael Drake
b002ba7357 Simplify special element handling in node inserted callback. 2016-01-29 16:04:47 +00:00
Michael Drake
b58176c65e Spaces to tabs. 2016-01-29 16:04:47 +00:00
Michael Drake
d9e92d2032 Add comment on on-demand JS context creation safety
Checking for enable_scripting isn't needed here.
2016-01-21 14:58:38 +00:00
Michael Drake
82b298ac2c Ensure we do on-demand JS context creation only when JS is enabled.
An alternative approach which may be better would be to create the
JavaScript context when the html_content is created, rather than
on demand.

This code checks for the JS context and creates one every time we
add a node to the DOM.  So when JS is on, every doc with a single
node in it has a JS context.  This seems to make on-demand creation
a redundant overhead.
2016-01-21 14:51:17 +00:00
Michael Drake
669448d7b6 Fix place where we're calling a js_* fn without checking for context. 2016-01-21 14:49:57 +00:00
Michael Drake
594012ef52 Ensure constant javascript_enabled for HTML contents.
Now we take the value of the javascript_enabled option when the
content is created.  We then use the content's script_enabled
boolean everywhere else.

This prevents us getting inconsistent values for javascript_enabled
if a user toggles the setting while a page is loading.

It was read frequently during box construction, and also the
parser's script enabled setting could change where we handled
a change of encoding.

Now we only care about the setting of the javascript_enabled
option at time of html_content creation.
2016-01-21 14:11:36 +00:00
Michael Drake
3dcf7d80a1 Pass html_content to box_extract_link. 2016-01-21 14:09:57 +00:00
Michael Drake
ad273a41e8 Simplify place_float_below loop condition. 2016-01-21 09:44:05 +00:00
Michael Drake
a774e9473d Make use of cached place float below value earlier. 2016-01-20 22:37:22 +00:00
Michael Drake
0bbc03c577 Cache place below level, to avoid pointless calls to find_sides. 2016-01-20 20:09:40 +00:00
Michael Drake
c13080d96c Optimise white hot find_sides to take advantage of sorted float_children.
Now we have an early exit when we get to the floats above the area we're
interested in.
2016-01-20 20:02:56 +00:00
Michael Drake
948a93041d Sort float_children of containers by their bottom edge. 2016-01-20 20:02:56 +00:00
Michael Drake
38e6fd1b74 Split adding float to a container out into separate function. 2016-01-20 20:02:55 +00:00
Michael Drake
018adc2f5e Remove redundant condition in white hot path. 2016-01-20 18:27:15 +00:00
Michael Drake
0492966c86 Remove erroneous redeclaration of variable in new scope. 2015-12-20 12:04:21 +00:00
Michael Drake
e5a2538b6d Make it clearer why we're asserting. 2015-11-11 22:22:19 +00:00
Michael Drake
896c71abbe Only fire click event on button 1 press. 2015-11-06 15:55:36 +00:00
Michael Drake
5c719d540e Assert that we have a node. 2015-11-06 15:55:33 +00:00