This snaps vertices to 1/32 of a pixel before rasterization resulting
in smoother movement and less floaty appearance of moving triangles.
This also reduces the severity of the artifacts in the glquake port.
5 bits should allow up to 1024x1024 render targets. Anything larger
needs a different implementation.
KeyboardMapperWidget's load_map_from_file, load_map_from_system, save,
and save_to_file now all return ErrorOr<void> and no longer handles
alerting the user to potential errors.
main is now responsible for handling errors originating from its calls
to these four functions; it will simply alert the user using the new
method KeyboardMapperWidget::show_error_to_user(Error), which simply
creates a MassageBox displaying the error's string_literal.
This makes the whole program slight more clean feeling :^).
Makes CharacterMapFile::load_from_file and CharacterMap::load_from_file
return ErrorOr instead of Optional. This makes them a little nicer to
use and a little easier to read, as they seem to have been approximating
this.
When depressing a key, KeyboardMapperWidget::keydown_event() will now
update only the pressed state of the button associated with the specific
key, instead of also setting the pressed state of the all the buttons to
false.
This makes it possible to highlight multiple pressed keys at once and
makes the code more consistent; the implementation of keyup_event
implied that this was a feature of the program.
Extract the mapping of a name to a character map into its own method.
This only slightly reduces the number of lines, going from 24 to 17
lines, but makes the code somewhat more readable and reduces repetition.
Extract the creation of map-selection radio buttons from create_frame
into the new private method add_map_radio_button(map_name, button_text)
turning 24 lines into 4 + 6 lines. This makes create_frame a little
easier to read. :^)
When a user is navigating a table view with arrow keys and a row is
outside of the current view, then scroll_into_view is called, and the
position of the rectangle passed to this should take into account the
column headers.
This can be seen making more pleasant the navigation in the System
Monitor in the Processes view, for example.
When a user is navigating a table view with arrow keys and a row is
outside of the current view, then scroll_into_view is called, and the
position of the rectangle passed to this should take into account the
column headers.
This can be seen making more pleasant the navigation in the System
Monitor in the Processes view, for example.
This includes:
- Parsing proper LabelledStatements with try_parse_labelled_statement()
- Removing LabelableStatement
- Implementing the LoopEvaluation semantics via loop_evaluation() in
each IterationStatement subclass; and IterationStatement evaluation
via {For,ForIn,ForOf,ForAwaitOf,While,DoWhile}Statement::execute()
- Updating ReturnStatement, BreakStatement and ContinueStatement to
return the appropriate completion types
- Basically reimplementing TryStatement and SwitchStatement according to
the spec, using completions
- Honoring result completion types in AsyncBlockStart and
OrdinaryCallEvaluateBody
- Removing any uses of the VM unwind mechanism - most importantly,
VM::throw_exception() now exclusively sets an exception and no longer
triggers any unwinding mechanism.
However, we already did a good job updating all of LibWeb and userland
applications to not use it, and the few remaining uses elsewhere don't
rely on unwinding AFAICT.
Instead of slapping 0..N labels on a statement like the current
LabelableStatement does, we need the spec's LabelledStatement for a
proper implementation of control flow using only completions - it always
has one label and one labelled statement - what appears to be 'multiple
labels' on the same statement is actually nested LabelledStatements.
Note that this is unused yet and will fully replace LabelableStatement
in the next commit.
Sometimes, pumping the event loop will cause new events to be
generated. For example, an IPC message could be delivered which then
dispatches a new event to be handled by the GUI. To the invoker of
`EventLoop::pump()`, it is not obvious if any events were processed at
all.
Libraries like SDL2 might not have the opportunity to run the event
loop often enough that events can be processed swiftly, since it might
spend time doing other things. This can result in stuttering GUI
interactions.
This changes `EventLoop::pump()` to return the number of processed
events. This functionality will be used by our SDL2 port in another PR.
Previously, only terminal output aligned table column contents
correctly. Now, we apply a `text-align` to each cell. This does not
actually *work* however, since LibWeb's table layout code is not yet
fully functional.
This fixes all failing Date.UTC test262 tests, which failed due to not
handling invalid input and evaluating inputs out of order. But this also
avoids using timegm(), which doesn't work on macOS for years before 1900
(they simply return -1 for those years).
Partially addresses #4651. Date.parse.js still fails.
We currently use Core::DateTime create, which internally uses mktime().
This has the issues pointed out by the (now removed) FIXME, but also has
an issue on macOS where years before 1900 are not supported.
This is just to allow removing the 'clang-format off' directive. This
concept is only used within this header, so it doesn't need to be in the
global namespace.
When searching for the locale-specific flexible day period for a given
hour, we were neglecting to handle cases where the period crosses 00:00.
For example, the en locale defines a day period range of [21:00, 06:00).
When given the hour of 05:00, we were checking if (21 <= 5 && 5 < 6),
thus not recognizing that the hour falls in that period.
This impacts text editors' ctrl+left, ctrl+shift+right, ctrl+backspace,
etc..
For example, consider the text "Hello world |", pressing
ctrl+backspace each time.
Before: "hello world |"
"hello world|"
"hello |"
"hello|"
"|"
After: "hello world |"
"hello|"
"|"
Note that this breaks a nice symmetry. Doing ctrl+left and then
ctrl+right doesn't necessarily get you to the same place like it use to.
Before: " hello |"
" hello| "
" hello |" // same as initial
After: " hello |"
"|hello "
" hello| " // different from initial