summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2021-04-13HackStudio+LibCpp: Include class members in LocatorItamar
2021-04-13LibJS: Array.from mapFn fixes + thisArg supporttuqqu
* Callback mapFn now properly supports second argument (index) * Support of thisArg to be passed as "this" in vm.call * Tests for all cases
2021-04-13LibGUI+HackStudio: Add way to tell FilePicker to open a folderFalseHonesty
This now means that when trying to open a folder, one can click on the folder and press open instead of having to actually step into the desired folder. Of course, it also means it won't let you open non-directories anymore.
2021-04-13LibC: getaddrinfo: Set addrinfo sin_port to 0 if service arg is NULLBrendan Coles
2021-04-13LibGUI: Allow GUI::ProgressBar to have min() == max()Andreas Kling
2021-04-12LibC: Implement getaddrinfo(), freeaddrinfo(), gai_strerror() and getnameinfo()Gunnar Beutner
2021-04-12LibC: The port numbers returned by getservby*() should be in network byte orderGunnar Beutner
2021-04-12LibC: Validate the len argument for inet_ntop()Gunnar Beutner
2021-04-12LibDebug: Stop parsing unhandled variable typesFalseHonesty
Previously, when trying to debug variables with more complex types (such as String), we would crash the debugger simply because it didn't know how to handle types that were irrelevant anyways. Now we just skip data we don't yet know how to handle.
2021-04-12LibDebug+HackStudio: Fix crashes relating to debugger variable previewFalseHonesty
For one, viewing a variable who's type contained a subprogram will no longer crash HackStudio. Additionally, the variable view will handle invalid enum values gracefully now, fixing another crash. Finally, deeply nested (nest count > 1) structures will have their memory addresses properly set, fixing the final crash I found.
2021-04-12LibC: Use dbgln() in strerror() and strsignal()Gunnar Beutner
Printing error messages to stdout can have unintended side effects depending on what the program is doing.
2021-04-12LibC: Turn CRASH() into a function and add noreturn attributeGunnar Beutner
This way CRASH() can be used in functions that are themselves marked as noreturn.
2021-04-12LibWeb: Set border width to zero if style is noneEgor Ananyin
2021-04-12LibWeb: Parse border-style correctlyEgor Ananyin
2021-04-12LibArchive: Support POSIX.1-1988 tar filesPeter Elliott
These old tar files didn't have magic numbers, so I've also added a checksum check to TarInputStream::valid()
2021-04-12LibJS: Memoize failed calls of try_parse_arrow_function_expression()Stephan Unverwerth
2021-04-12LibJS: Make Errors fully spec compliantLinus Groh
The previous handling of the name and message properties specifically was breaking websites that created their own error types and relied on the error prototype working correctly - not assuming an JS::Error this object, that is. The way it works now, and it is supposed to work, is: - Error.prototype.name and Error.prototype.message just have initial string values and are no longer getters/setters - When constructing an error with a message, we create a regular property on the newly created object, so a lookup of the message property will either get it from the object directly or go though the prototype chain - Internal m_name/m_message properties are no longer needed and removed This makes printing errors slightly more complicated, as we can no longer rely on the (safe) internal properties, and cannot trust a property lookup either - get_without_side_effects() is used to solve this, it's not perfect but something we can revisit later. I did some refactoring along the way, there was some really old stuff in there - accessing vm.call_frame().arguments[0] is not something we (have to) do anymore :^) Fixes #6245.
2021-04-12LibJS: Add Object::get_without_side_effects()Linus Groh
Similar to Value::to_string_without_side_effects() this is mostly a regular object property lookup, but with the guarantee that it will be side-effect free, i.e. no accessors or native property functions will be called. This is needed when we want to access user-controlled object properties for debug logging, for example. The specific use case will be error objects which will soon no longer have internal name/message properties, so we need to guarantee that printing an error, which may already be the result of an exception, won't blow up in our face :^)
2021-04-12LibWeb: Add Window.parent and fix Window.top attributesLuke
This returns the parent frame of the current frame. If it's the main frame, it returns itself. Also fixes the attributes of Window.top, as they were accidentally being passed in as the setter. Required by Web Platform Tests.
2021-04-12LibRegex: Generate a 'Compare' op for empty character classesAnotherTest
Otherwise it would match zero-length strings. Fixes #6256.
2021-04-12LibHTTP: Handle running out of input between chunk body and ending CRLFAnotherTest
Fixes an issue where LibHTTP would incorrectly detect an end of stream when it runs out of TLS application data between the chunk body and its ending CRLF.
2021-04-11LibJS: Removed a fixme in a test of BigInt.prototype.valueOftuqqu
2021-04-11LibWeb: Move element_child_count to ParentNode and add its IDL attributeLuke
I initially had it in Node just because, but then saw it was part of ParentNode in the spec.
2021-04-11LibWeb: Add Event.initEventLuke
Used by YouTube after creating an event with Document.createEvent
2021-04-11LibWeb: Add support for optional default values and optional bools in IDLLuke
Fixed the DOMException constructor as it had the default value version commented out.
2021-04-11LibWeb: Store cookies sent via the Set-Cookie HTTP headerTimothy Flynn
Note: HTTP response headers are currently stored in a hash map, so the Set-Cookie entry will only appear once here.
2021-04-11LibWeb+WebContent: Hook document.cookie to the backend cookie storageTimothy Flynn
2021-04-11Browser+LibWeb: Add hooks for getting and setting cookiesTimothy Flynn
2021-04-11LibJS: Fix array hole and string object indexing prototype indirectionLinus Groh
This fixes two cases of indexed access (array holes, out-of-bounds string object access) where we would not follow the prototype chain and incorrectly return undefined: // Should be "a", returned undefined Object.setPrototypeOf([,], ["a"])[0] // Should be "a", returned undefined Object.setPrototypeOf(new String(""), new String("a"))[0] The actual fix is simple, instead of returning early if the requested index is past the string's length or within the indexed properties size but has no value, we just continue the prototype chain traversal and get correct behaviour from that.
2021-04-11LibWeb+WebContent: Support image context menus in OOPWVAndreas Kling
You can now right-click images in web content and get a context menu.
2021-04-11LibGUI: Avoid unnecessary Gfx::Bitmap cloning in FileIconProviderAndreas Kling
2021-04-11LibGUI: Add convenient helpers for getting the sibling of a ModelIndexAndreas Kling
2021-04-11LibGUI: Remove an unused AK/Debug.h includeBrian Gianforcaro
2021-04-11LibWeb: Remove trailing ';' from WrapperGenerator functions.Brian Gianforcaro
2021-04-11LibC: getopt() and getopt_long() shouldn't modify argvGunnar Beutner
2021-04-11LibC: Move S_* defines into <fcntl.h>Gunnar Beutner
According to the Single UNIX Specification, Version 2 that's where those macros should be defined. This fixes the libiconv port. This also fixes some (but not all) build errors for the diffutils and nano ports.
2021-04-11LibC: Make <limits.h> compatible with GCC so that it doesn't install a fixed ↵Gunnar Beutner
header GCC installs a fixed version of the <limits.h> header as per https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html. The fixed header doesn't include the target's <limits.h> which in turn means that some definitions (such as PATH_MAX) aren't available. This change requires rebuilding the toolchain (Toolchain/BuildIt.sh). This fixes the flatbuffers port. The commit also removes some non-standard defines (U*_MIN) which don't appear to be used anywhere. By definition they're always 0 though so they're not strictly necessary.
2021-04-11LibWeb: Add implementation of Node.compareDocumentPosition()Brian Gianforcaro
While looking into getting Duck Duck Go loading further in the Browser, I noticed that it was complaining about the missing method Node.compareDocumentPosition. This change implements as much of the DOM spec as possible with the current implementation of the DOM to date. The implementation is validated by new tests in the Node.js.
2021-04-11LibWeb: Connect existing implementation of Node::is_connected to JS.Brian Gianforcaro
I was looking at implementing something else, and saw this was low hanging fruit, that brings the browser closer to standards conformance. Add a basic test as well to validate it's implementation.
2021-04-11LibC: Provide macros for the <ctype.h> functionsGunnar Beutner
These are required for the 'tr' port.
2021-04-11LibC: Include additional headers in <arpa/inet.h>Gunnar Beutner
According to the Single UNIX Specification, Version 2 the <arpa/inet.h> header may optionally include <netinet/in.h> and <inttypes.h>. This helps with porting software like c-ray that expects this to be the case.
2021-04-11LibGfx: Add a count to FontTypes and a helper to return type namesthankyouverycool
2021-04-11LibGUI: Move FontPickerWeightModel and helpers to their own headerthankyouverycool
Avoids maintaining multiple weight-name lists
2021-04-11LibGfx: Make sure draw_ui_text() paints underlines with text colorAndreas Kling
We shouldn't hard-code black here, then we won't respect the system theme colors. :^)
2021-04-11LibGUI+LibGfx: Collapse the '&' from Alt shortcuts in tooltip textsAndreas Kling
Also resolve a FIXME about using GUI::Label auto-sizing since we're changing this code and it simplifies what we're doing. Fixes #6219.
2021-04-11LibJS: Replace Vector with MarkedValueList in RegExpPrototype::symbol_replaceLuke
Otherwise the GC won't be able to keep track of the stored values and they may suddenly disappear from underneath us, thinking they're not in use. Fixes a crash when going to the Bootstrap website, where the first replace call in jQuery caused a jump to a bogus address.
2021-04-10LibCore: Save errno before it gets clobbered in Core::IODevice::write()Andreas Kling
2021-04-10LibGUI/ScrollBar: Only paint buttons as pressed when also hoveredJelle Raaijmakers
Fixes #6185
2021-04-10LibTLS: Remove excessive CloseNotify loggingJelle Raaijmakers
2021-04-10AK+Everywhere: Make StdLibExtras templates less wrapper-yAnotherTest
This commit makes the user-facing StdLibExtras templates and utilities arguably more nice-looking by removing the need to reach into the wrapper structs generated by them to get the value/type needed. The C++ standard library had to invent `_v` and `_t` variants (likely because of backwards compat), but we don't need to cater to any codebase except our own, so might as well have good things for free. :^)