Age | Commit message (Collapse) | Author |
|
|
|
DateTime::create() takes a date/time in local time, but it set
tm_isdst to 0, which meant it was in local winter time always.
Set tm_isdst to -1 so that times during summer time are treated
in summer time, and times in winter time are treated as winter
time (when appropriate). When the time is adjusted backward by
one hour, the same time can be in winter time or summer time,
so this isn't 100% reliable, but for most of the year it should
work fine.
Since LibJS uses DateTime, this means that the Date tuple
ctor (which creates a timestamp from year/month/day/hours/etc
in local time) and getTime() should now have consistent (and
correct) output, which should fix #3327.
In Serenity itself, dst handling (and timezones) are unimplemented
and this doens't have any effect yet, but in Lagom this has an effect.
|
|
This doesn't need to be its own syscall either. :^)
|
|
|
|
Add an ExpandableHeap and switch kmalloc to use it, which allows
for the kmalloc heap to grow as needed.
In order to make heap expansion to work, we keep around a 1 MiB backup
memory region, because creating a region would require space in the
same heap. This means, the heap will grow as soon as the reported
utilization is less than 1 MiB. It will also return memory if an entire
subheap is no longer needed, although that is rarely possible.
|
|
|
|
This doesn't need to be its own syscall. Thanks @BenWiederhake for
the idea. :^)
|
|
|
|
Source: https://wiki.osdev.org/Shutdown
|
|
|
|
The move constructor of a lambda just copies it anyway.
Even if the first move() left an 'empty' closure behind, then
'm_editor->on_cursor_change' would only be able to see an empty
closure, which is certainly not what was intended.
|
|
Especially when it's evaluated immediately and unconditionally.
|
|
|
|
Especially when a constant is passed as a boolean that contradicts the default value.
|
|
Under the hood, a lambda is just a struct full of pointers/references/copies and whatever else
the compiler deems necessary. In the case of 'update_demo', the struct lives on the stack
frame of FontEditorWidget::FontEditorWidget(). Hence it is still alive when it's called
during the constructor.
However, when 'fixed_width_checkbox.on_checked' fires, that stack frame is no longer alive,
and thus the *reference* to the (struct of) the lambda is invalid\! This meant that
'update_demo' silently read invalid data, tried to call '.update()' on some innocent arbitrary
memory address, and it crashed somewhere unrelated.
Passing 'update_demo' by value (like with all the other event handlers) fixes this issue.
Note that this solution only works because 'update_demo' itself has no state; otherwise
the various copies of 'update_demo' might notice that they are, in fact, independent copies
of the original lambda. But that doesn't matter here.
|
|
Drawing out of bounds no longer affects any neighboring glyphs.
|
|
|
|
GIFLoader now uses a single frame buffer to cache the last decoded
frame. This drastically reduces memory usage at the small expense of
re-decoding frames on each loop.
|
|
|
|
RestoreBackground disposal mode is now a transparent fill to allow
background to show through.
RestorePrevious disposal mode now restores the previous frame.
|
|
|
|
|
|
|
|
|
|
|
|
I think this should really be a member function of InputStream instead,
but I don't want to include String in Stream.h. This will do for now...
|
|
|
|
|
|
|
|
|
|
|
|
This avoids silly problems like broken debug code. When debugging, I don't first
want to have to debug the debug code! :P
With all debug options enabled, `test-js` outputs 858081 lines. This is too much
for Travis, so we need to throw the debug output away on Travis. Note that
this still preserves information like *which* test failed, as well as the
precise error message.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A change introduced in 5e01234 made it the resposibility of each
filesystem to have the file types returned from
'traverse_as_directory' match up with the DT_* types.
However, this caused corruption of the Ext2FS file format because
the Ext2FS uses 'traverse_as_directory' internally when manipulating
the file system. The result was a mixture between EXT2_FT_* and DT_*
file types in the internal Ext2FS structures.
Starting with this commit, the conversion from internal filesystem file
types to the user facing DT_* types happens at a later stage,
in the 'FileDescription::get_dir_entries' function which is directly
used by sys$get_dir_entries.
|
|
|
|
|
|
Without this model, comboboxes are abysmal to work with, so let's not
redefine it every time.
|
|
Improves ini icon depth and adds complementary 16x16/32x32 icons
for music and sound filetypes.
|
|
Adds new SystemMenu icons for all general categories and refreshes
existing ones for a more consistent look.
|
|
This doesn't feel 100% right but it's better than inserting some goofy
whitespace when pressing these keys.
|
|
Until we have better control over cell content alignment, let's make
them all right-aligned by default since that makes numbers look nice,
and numbers are the bread & butter of spreadsheets. :^)
|