Commit graph

8755 commits

Author SHA1 Message Date
Andreas Kling
421619fe2f Browser: Rejig the "on_load_counter_change" hook when switching tabs
This feels a little shoddy, but we need to make sure that updates end
up on the right statusbar (since there is one statusbar per tab.)
2020-04-25 17:27:55 +02:00
Andreas Kling
9093625546 Browser: Unveil /etc/passwd so we can find our home directory if needed
Fixes #1952.
2020-04-25 17:21:59 +02:00
Andreas Kling
bd45b2b8d3 Browser: Share one BookmarksBarWidget between all Tabs 2020-04-25 17:20:23 +02:00
Andreas Kling
dc6b61dbcc LibGUI: Add ToolBar and ToolBarContainer to Forward.h 2020-04-25 17:20:10 +02:00
Andreas Kling
1887dc6de4 LibGUI: Make ToolBarContainer better at reacting to child events
Now you can remove a ToolBar from a ToolBarContainer and it will update
its own preferred size automatically.
2020-04-25 17:16:05 +02:00
Andreas Kling
9c772a64a1 LibGfx: Don't proceed with GIF format sniffing if stream read fails 2020-04-25 17:03:40 +02:00
Kesse Jones
838127df35 LibJS: Add String.prototype.includes 2020-04-25 16:54:25 +02:00
Drew Stratford
4a37362249 LibPthread: implicitly call pthread_exit on return from start routine.
Previously, when returning from a pthread's start_routine, we would
segfault. Now we instead implicitly call pthread_exit as specified in
the standard.

pthread_create now creates a thread running the new
pthread_create_helper, which properly manages the calling and exiting
of the start_routine supplied to pthread_create. To accomplish this,
the thread's stack initialization has been moved out of
sys$create_thread and into the userspace function create_thread.
2020-04-25 16:51:35 +02:00
Peter Nelson
4cb765e520 LibGfx: Remove unnecessary casts 2020-04-25 16:49:09 +02:00
Peter Nelson
76cbfe1c38 LibGfx: Minor changes to adhere to code style guidelines 2020-04-25 16:49:09 +02:00
Peter Nelson
e159370ccb LibWeb: Handle .gifs as images and use ImageDecoder to decode them 2020-04-25 16:49:09 +02:00
Peter Nelson
a1c0eb1e1d LibGfx: Remove debug output 2020-04-25 16:49:09 +02:00
Peter Nelson
9a2c8102cd LibGfx: Use content sniffing to choose which ImageDecoder plugin to use 2020-04-25 16:49:09 +02:00
Peter Nelson
2cd9716b38 LibGfx: Add a sniff method to ImageDecoder and implement for GIF and PNG
The sniff method is intended to be used for content sniffing. It should be a
cheap test to rapidly rule out whether a candidate image can be successfully
decoded. For the GIF and PNG implementations it simply attempts to decode the
image header, returning true if successful and false if not.
2020-04-25 16:49:09 +02:00
Peter Nelson
df0d6e241c LibGfx: Extract GIF header decoding into separate function 2020-04-25 16:49:09 +02:00
Peter Nelson
d5af7b220c LibGfx: implement remaining GIFImageDecoderPlugin methods 2020-04-25 16:49:09 +02:00
Peter Nelson
e06518211b LibGfx: decode first frame of GIF LZW data
Also:
- Define the GIFLoadingContext structure.
- The load_gif_impl function now returns load operation success, and takes a
  reference to a GIFLoadingContext as input.
- Implement GIFImageDecoderPlugin::bitmap which calls onto load_gif_impl.
2020-04-25 16:49:09 +02:00
Peter Nelson
9c2a675c38 LibGfx: Implement GIF LZW decoding
Add an LZWDecoder class that can decode GIF LZW data.
2020-04-25 16:49:09 +02:00
Andreas Kling
cba9550f1c HackStudio: Toolbar icon overhaul 2020-04-25 14:17:02 +02:00
Itamar
74f41d5f98 HackStudio: Add cpp debugger
The HackStudio debugger integrates with LibDebug to provide
source-level debugging.

The user can set breakpoints at various positions in the source code,
and then run the program in debug mode.

