summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-20LibWeb: Deal with Boxes that have a background, border and -radiusTobias Christiansen
This hack allows for Boxes that have a background to be painted and a border to accurately paint their border-radii if needed. For that the box in with the background is drawn is extended to the bordered_rect. The border is later drawn over this regardless. Previously when drawing a Box that had all three, background, border and a border-radius, there could be some white between the filling and the border.
2021-05-20LibWeb: Take border-radius into account when painting bordersTobias Christiansen
This applies to thicker borders. When drawing them we now don't chamfer the corner if there is a border-radius present.
2021-05-20LibWeb: Introduce struct to hold border radii and normalize onceTobias Christiansen
The struct BorderRadiusData contains the four radii of the box. In case the specified borders are too large for the dimensions of the box, they get scaled down.
2021-05-20LibWeb: Draw rounded corners for the backgrounds of BoxesTobias Christiansen
Even if the Box doesn't have a border-radius, we'll pass the rendering of the Box and its corners to the Painter.
2021-05-20LibWeb: Basic rendering of border-radiusTobias Christiansen
It supports all four corners.
2021-05-20LibGfx: Add Painter::draw_circle_arc_intersecting()Tobias Christiansen
This adds a function to draw a circle specified by a center point ( relative to the given Rect) and a radius. The circle arc is only drawn inside the specified Rect as to allow for circle arc segments. Technically this was already possible using draw_elliptical_arc(), but the algorithm is quite involved and lead to wonky arcs when trying to draw circle arc segments.
2021-05-20LibGfx: Add Painter::fill_rect_with_rounded_corners()Tobias Christiansen
This paints a rectangle with rounded corners each specified by a radius.
2021-05-20LibWeb: Resolve shorthand for border-radiusTobias Christiansen
This takes care of the 1, 2, 3 and 4 parameter shorthand of the border- radius identifier. There are more as well as the ominous '/' character but that is for another time. The 2 and 3 parameter versions are weird enough already. I don't think anybody uses anything other than the 1 or 4 parameter version or even the elliptical stuff.
2021-05-20LibWeb: Make border-radius attibutes accessibleTobias Christiansen
2021-05-20LibWeb: Add border-radius to the CSS-parserTobias Christiansen
And resolve the shorthands.
2021-05-20LibWeb: Handle background-painting of Box in seperate functionTobias Christiansen
2021-05-20LibWeb: Move the painting of the border out of paint()Tobias Christiansen
So other Boxes can override this function.
2021-05-20Solitaire: Fix a spelling mistake in one of the variable namesGunnar Beutner
2021-05-20TextEditor+Browser: Enable HTML syntax highlighting on HTML documentsAli Mohammad Pur
2021-05-20LibWeb: Add a super basic HTML syntax highlighterAli Mohammad Pur
This can currently highlight tag names and attribute names/values.
2021-05-20LibWeb: Add position tracking information to HTML tokensAli Mohammad Pur
2021-05-20LibWeb: Sort CMakeLists SOURCES entriesAli Mohammad Pur
2021-05-20Ports: Only do build check for configure, build, and install stepsLinus Groh
This was breaking ports linting, which runs the script with the 'showproperty' option. This check is not needed for some other options as well, so let's do it conditionally.
2021-05-20LibGUI: Don't mark "open" FilePicker as done if the file is not foundAndreas Kling
If you type in a filename that doesn't exist, show an error message instead of closing the FilePicker "successfully."
2021-05-20LibGUI: Make GUI::FilePicker handle absolute paths betterAndreas Kling
Some people apparently like to type in full absolute paths into the filename box of GUI::FilePicker. So let's handle that as you'd expect by using the full path as the selected path.
2021-05-20LibGUI: Tweak API for getting the selected pathAndreas Kling
Return a String instead of a LexicalPath. Also call it a path instead of a file since that's what we're really returning.
2021-05-20LibGfx: Remove Gfx::FontDatabase::default_bold_fixed_width_font()Andreas Kling
Ask for a bold_variant() of the default_fixed_width_font() instead.
2021-05-20LibGfx: Remove Gfx::FontDatabase::default_bold_font()Andreas Kling
Instead use default_font().bold_variant() in cases where we want a bold variant of the default font. :^)
2021-05-20Ports: Add build completion sanity check to .port_include.shLinus Groh
Simply by checking whether a built libc.so exists, we should be able to avoid strange build errors where that's not the case and just tell the user upfront. Fixes #7309.
2021-05-20Variant: Remove redundant inline keywordLenny Maiorani
Problem: - `constexpr inline` is redundant because `constexpr` implies `inline`. Solution: - Remove redundancy.
2021-05-20HexEditor: find_and_highlight: Limit search to remaining buffer sizeBrendan Coles
2021-05-20Kernel: Stop allocating the PS2KeyboardDevice in the eternal heapIdan Horowitz
The PS2KeyboardDevice can be free'd in try_to_initialize if the initialization failed, resulting in an assertion.
2021-05-20StateMachineGenerator: Put output into the CMake build directoryAndreas Kling
Don't pollute the source directory with generated code.
2021-05-20WindowServer+DisplaySettings: Remove the weird "simple" wallpaper modeAndreas Kling
Painting the wallpaper at 100% scale in the top left corner is a weird mode and I don't think we need it. :^)
2021-05-20DisplaySettings: Improve wallpaper preview codeAndreas Kling
Previously, this code would create a bitmap with the size of the screen resolution, draw the new wallpaper into it, and then scale it down for display inside the MonitorWidget. This was done on every paint event, which made the code quite slow and allocation-happy. Instead of this, we now scale down the new wallpaper to a miniature of the same scale as the little MonitorWidget screen. The miniature is then used for tiling, etc. The miniature is cached and reused across paint events if nothing else changes.
2021-05-203DFileViewer: Remove unveil() calls and add "thread" pledgeAndreas Kling
An application that allows opening arbitrary files from the filesystem needs to allow itself to access the filesystem, otherwise there's no point in supporting the feature. :^) And the "thread" pledge is needed for background thumbnail generation.
2021-05-20Base: Update ladyball icons based on new variant from myphsAndreas Kling
2021-05-20Meta: Make generate_state_machine() generate a proper targetAli Mohammad Pur
And use GENERATED_SOURCES (or add_dependencies) to make LibVT depend on that target. Fixes a FIXME.
2021-05-20Meta: Add my email(s) to .mailmapAli Mohammad Pur
Also map the author name I used before to my current proper name.
2021-05-20Meta: Add my other e-mail address to .mailmapGunnar Beutner
2021-05-20Kernel: Fix regression, removing a ProcessGroup that not in the listBrian Gianforcaro
I introduced this bug in e95eb7a51, where it's possible that the ProcessGroup is created, but we never add it to the list. Make sure we check that we are in the list before removal. This only broke booting in self-test mode oddly enough. Reported-By: Andrew Kaster <andrewdkaster@gmail.com>
2021-05-20Meta: Add a .mailmap file to map email addresses to the same comitterBrian Gianforcaro
.mailmap files are documented here: https://git-scm.com/docs/gitmailmap
2021-05-20Kernel: Use the Function class for smp_broadcast()/smp_unicast()Gunnar Beutner
This avoids allocations for smp_broadcast() and smp_unicast() by using the Function class.
2021-05-20Kernel: Use the Function class for deferred_call_queue()Gunnar Beutner
This avoids allocations for deferred_call_queue().
2021-05-20Kernel: Remove an allocation when blocking a threadGunnar Beutner
When blocking a thread with a timeout we would previously allocate a Timer object. This removes the allocation for that Timer object.
2021-05-20AK: Don't unlink intrusive list elements in the destructorGunnar Beutner
Removing the element from the intrusive linked list might not be safe if doing so requires a lock. Instead this is something the caller should have done so let's verify instead that we're not on any lists.
2021-05-20LibChess: Fixed PGN export bug (#7300)Josh Perry
In cases with ambiguous captures involving pawns (where multiple pieces could have made the capture), we were exporting invalid syntax for the move: `1. e4 e5 2. Bb5 c6 3. Bxc6 ddxc6` Move 3 should be `Bxc6 dxc6`, but we were duplicating the d on the pawn move.
2021-05-20Inspector: Throw an error when inspecting a process it has no access toAnand
2021-05-20Kernel: Avoid allocating under spinlock in ProcessGroup::find_or_createBrian Gianforcaro
Avoid allocating while holding the g_process_groups_lock spinlock, it's a pattern that has a negative effect on performance and scalability, especially given that it is a global lock, reachable by all processes.
2021-05-20Kernel: Make ProcessGroup::find_or_create API OOM safeBrian Gianforcaro
Make ProcessGroup::find_or_create & ProcessGroup::create OOM safe, by moving to adopt_ref_if_nonnull.
2021-05-20Kernel: Remove s_processor_lock by making s_processors statically sizedBrian Gianforcaro
Currently in SMP mode we hard code support for up to only 8 processors. There is no reason for this to be a dynamic allocation that needs to be guarded by a spinlock. Instead use a Array<T* with inline storage of 8, allowing each processor to initialize it self in place, avoiding all the need for locks.
2021-05-20Kernel: Do not allocate AnonymousVMObject's under spin lockBrian Gianforcaro
Spinlocks guard short regions, with hopefully no other locks being taken in the process. Violating constraints usually had detrimental effects on platform stability as well as performance and scalability. Allocating memory takes it own locks, and can in some cases even allocate new regions, and thus violates these tenants. Move the AnonymousVMObject creation outside of the spinlock as creation does not modify any shared state.
2021-05-20Meta: Mark the other image file formats as binary in .gitattributesBrian Gianforcaro
We had rules for .png and .jpg files, but we have not maintained the list as support for other file formats has been added. To test these changes test files have been committed for each of these formats. This change updates the list with all of the binary image file types I was able to find in the tree at the time of writing.
2021-05-20Meta: Cleanup stale rules from .gitignoreBrian Gianforcaro
The wild card rules at the top of the .gitignore came from a time when the build wrote back to the git repository and placed files right next to the source. (Original commit that introduced them 37c27e2e, they were later consolidated into the root .gitignore in 802d4dc) We have since moved to cmake, and these rules have become obsolete, and they just cause issues where we need to go and add negations for these rules in order for things to work. A previous change attempted to remove the top wild card rules (PR #4565) but it was later reverted, as they forgot to remove the top ignore everything rule '*', so all files were ignored. This change just removes all of these rules that no longer make sense, restoring a bit of sanity. *.o,*.d,*.a rules were also from when the build wrote to the repository, they are now defunct. The same goes for the *Endpoint.h and CMakeFiles rules. The lowercase build directory can be removed as we've standardized on the uppercase 'Build' directory as the root of the build output dir.
2021-05-19Bitmap: De-duplicate bitmasksLenny Maiorani
Problem: - Bitmasks are duplicated. - Bitmasks are C-style arrays. Solution: - Move bitmasks to BitmapView.h. - Change C-style arrays to be AK::Array for added safety.