Commit Graph

38996 Commits

Author SHA1 Message Date
Andrew Kaster
d889294036 Toolchain: Format llvm patches per new patch format
This removes the patch series 1/N comments, git version at the bottom of
the patch, and zeros out the original commit hash.
2022-06-30 12:34:16 +01:00
Andrew Kaster
a80493d221 LibC: Align _ctype_ to newlib's implementation
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.
2022-06-30 12:34:16 +01:00
Andrew Kaster
6223841d69 Tests: Add tests for <ctype.h> functions declared in the C Standard 2022-06-30 12:34:16 +01:00
Andrew Kaster
6d4cfba596 Ports/ruby: Pass proper --with-coroutine flag per architecture
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.
2022-06-30 12:29:18 +01:00
Andrew Kaster
809852aeb1 Toolchain+Ports: Install host ruby into Local/ruby, not Local/$ARCH
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.
2022-06-30 12:29:18 +01:00
Andrew Kaster
dcc0f299be Toolchain+Ports: Install host python into Local/python, not Local/$ARCH
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.
2022-06-30 12:29:18 +01:00
Tim Schumacher
242bbf1be4 Toolchain: Set '/' as default division character for binutils
While we are at it, regenerate the patch and remove some outdated parts
of the description.
2022-06-30 12:27:17 +01:00
Karol Kosek
9aafaec259 LibGfx: Use ZlibCompressor for compressing PNG files
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
2022-06-30 12:26:49 +01:00
Karol Kosek
0de0de3536 LibCompress: Implement a Zlib compressor 2022-06-30 12:26:49 +01:00
Karol Kosek
42abe1df77 LibCompress: Use newly created Zlib header structure when decompressing
This way we can get rid of some magic numbers.
2022-06-30 12:26:49 +01:00
Karol Kosek
20575ea1f3 LibCompress: Add Zlib header structure 2022-06-30 12:26:49 +01:00
martinfalisse
f33979a753 SQLStudio: Add collapsible tabs for query results
Adds tabs under the editor and places the query results there. It is
only displayed if there are results to an executed query.
2022-06-30 12:22:45 +01:00
martinfalisse
e9541bca31 SQLStudio: Show script execution results in table
Show the results of executing a script in the TableView (if there are
results to show).
2022-06-30 12:22:45 +01:00
martinfalisse
061525282f SQLStudio: Execute statements in SQL server
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.
2022-06-30 12:22:45 +01:00
martinfalisse
4461dad0f3 SQLStudio: Add GUI for query results
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.
2022-06-30 12:22:45 +01:00
Cyber Gsus
224924885d Documentation: Bump compiler version to 12.1.0 in include paths
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.
2022-06-30 13:16:40 +02:00
Linus Groh
3c9bf1e161 Base: Add example for calc(<percentage> - <length>) to calc.html
`calc(<percentage> + -<length>)` did work before, but a direct
`calc(<percentage> - <length>)` was broken. Let's have a test for both.
2022-06-30 12:11:57 +01:00
Linus Groh
b3a22c97cd Base: Fix label/actual style mismatches in calc.html 2022-06-30 12:11:57 +01:00
Linus Groh
26fc01eecb LibWeb/CSS: Fix incorrect calc(<percentage> - <value>) computations
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>
2022-06-30 12:11:57 +01:00
jmdeejay
c1acb587d7 Base: Add new Canadian keyboard mappings 2022-06-30 12:00:10 +01:00
MacDue
5b9d7bb335 FileSystemAccessServer: Call window stealing functions sync
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.
2022-06-30 11:15:24 +01:00
Tim Schumacher
154f3dc4ae Ports: Add a port of e2fsprogs 2022-06-30 11:57:49 +02:00
Tim Schumacher
6d4d6c3e2a LibC: Implement wcswidth 2022-06-30 11:57:49 +02:00
Tim Schumacher
9497cc6c97 LibC: Stub out brk and sbrk 2022-06-30 11:57:49 +02:00
Tim Schumacher
e2036ca2ca LibELF: Store the full file path in DynamicObject
Otherwise, our `dirname` call on the parent object will always be empty
when trying to resolve dependencies.
2022-06-30 11:57:10 +02:00
Luke Wilde
dc805e6c81 Base: Sort the default content list in ascending order 2022-06-30 11:55:25 +02:00
Luke Wilde
b23819fb19 Base: Add 300+ ads and trackers to the default content filter list
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.
2022-06-30 11:55:25 +02:00
Lennon Donaghy
fbb8893513 PixelPaint: Omit file extension in tab/editor titles
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.
2022-06-30 11:54:29 +02:00
Lennon Donaghy
7919b4368e PixelPaint: Use image title as default filename for "save as"
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.
2022-06-30 11:54:29 +02:00
FrHun
307d113594 Spreadsheet: Make conditional-formatting condition-list scrollable 2022-06-30 11:53:50 +02:00
FrHun
fddd2bf6ff LibGUI: Add min_content_size debug property to AbstractScrollableWidget
This helps with debugging subclasses of AbstractScrollableWidget
2022-06-30 11:53:50 +02:00
FrHun
247e3ef6e7 LibGUI: Add custom layout change handling to ScrollableContainerWidget 2022-06-30 11:53:50 +02:00
FrHun
d0a418540e LibGUI: Fix flickering scrollbars in AbstractScrollableWidget
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.
2022-06-30 11:53:50 +02:00
FrHun
6f9777d35b LibGUI: Add layout change propagation to Widget
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.
2022-06-30 11:53:50 +02:00
FrHun
f59c167bb0 Applications+Games+LibGUI: Fix layout problems 2022-06-30 11:51:25 +02:00
FrHun
c2d344bd8c ThemeEditor: Fix layout for new layout system 2022-06-30 11:51:25 +02:00
FrHun
93112458b8 Spreadsheet: Use new layout system 2022-06-30 11:51:25 +02:00
FrHun
39c8590720 LibGUI: Change Label standard preferred height to opportunistic grow
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.
2022-06-30 11:51:25 +02:00
MacDue
104642507a LibWeb: Fix box-shadows on elements smaller than the blur diameter
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.
2022-06-30 11:16:22 +02:00
MacDue
97e2e40e4c LibWeb: Fix off-by-one shadow position on non-integer positioned boxes
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>().
2022-06-30 11:16:22 +02:00
MacDue
cb010fd1f8 LibWeb+LibGfx: Fix 'halo' effect around the fringes of shadows
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.
2022-06-30 11:16:22 +02:00
MacDue
eb3bbb1ddf LibWeb: Switch to using StackBlurFilter for shadow painting
With this change the blur no longer dominates the profile. On my PC
it is down to 27% (which is the same as the AA ellipse painting).

