Age | Commit message (Collapse) | Author |
|
Currently, we have NotA and NotAn, to be used dependent on whether the
following word begins with a vowel or not. To avoid this, change the
wording on NotA to be independent of this context.
|
|
|
|
|
|
Instead, override visit_edges() and mark the values like any other Cell
subclass would.
This makes PromiseValueList play nice with zombification.
|
|
This fixes an issue with false positives in the GC zombie debugger.
|
|
Turns a bunch of FlyString copies into moves.
|
|
This removes the awkward String::replace API which was the only String
API which mutated the String and replaces it with a new immutable
version that returns a new String with the replacements applied. This
also fixes a couple of UAFs that were caused by the use of this API.
As an optimization an equivalent StringView::replace API was also added
to remove an unnecessary String allocations in the format of:
`String { view }.replace(...);`
|
|
There's no need to create a new String just to count the amount of
occurrences of a substring.
|
|
This was needlessly copying StringView arguments, and was also using
strstr internally, which meant it was doing a bunch of unnecessary
strlen calls on it. This also moves the implementation to StringUtils
to allow API consistency between String and StringView.
|
|
In many cases we can lean on the name of a menu to reduce verbosity.
"View"->"Visualize/Show/Turn on/etc" is a bit redundant and clutters
the menu. It's a little thing, but it makes the system feel more
tightly integrated if we stick to the same word patterns across apps.
|
|
|
|
|
|
|
|
|
|
|
|
This commit adds a `ColorSelectOverlay` class, and uses it to
allow the user to pick a color from the screen. The API for
`ColorSelectOverlay` is inspired from the `SelectableOverlay`
in `Utilities/shot.cpp`. In particular, it opens up it's own
window, so that we can have control over the cursor over the
whole screen.
There's one thing notably different: In addition to returning the
final selected color from the `exec()` function, it also provides
an `on_color_changed()` hook, which can be used to (optionally)
get live updated as the mouse is moving around.
This is a bit odd, but allows us to use the preview widget of the
color picker to see the current color under the mouse (which will
be selected upon clicking). When trying to select the color from
text / other small elements, this is very useful.
|
|
This allows any client to ask the WindowServer to give it the color
of the screen bitmap under the cursor.
There's currently no way to get the screen bitmap *without* the
cursor already drawn on it, so for now we just take a pixel
beside the actual cursor position to avoid just getting the cursors
color.
|
|
This just returns the color of a given pixel position from the
front bitmap of the corresponding screen.
|
|
These interfaces are broken for about 9 months, maybe longer than that.
At this point, this is just a dead code nobody tests or tries to use, so
let's remove it instead of keeping a stale code just for the sake of
keeping it and hoping someone will fix it.
To better justify this, I read that OpenBSD removed loadable kernel
modules in 5.7 release (2014), mainly for the same reason we do -
nobody used it so they had no good reason to maintain it.
Still, OpenBSD had LKMs being effectively working, which is not the
current state in our project for a long time.
An arguably better approach to minimize the Kernel image size is to
allow dropping drivers and features while compiling a new image.
|
|
While the WeakMap only holds a weak reference to its keys, their
accompanying values should be kept alive as long as they're accessible.
|
|
|
|
Not just if it's an Object (which is one kind of Cell).
|
|
The forward transition cache in Shape uses WeakPtr<Shape> to learn when
a cached transition has been garbage collected.
When running in zombification mode, we have to explicitly revoke any
outstanding WeakPtrs to a Shape when it becomes a zombie. That ensures
that it gets pruned from transition caches.
|
|
|
|
When poisoning HeapBlock::m_storage, we have to compute the storage size
by excluding the HeapBlock header.
|
|
This patch adds a `-z` option to js and test-js. When run in this mode,
garbage cells are never actually destroyed. We instead keep them around
in a special zombie state.
This allows us to validate that zombies don't get marked in future GC
scans (since there were not supposed to be any more references!) :^)
Cells get notified when they become a zombie (via did_become_zombie())
and this is used by WeakContainer cells to deregister themselves from
the heap.
|
|
... and `Window.scrollTo()`, which is an alias for `scroll()`.
There is still work that needs to be done here, regarding bringing the
scroll position calculation in line with the spec. Currently we get the
viewport rect from outside, and treat it as if it was the result of
calculating steps 5-9 of the `scroll()` method. But it works. :^)
|
|
...and pageXOffset/pageYOffset too, since those are just aliases for the
same thing.
|
|
This call sets the absolute scroll position for the window.
|
|
This is in preparation for implementing JS scrolling functions, which
specify both x and y scrolling deltas. The visible behavior has not
changed.
Also, moved the "mouse wheel delta * 20" calculation to the
`EventHandler` since the JS calls will want to work directly in pixels.
|
|
|
|
Command used:
grep -Pirn '(out|warn)ln\((?!["\)]|format,|stderr,|stdout,|output, ")' \
AK Kernel/ Tests/ Userland/
(Plus some manual reviewing.)
Let's pick ArgsParser as an example:
outln(file, m_general_help);
This will fail at runtime if the general help happens to contain braces.
Even if this transformation turns out to be unnecessary in a place or
two, this way the code is "more obviously" correct.
|
|
I forgot that we need to also initialize SerialDevice and also to ensure
it creates a sysfs node properly. Although I had a better fix for this,
it keeps the CI happy, so for now it's more than enough :)
|
|
A quick grep revealed these stats (counting only the first occurrence
per line):
`thing`(1): 154
`thing(1)`: 9
thing(1): 4
This commit converts all occurrences to the `thing`(1) format.
|
|
|
|
|
|
|
|
|
|
Let's use Base::visit_edges() when calling the base class, to prevent
accidentally skipping over anyone in the inheritance chain.
|
|
|
|
|
|
It always returns the empty string for now.
|
|
GithubFlavoredMarkdown sees the angled brackets (<>) and censors them.
Perhaps because it does not allow HTML tags in headings.
|
|
You can now toggle on/off the visibility of the pixel grid from
the View menu, if you don't want it shown for some reason.
|
|
The editor now draws a grid showing the pixels if you are zoomed
in enough. Currently the threshold is a scale of 15 (so if one
pixel side on the image takes up > 15 pixels in the editor)
|
|
|
|
|
|
|
|
|
|
|