When the program is stopped, the current execution position is
displayed, and the user can insert/remove breakpoints, continue
execution, or single step the program.
2020-04-25 13:16:46 +02:00
Itamar
393560d8a2 HackStudio: GUI support for setting breakpoints on source code lines 2020-04-25 13:16:46 +02:00
Itamar
009b4ea3f4 LibDebug: Add remove_breakpoint
Also, change the interface of all breakpoint management functions to
only take the address of the breakpoint as an argument.
2020-04-25 13:16:46 +02:00
Hüseyin ASLITÜRK
e00b85b8c0 Userland/ls: Remove unnecessary output 2020-04-25 12:09:46 +02:00
Brendan Coles
6dde2c7f47 Browser: Add Browser.ini configuration file
The Browser can now load a home page URL from the user's Browser.ini
configuration file rather than using a hard-coded URL.
2020-04-25 10:55:55 +02:00
Andreas Kling
0f4fa43541 LibGUI: Tweak TabWidget tab icon placement 2020-04-24 22:49:57 +02:00
Andreas Kling
260e4049ff Browser: Use the active tab's favicon as the window icon :^) 2020-04-24 22:47:53 +02:00
Andreas Kling
4d8206f7c2 LibGUI: Use bold font for the currently active TabWidget tab 2020-04-24 22:44:36 +02:00
Andreas Kling
d6bbf12b7c LibGUI: Add "uniform tabs" mode to TabWidget (all tabs have same width)
...and enable this in the main Browser UI. :^)
2020-04-24 22:36:25 +02:00
Andreas Kling
682f0ac93b Browser: React to favicon notifications and put favicons in the tabs! 2020-04-24 22:28:05 +02:00
Andreas Kling
53cb5325ee LibGUI: Allow TabWidget tabs to have icons and custom text alignment 2020-04-24 22:27:46 +02:00
Andreas Kling
2be184f49c LibWeb: Try fetching a favicon when loading a non-file URL in HtmlView
If valid and decodable, the favicon will be provided to clients via the
on_favicon_change hook. :^)
2020-04-24 22:26:53 +02:00
Andreas Kling
3fcfab4404 Browser: Move the "About" action to WindowActions 2020-04-24 20:50:06 +02:00
Andreas Kling
45a932a600 Base: New "cut" action icon 2020-04-24 20:42:34 +02:00
Andreas Kling
dfe8dea2ac Browser: Remove padding from the main TabWidget
This makes the active tab "take over" the whole window UI, even though
it's actually inside a TabWidget.
2020-04-24 20:42:34 +02:00
Andreas Kling
1587b53001 LibGUI: Allow overriding the padding inside a TabWidget 2020-04-24 20:42:34 +02:00
Andreas Kling
9d8620f956 Browser: Add icons for the "new tab" and "close tab" actions 2020-04-24 20:42:34 +02:00
Andreas Kling
2b64cf3efe Base: New "open" and "save" action icons 2020-04-24 20:42:34 +02:00
Andreas Kling
7db0194d4b Base: Tweak Calendar app icon 2020-04-24 20:42:34 +02:00
DexesTTP
424f47cbe5 LibGUI: Fix display issue when selecting multi-lines in TextEditor
When selecting the start of a multi-line line, a selection rect was
displayed for the whole line but the text wasn't rendered properly.
This change prevents the selection rect from being drawn in virtual
lines with no selected characters.
2020-04-24 20:29:47 +02:00
Linus Groh
a832ab0f4e js: Interrupt running script or REPL evaluation when receiving SIGINT 2020-04-24 19:43:34 +02:00
Andreas Kling
c350bb9178 LibGUI: Fix laggy mouse selection in TextEditor widget
We were letting the automatic scrolling timer drive all selection
updates to fix an unwanted acceleration that was happening. However,
if a mousemove occurs *within* the editor widget, we should just
handle it right then and there.
2020-04-24 19:14:22 +02:00
Andreas Kling
344e66caaa LibGUI: Shrink GUI::Splitter by 1 pixel to make it look just right
Splitters were slightly oversized to work around the fact that we
were ignoring 2px on both sides of them. Now that the whole splitter
can be interacted with, we can lose 1px of fat and look great! :^)
2020-04-24 19:05:04 +02:00
Andreas Kling
9617b7ede4 FileManager: Set content margin of DirectoryView to same as children 2020-04-24 19:05:04 +02:00
Andreas Kling
42f0b2522b LibGUI: Introduce widget content margins + improve splitters
A GUI::Widget can now set an optional content margin (4x0 by default.)
Pixels in the content margin will be ignored for hit testing purposes.

Use this to allow frame-like widgets (like GUI::Frame!) to ignore any
mouse events in the frame area, and instead let those go to parent.

This allows GUI::Splitter to react "sooner" to mouse events that were
previously swallowed by the child widgets instead of ending up in the
splitter. The net effect is that 2 more pixels on each side of a
splitter handle are now interactive and usable for splitting! :^)
2020-04-24 19:05:02 +02:00
Andreas Kling
9badcff1ba WindowServer: Don't allow activating disabled menu items with keyboard 2020-04-24 17:29:42 +02:00
Andreas Kling
e786444ffa WindowServer: Fix name typo in descend_into_submenu_at_hovered_item() 2020-04-24 17:26:16 +02:00
Andreas Kling
cbb3c7aade WindowServer: Skip over disabled menu items during keyboard navigation 2020-04-24 17:24:09 +02:00
Andreas Kling
4218b00cb4 Base: Tweak ladybug icon 2020-04-24 17:10:59 +02:00
Andreas Kling
5d88022252 LibGUI: When removing a TabWidget tab, activate the next tab 2020-04-24 17:10:59 +02:00
Kesse Jones
b0ca174d49 LibJS: Add Array.prototype.find 2020-04-24 17:10:19 +02:00