The box-shadow.html test page now also feels more responsive.
2022-06-30 11:16:22 +02:00
MacDue
7f8cf81f7a LibGfx: Add StackBlurFilter, an efficient almost gaussian blur
This adds an implementation of StackBlur which is a very efficient
blur that closely approximates a gaussian blur. It has a number of
benefits over the existing FastBoxBlurFilter:

1. It's faster (~half the pixel lookups of a single box blur pass)
2. It only requires a single pass over image to produce good results
  - (Rather than the 3 the box blur requires)
3. It only needs to allocate a buffer of `blur_radius * 2 + 1` colors
  - These easily fits on the stack for any reasonable radius

For a detailed explanation of the algorithm check out this link:
https://observablehq.com/@jobleonard/mario-klingemans-stackblur
2022-06-30 11:16:22 +02:00
MacDue
072a78b958 AK: Add AK::ceil(float) and AK::ceil_log2(integer)
Co-authored-by: Leon Albrecht <leon2002.la@gmail.com>
2022-06-30 11:16:22 +02:00
Luke Wilde
1e36224321 LibWeb: Print unhandled rejections the same way as unhandled exceptions 2022-06-29 21:21:50 +01:00
Luke Wilde
62491cda0b LibWeb: Use CSO if running script is null in HostPromiseRejectionTracker 2022-06-29 21:21:50 +01:00
Luke Wilde
1d5b03ce17 LibWeb: Store PromiseRejectionEvent::m_reason in a JS::Handle 2022-06-29 21:21:50 +01:00
Luke Wilde
17a26853e1 LibWeb: Move ClassicScript::m_settings_object into the Script base
All Scripts have an associated settings object.
https://html.spec.whatwg.org/multipage/webappapis.html#settings-object
2022-06-29 21:21:50 +01:00
Luke Wilde
885c6b6678 LibWeb: Return instead of throwing on unknown enums in attribute setters
I saw one site relying on this, where they are trying to set
XHR.responseType to "text/plain", which is not a valid responseType.
However, they also don't expect it to throw. The IDL spec special cases
enumerations to make it return instead of throwing in this case.
2022-06-29 21:21:50 +01:00
Luke Wilde
3fe66bddf4 LibWeb: Implement WindowEventHandlers 2022-06-29 21:21:50 +01:00