If selected text is less than a whole line, usual delete/replace takes
place. Otherwise, if the selected text is a whole line or spans
multiple lines, the selection will be indented.
If the for loop's body is not block terminated, we will generate a Jump
to the end block which will block terminate the body. Then, we ended
the lexical variable scope if needed. However, since the body is now
block terminated, the "LeaveLexicalEnvironment" instruction that is
generated by end_variable_scope is now dropped on the floor.
This fixes this by moving it to the beginning of the end block.
Previously we only did this if the body block was not terminated.
If it was, all future codegen would happen in this block terminated
body block until another switch occurred, dropping all generated
instructions in this time on the floor.
Before this commit the close tab button, which is meant to only
show when more than one tab is open, would be present on the tab
of a new project opened after the first project.
This was due to m_all_editor_tab_widgets not being cleared when closing
the first project. This is now cleared when close_current_project() is
called.
newlib has an extra character slot at the beginning to enable some
macro tricks that cause a warning when someone passes a type that's not
"int" into a ctype function. Our deviation from this causes issues for
LLVM.
This fixes the x86_64 build. However, when built with clang x86_64,
ruby crashes on exit trying to free some memory that has an invalid
header magic. More work to be done here to make the x86_64 build work
properly.
Following the pattern for qemu, mold, and clang, we should install the
host ruby required to build the ruby port into its own install tree
rather than forcing it into the GNU compiler's bindir.
Following the pattern for qemu, mold, and clang, we should install the
host python required to build the python port into its own install tree
rather than forcing it into the GNU compiler's bindir.
Previously we were hand-writing all the Zlib and raw Deflated data
structures here, but now PNGs will be compressed using ZlibCompressor
which will actually try to compress something! :^)
Note that we don't do any filtering that should help compress data even
more, but even now the results are pretty good:
- screenshots of my Serenity desktop are take now about 55 KiB, where
previously it was 3 MiB.
- re-encoding NASA photo of the Earth[1] to PNG shows a 2x improvement
(34.3 MiB -> 16.5 MiB).
[1]: https://commons.wikimedia.org/wiki/File:The_Blue_Marble_(remastered).jpg
Make the link between SQLStudio and the SQLServer so that statements
written in the editor window are executed by LibSQL when the 'Run'
button is clicked.
Add the necessary GUI elements (button, table) so that one can click a
button to run the currently-open script, and see the results in a
user-friendly table.
Even though we tell the user to change the version manually if it
doesn't match with the current
`Toolchain/Local/i686/i686-pc-serenity/include/XX.X.X` version, it
doesn't hurt to update it properly now that versions differ by major
version.
When swapping both values to perform the actual calculation, we need to
consider that `A + B == B + A`, but `A - B != B - A`, so turn it into
`-B + A`.
Co-Authored-By: Sam Atkins <atkinssj@serenityos.org>
These functions were changed to synchronous in #13870 but
the async_ versions were still being called. This led to
frequent crashes when loading local files in Browser.
This also starts making use of the fact we match on any part of the URL
to block on-site trackers such as the ones provided by Ezoic:
```
/greenoaks.gif?
/imp.gif?
/cmbdv2.js
/ezcl.webp?
```
This also promotes some subdomains to the eTLD+1 as I saw other
subdomains being used for these.
This commit removes the file extension in the presented title of images,
and fixes an issue with the previous commit wherein "save as" on an
image would always append ".pp" as an extension, even when the filename
already included this extension.
When creating a new image, a title can be entered. This title was not
used when saving the file however, so naming it was pointless, as the
title used would be whatever was entered during the first save.
This commit makes it so that the default text in the "save as" dialogue
is whatever was entered previously when the image was created.
The new min_content_size value is to be set by the subclasses, it is
then used to determine if the scrollbars should be shown after a
resize, but before the content size will be calculated by the following
layout pass.
This function is intended to propagate layout changes upwards in the
widget hierarchy. Widgets that can know what to do with this
information without causing a full layout invalidation (i.e. just
because one of their child widgets changed layout/size, doesn't
necessairily mean that they have to change their layout/size) can
override this and prevent a full relayout and redraw.
The default size for label is always a compromise, no matter what value
is chosen, some layouts will require local manual overrides.
Having the preferred size be opportunistic_grow in both directions seems
like it's currently the option that works without modification in most
cases.
This commit adds some finagling and shrinking of the corner bitmap
to handle drawing shadows on elements where the shadow radius >
half the width or height of the element. Previously things would
go horribly wrong when this happend.
There could still be some edge cases, but things seem to be working
fairly well now.
This fixes a issue due to the background/border painting using
.to_rounded<int>() to get an IntRect, but shadow painting was using
enclosing_int_rect().
enclosing_int_rect() uses some floors/ceils and does not always match
.to_rounded<int>().
This now allows passing a 'fill_color' to the blur, any fully
transparent pixels will be replaced with this color (with the alpha
set to 0).
For box-shadows, if this color is set to the same as the shadow,
the issues around the fringes are fixed. This also fixes some places
where dark shadows appeared light / the wrong color.