summaryrefslogtreecommitdiff
path: root/Libraries
AgeCommit message (Collapse)Author
2020-08-06LibLine: Fix "word" handling for alt-d/u/l/c/f/b and ctrl-left/rightNico Weber
All these shortcuts treat consecutive alnums as a word, not consecutive non-spaces. For example, `alias KILL='kill -9'` can now be written by typing it out lowercase, then hitting ctrl-a alt-f alt-u. Ctrl-W still treats a word as a sequence of non-spaces. Alt-backspace in a future patch will add the ability to backward-delete a word that's a sequence of alnums.
2020-08-06LibLine+Shell: Remove unused split_mechanismNico Weber
It was only read in should_break_token(), which had no callers. should_break_token() also got `foo\\ bar` and `"foo bar"` wrong.
2020-08-06LibLine: Add binding for Alt-.Nico Weber
2020-08-06LibWeb: Move text selection serialization from PageView to FrameAndreas Kling
This logic doesn't depend on anything at the widget layer, so it can move down to the frame layer.
2020-08-06LibLine: Add bindings for Alt-u, Alt-l, Alt-cNico Weber
2020-08-06LibLine: Add comments for which keys trigger VWERASE and VKILLNico Weber
2020-08-06LibLine: Add Alt-d binding to forward-delete a wordNico Weber
2020-08-06LibThread: Remove redundant r/w of atomic variable in Lock::lock() (#3013)Muhammad Zahalqa
m_holder.compare_exchange_strong(expected, desired, ...) will either successfully update the value to desired if == expected or put the current value in expected otherwise.
2020-08-06Shell: Start adding some alt shortcutsNico Weber
This adds Alt-f to go forward by a word, and Alt-b to go backward by a word (like ctrl-arrow-left / ctrl-arrow-right already do). Behind the scenes, alt-key is implemented by sending <esc> followed by that key, and typing <esc> f/b for moving by a word hence works too (in all other shells too, not just in Serenity's). While here, rename some InputState enum values to make the slightly expanded use of <esc> clearer, and expand a few comments.
2020-08-06Kernel+LibKeyboard: Store the keymap name when setting system keymapValtteri Koskivuori
This way we can query the kernel to see which keymap is currently in use.
2020-08-06AK+Kernel+LibC: Add vdbgprintf()Andreas Kling
This is like dbgprintf() except it takes a va_list instead of ...
2020-08-06LibDebug: Unbreak LineProgram::parse_source_directories()Andreas Kling
This regressed with ac9f6fd1f8e235039fa3416f6ed68d07cbbf896c where we switched to using InputMemoryStream.
2020-08-06LibDebug: Fix bitrotted DWARF_DEBUG codeAndreas Kling
2020-08-06Refactor: Expose const_cast by removing ByteBuffer::warp(const void*, size_t)asynts
This function did a const_cast internally which made the call side look "safe". This method is removed completely and call sites are replaced with ByteBuffer::wrap(const_cast<void*>(data), size) which makes the behaviour obvious.
2020-08-06LibDebug: Use InputMemoryStream instead of BufferStream.asynts
This removes another call to ByteBuffer::wrap(const void*, size_t).
2020-08-06AK: Rename MakeUnsigned::type to MakeUnsigned::Type.asynts
Also renames MakeSigned::type to MakeSigned::Type.
2020-08-05Unicode: Try s/codepoint/code_point/g againNico Weber
This time, without trailing 's'. Ran: git grep -l 'codepoint' | xargs sed -ie 's/codepoint/code_point/g
2020-08-05Revert "Unicode: s/codepoint/code_point/g"Nico Weber
This reverts commit ea9ac3155d1774f13ac4e9a96605c0e85a8f299e. It replaced "codepoint" with "code_points", not "code_point".
2020-08-05LibCore+Base: Move user-specific config files to $HOME/.configAndreas Kling
2020-08-05LibLine: Check if operating on a TTY before using TTY featuresAnotherTest
This makes the line editor behave well when input is passed in from pipes as well.
2020-08-05LibGUI: Use set_cursor() in TextEditor::set_document()Linus Groh
Instead of setting m_cursor directly to reset the cursor position, TextEditor::set_document() now uses set_cursor() which will call cursor change callback functions, if any. This fixes a bug in HackStudio where the cursor information text would not update immediately after changing the active TextDocument, even though the cursor is always visibly being reset to 0, 0.
2020-08-05LibWeb: Specialize hit testing for text cursor purposesAndreas Kling
The text cursor follows slightly different "intuitive" rules than the regular hit testing. Clicking past the right edge of a text box should still "hit" the text box, and place the cursor at its end, for example. We solve this by adding a HitTestType enum that is passed to hit_test() and determines whether past-the-edge candidates are considered.
2020-08-05LibGfx: Make draw_scaled_bitmap() apply relative opacityAndreas Kling
Instead of overriding the alpha value of all source pixels, apply the override opacity by multiplying with the source alpha. Fixes #3004.
2020-08-05LibTLS + LibCrypto: Suppress unobserved Optoinal<T> return values.Brian Gianforcaro
2020-08-05Kernel + LibPthread: Use Userspace<T> in the create_thread syscallBrian Gianforcaro
2020-08-04Revert "LibM: Always include <math.h> instead of <LibM/math.h>"Andreas Kling
This reverts commit dc12cbca41b8b667ae7ced1066647d47186d1557. Sadly this broke the build due to some confusion about <new>. Reverting until this can be solved fully.
2020-08-04LibM: Always include <math.h> instead of <LibM/math.h>Andreas Kling
This makes Lagom pick up the host math.h, which is what we want.
2020-08-04Kernel+LibC: Tidy up sys$ttyname() and sys$ptsname()Andreas Kling
- Remove goofy _r suffix from syscall names. - Don't take a signed buffer size. - Use Userspace<T>. - Make TTY::tty_name() return a String instead of a StringView.
2020-08-04Kernel+LibC: Add sys$disown() for disowning child processesAndreas Kling
This syscall allows a parent process to disown a child process, setting its parent PID to 0. Unparented processes are automatically reaped by the kernel upon exit, and no sys$waitid() is required. This will make it much nicer to do spawn-and-forget which is common in the GUI environment.
2020-08-04LibGemini: Remove unused private field m_queued_finishNico Weber
2020-08-04LibX86: Remove unused private fields m_segment, m_handlerNico Weber
2020-08-04LibLine: Removed unused private field m_prompt_metricsNico Weber
2020-08-04Build: Support make's and ninja's restat optimizationNico Weber
After running a build command, make by default stat()s the command's output, and if it wasn't touched, then it cancels all build steps that were scheduled only because this command was expected to change the output. Ninja has the same feature, but it's opt-in behind the per-command "restat = 1" setting. However, CMake enables it by default for all custom commands. Use Meta/write-only-on-difference.sh to write the output to a temporary file, and then copy the temporary file only to the final location if the contents of the output have changed since last time. write-only-on-difference.sh automatically creates the output's parent directory, so stop doing that in CMake. Reduces the number of build steps that run after touching a file in LibCore from 522 to 312. Since we now no longer trigger the CMake special case "If COMMAND specifies an executable target name (created by the add_executable() command), it will automatically be replaced by the location of the executable created at build time", we now need to use qualified paths to the generators. Somewhat related to #2877.
2020-08-04LibJS: The Math.ceil() of a number between -1 and 0 should be -0,Melissa Goad
according to the spec.
2020-08-04LibCompress: Add LibCompressstelar7
For now this only contains DEFLATE, and a very simple Zlib Eventually GZip, etc. can go here as well.
2020-08-04LibWeb: Make sure that head and body always get the HTML elementLuke
Now that document element returns a generic DOM element, we need to make sure head and body get a html element. The spec just says to check if the document element is a html element, so let's do that.
2020-08-03LibWeb: Add a very basic test for Text node APIs ("data" and "length")Andreas Kling
2020-08-03LibWeb: Add CharacterData and Text IDL interfacesAndreas Kling
2020-08-03LibWeb: Reorganize tests into DOM/ and HTML/Andreas Kling
2020-08-03LibWeb: Add Element.{next,previous}ElementSibling IDL attributesAndreas Kling
2020-08-03LibWeb: Move "element sibling" getters to NonDocumentTypeChildNodeAndreas Kling
Here's another CRTP mixin since that's the best we can do with C++. This prepares exposing these via IDL on Element and CharacterData.
2020-08-03LibWeb: Send key events to the WebContent processAndreas Kling
This makes contenteditable work in multi-process mode. :^)
2020-08-03Unicode: s/codepoint/code_point/gAndreas Kling
Unicode calls them "code points" so let's follow their style.
2020-08-03LibGUI: WidgetScrollable scrolls horizontally when shift is pressedMathieu PATUREL
2020-08-03LibIPC: Fix waiting for specific messageTom
When waiting for a specific message, only consider messages from the peer endpoint. Otherwise a message with the same id for the local endpoint may be misinterpreted. This fixes the Terminal sometimes hanging after bootup because a local endpoint message is mistaken for the CreateMenuResponse message.
2020-08-03CppLexer: Actually give raw strings type RawStringNico Weber
This fixes a regrettable mistake in 9ee1edae2aefcb95e. No behavior change.
2020-08-03LibWeb: Add the Document.documentElement APIAndreas Kling
Also change DOM::Document::document_element() to return an Element* and not an HTML::HTMLHtmlElement since that's not the only kind of documentElement we might encounter.
2020-08-03LibWeb: Move contentEditable from Element to HTMLElementLuke
HTMLElement is the only interface that includes ElementContentEditable in the HTML specification. This makes sense, as Element is also a base class for elements in other specifications such as SVG, which definitely shouldn't be editable. Also adds a test for the attribute based on what Andreas did in the video that added it.
2020-08-02LibCore: ConfFile::read_entry should not sneakily write default entriesBrian Gianforcaro
I noticed on boot, WindowServer was getting an veil error: [WindowServer(13:13)]: Rejecting path '/res/themes/Default.ini' since it hasn't been unveiled with 'c' permission. [WindowServer(13:13)]: 0xc014367f _ZN6Kernel3VFS34validate_path_against_process_veilEN2AK10StringViewEi +681 [WindowServer(13:13)]: 0xc01439d7 _ZN6Kernel3VFS12resolve_pathEN2AK10StringViewERNS_7CustodyEPNS1_6RefPtrIS3_EEii +163 [WindowServer(13:13)]: 0xc0143d03 _ZN6Kernel3VFS4openEN2AK10StringViewEitRNS_7CustodyENS1_8OptionalINS_9UidAndGidEEE +121 [WindowServer(13:13)]: 0xc016fbc4 _ZN6Kernel7Process8sys$openEPKNS_7Syscall14SC_open_paramsE +854 [WindowServer(13:13)]: 0xc0164af8 syscall_handler +1320 [WindowServer(13:13)]: 0xc0164541 syscall_asm_entry +49 [WindowServer(13:13)]: 0x08097ca0 open_with_path_length +24 [WindowServer(13:13)]: 0x08097cf8 open +63 [WindowServer(13:13)]: 0x080a3c59 fopen +31 [WindowServer(13:13)]: 0x0806abf0 _ZN4Core10ConfigFile4syncEv +48 [WindowServer(13:13)]: 0x0806af6a _ZN4Core10ConfigFileD2Ev +16 [WindowServer(13:13)]: 0x08093e2a _ZN3Gfx17load_system_themeERKN2AK6StringE +1869 [WindowServer(13:13)]: 0x08048633 main +491 [WindowServer(13:13)]: 0x08048dae _start +94 With some digging I found out that the ConfigFile class was causing trying to flush writes of default values, not present in the .ini file back to disk on destruction of the object. This sneaky behavior from ConfigFile seems to violate the public facing semantics of the function (it's const). It also makes it very hard to reason about the system with technologies like unveil where we are trying to explicitly state what is exposed to apps, how those exposed items can be used. The functionality also doesn't seem to be all that useful, as we'll just return the default value from the API's anyway. This change removes the write back of default values.
2020-08-02AK: Fix overflow and mixed-signedness issues in binary_search() (#2961)Muhammad Zahalqa