summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2021-10-18LibJS: Convert to_i32() to ThrowCompletionOrIdan Horowitz
2021-10-18LibJS: Convert to_number() to ThrowCompletionOrIdan Horowitz
2021-10-17LibGL: Implement `glIsEnabled()`Jelle Raaijmakers
2021-10-17LibGL: Implement disabling GL_FOGJelle Raaijmakers
2021-10-17LibGL: Correct GL_MODELVIEW and GL_PROJECTION valuesJelle Raaijmakers
According to the Khronos group, GL enum values are in the spec: https://www.khronos.org/registry/OpenGL/docs/enums.html Not adhering to their values will cause issues with projects that ship their own copy of `gl.h`, such as ScummVM.
2021-10-18LibWeb: Fill page background with the "base" palette colorAndreas Kling
This fixes an issue where you'd see black (or ghost) pixels when painting web pages with content smaller than the viewport.
2021-10-17LibC: Define ULLONG_MAXL Pereira
Some ports require this constant to be defined as it is specified in the standard[1]. [1] https://www.cplusplus.com/reference/climits/
2021-10-17LibWeb: Factor out creation of independent formatting contextsAndreas Kling
This patch breaks FormattingContext::layout_inside() into two functions, one that creates an independent formatting context (if needed), and another that calls the former and then performs the inside layout within the appropriate context. The main goal here was to make layout_inside() return the independent formatting context if one was created. This will allow us to defer certain operations in child contexts until the parent context has finished formatting the child root box.
2021-10-17LibWeb: Expose FormattingContext typeAndreas Kling
Instead of having a virtual is_block_formatting_context(), let's have a type() that can tell you exactly which type of formatting context it is.
2021-10-17LibGUI: Don't render placeholders as secretPeter Elliott
before my placeholder 'password' showed up as '********'.
2021-10-17LibX86: Add SSE supportHediadyoin1
This only adds the decodeing support for SSE, not SSE2, etc. may contain traces of SSE2.
2021-10-17LibGUI: Remember the maximized value if a window hasn't been created yetKarol Kosek
d0fb511d75762e9d97fa80a01585381843b90a0a set the maximized window value in the File Manager before a window was created, which resulted in crash everytime you tried to open the program that was closed while it was maximized. ugh Here we do more-or-less what GUI::Window::set_rect() does, except we don't add it to the WindowServer::create_window() IPC call. That's because the Window Server knows nothing about menus at this point and just assumes they don't need to be visible. So if we try to maximize the window then, it could be slightly taller and a titlebar could be hidden. So even though it looks how it looks like, it does work and it doesn't show in the startup size, as described in the mentioned commit (the call is put a few lines before the initial update()). :^)
2021-10-17LibWeb: Make the CSS serialization functions actually output things :^)Sam Atkins
Pro tip: If your function takes a StringBuilder by value, it doesn't actually append anything to the caller's StringBuilder. On the plus side, I probably won't make this mistake for a while? I hope?
2021-10-17Everywhere: Make some symbols `__attribute__((used))` for LTODaniel Bertalan
With these changes, the userland builds correctly with Clang's ThinLTO enabled.
2021-10-17LibCoredump: Show frames from Loader.so if the crash occurs in itDaniel Bertalan
Previously we rejected all entries from Loader.so even if the faulting address was located in it, i.e. the actual issue was with the dynamic loader. We no longer do that to make debugging Loader crashes easier.
2021-10-17LibDebug: Enable parsing `libgcc_s.so`Daniel Bertalan
Now that our DWARF 5 support is nearly feature-complete, there is no reason anymore to special-case this library, as we can process it just fine.
2021-10-17LibDebug: Don't create compilation units for embedded resourcesDaniel Bertalan
Our implementation (naively) assumes that there is a one-to-one correspondence between compilation units and line programs, and that their orders are identical. This is not the case for embedded resources, as Clang only creates line programs for it, but not compilation units. This mismatch caused an assertion failure, which made generating backtraces for GUI applications impossible. This commit introduces a hack that skips creating CompilationUnit objects for LinePrograms that come from embedded resources.
2021-10-17LibDebug: Make use of the newly supported data formsDaniel Bertalan
With this change, our DWARF 5 support is nearly feature-complete.
2021-10-17LibDebug: Support `DW_FORM_data16`Daniel Bertalan
Clang emits this form at all debug levels.
2021-10-17LibDebug: Support `addrx*`, `strx*` and `rnglistx` formsDaniel Bertalan
These forms were introduced in DWARF5, and have a fair deal of advantages over the more traditional encodings: they reduce the size of the binary and the number of relocations. GCC does not emit these with `-g1` by default, but Clang does at all debug levels.
2021-10-17LibDebug: Don't expose AttributeValue internals, use getters insteadDaniel Bertalan
This will be needed when we add `DW_FORM_strx*` and `DW_FORM_addrx*` support, which requires us to fetch `DW_AT_str_offsets_base` and `DW_AT_addr_base` attributes from the parent compilation unit. This can't be done as we read the values, because it would create infinite recursion (as we might try to parse the compilation unit's `DW_FORM_strx*` encoded name before we get to the attribute). Having getters ensures that we will perform lookups if they are needed.
2021-10-17LibCoredump: Accept dynamic libraries with versioned namesDaniel Bertalan
Our Clang toolchain uses versioned names for its shared libraries, meaning that our applications link against `libc++.so.1.0`, not simply `libc++.so`. Without this change, the LLVM runtime libraries are excluded from backtraces, which makes debugging toolchain issues harder.
2021-10-17LibC: Primitively implement wcsxfrmDaniel Bertalan
The `wcsxfrm` function copies a wide character string into a buffer, such that comparing the new string against any similarly pre-processed string with `wcscmp` produces the same result as if the original strings were compared with `wcscoll`. Our current `wcscoll` implementation is simply an alias for `wcscmp`, so `wcsxfrm` needs to perform no actions other than copying the string.
2021-10-17LibC: Implement wcslcpyDaniel Bertalan
2021-10-17LibC: Fix wcsrchr declaration to return a non-const wchar*Daniel Bertalan
This is how the standard specifies it; similarly to the already correctly declared wcschr function.
2021-10-17LibC: Stub out mbsnrtowcsDaniel Bertalan
2021-10-17LibC: Stub out wcsnrtombsDaniel Bertalan
2021-10-17LibC: Implement wmemcmpDaniel Bertalan
2021-10-17LibC: Add ELAST errno macroDaniel Bertalan
The ELAST macro is used on many systems to refer to the largest possible valid errno value. LLVM's libc++ uses errno values of ELAST+1 and ELAST+2 internally, and defines an arbitrary fallback value for platforms which don't have the macro. This means that it's possible for their internal errno numbers could coincide with values we actually use, which would be a very bad thing.
2021-10-17LibC: Forward-declare `struct tm` in wchar.hDaniel Bertalan
The C standard specifies that this forward-declaration be present in wchar.h, and is needed in order to build libstdc++.
2021-10-17LibWeb: Implement the Element attributes getterTimothy Flynn
2021-10-17LibWeb: Reimplement Element attribute related methods with NamedNodeMapTimothy Flynn
2021-10-17LibWeb: Implement (most of) NamedNodeMap to store attributesTimothy Flynn
2021-10-17LibWeb: Set an attribute's owning element when it is knownTimothy Flynn
2021-10-17LibWeb: Implement Attribute closer to the spec and with an IDL fileTimothy Flynn
Note our Attribute class is what the spec refers to as just "Attr". The main differences between the existing implementation and the spec are just that the spec defines more fields. Attributes can contain namespace URIs and prefixes. However, note that these are not parsed in HTML documents unless the document content-type is XML. So for now, these are initialized to null. Web pages are able to set the namespace via JavaScript (setAttributeNS), so these fields may be filled in when the corresponding APIs are implemented. The main change to be aware of is that an attribute is a node. This has implications on how attributes are stored in the Element class. Nodes are non-copyable and non-movable because these constructors are deleted by the EventTarget base class. This means attributes cannot be stored in a Vector or HashMap as these containers assume copyability / movability. So for now, the Vector holding attributes is changed to hold RefPtrs to attributes instead. This might change when attribute storage is implemented according to the spec (by way of NamedNodeMap).
2021-10-17LibWeb: Alphabetize LibWeb's forward and JS wrapper declarationsTimothy Flynn
2021-10-17LibC: Implement wctobTim Schumacher
2021-10-17LibC: Implement mbstowcsTim Schumacher
2021-10-17LibC: Implement wctombTim Schumacher
2021-10-17LibJS: Convert to_property_key() to ThrowCompletionOrIdan Horowitz
2021-10-17LibJS: Convert to_double() to ThrowCompletionOrIdan Horowitz
2021-10-17LibJS: Convert to_bigint_uint64() to ThrowCompletionOrIdan Horowitz
2021-10-17LibJS: Convert to_bigint_int64() to ThrowCompletionOrIdan Horowitz
2021-10-17LibJS: Convert to_bigint() to ThrowCompletionOrIdan Horowitz
2021-10-17LibJS: Convert to_numeric() to ThrowCompletionOrIdan Horowitz
2021-10-17LibWeb: Implement Event.composedPathLuke Wilde
I originally implemented this as something to use the new sequence wrapper, however, after having a look at uses with grep.app, it's used often, for example: - Bootstrap 5 Dropdowns - Polymer - Angular - Closure
2021-10-16LibWeb: Serialize selectors only in CSSStyleRule::selector_text()Sam Atkins
Previously, this was returning the serialization for the whole style rule, which isn't what we want.
2021-10-16LibWeb: Use the serialize_a_{identifier,string} algorithms for selectorsSam Atkins
Also fixed that serializing an attribute selector never output the value.
2021-10-16LibWeb: Insert commas between serialized CSS selectorsSam Atkins
For convenience, we create a Formatter for Selector, so we can use `StringBuilder.join()`.
2021-10-16LibWeb: Fix pseudo-element selector serializationSam Atkins
We want to check the last SimpleSelector, not the first one. We don't have to check that a SimpleSelector exists since a CompoundSelector without one is invalid.