summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-30LibJS: Ensure shift values in left_shift are modded by 32Idan Horowitz
This is equivalent to 58d6a2d0192b7860ecb2edb4aa5d36b389213a15 but for the left shift operation.
2021-06-30Utilities: Fix Build on x86_64Hendiadyoin1
2021-06-30Debugger: Compile on x86_64Hendiadyoin1
This is not guaranteed to work at all
2021-06-30Userland: Disable Hackstudio and UE on x86_64Hendiadyoin1
2021-06-30LibJS: Add String.prototype.split using the @@split methods on objectdavidot
2021-06-30LibJS: Add String.prototype.indexOf position argumentdavidot
2021-06-30HeaderView: Fix horizonal section size miscalculationOlivier De Canniere
When calculating the horizonal size of a section in `HeaderView::visible_section_range()`, the horizonal padding is now correctly taken into account. This fixes header missalignment issues in Spreadsheet, SystemMonitor and maybe also the playlist tab of SoundPlayer closes #8268
2021-06-30LibCoreDump: Change Backtrace debug info cache to member variableMax Wipfli
This changes the previously static s_debug_info_cache to a member variable. This is required so the cache is not kept alive if the Backtrace object is destroyed. Previously, the cache object would keep alive MappedFile objects and other data, resulting in CrashReporter and CrashDaemon using more than 100 MB of memory even after the Backtrace objects have been destroyed (and the data is thus no longer needed). This was especially the case when handling crashes from Browser (due to libweb.so and libjs.so). Due to this change, object_info_for_region has been promoted to a instance method. It has also been cleaned up somewhat.
2021-06-30Kernel: Disable __thread and TLS on x86_64 for nowGunnar Beutner
They're not yet properly supported.
2021-06-30LibPthread: Remove redundant return statementGunnar Beutner
The pthread_exit() function doesn't return and is marked as such.
2021-06-30Kernel: Fix stack alignment on x86_64Gunnar Beutner
These were already properly aligned (as far as I can tell).
2021-06-30Kernel: Properly initialize r8-r15 for new threads on x86_64Gunnar Beutner
2021-06-30Kernel: Don't start usermode threads on x86_64 for nowGunnar Beutner
Starting usermode threads doesn't currently work on x86_64. With this stubbed out we can get text mode to boot though.
2021-06-30LibWeb: Define hot DOMTreeJSONModel methods in-lineTimothy Flynn
2021-06-30LibWeb: Store JSON pointers in the OOPWV DOM Inspector model indicesTimothy Flynn
Currently, the DOM Inspector stores a numeric ID for each DOM node. This is used to look up the data for that node in the JSON representation of the DOM. The method to do this search performs a depth-first search through the JSON value, and is invoked quite frequently. Instead, we can just store a pointer to the JSON value in the index, and avoid this search altogether. This is similar to how the IPWV stores a pointer to the DOM node.
2021-06-30LibWeb: Do not create copies of JSON values in OOPWV DOM InspectorTimothy Flynn
To improve the performance of the DOM Inspector when the Browser is run in multi-process mode, do not create copies of the JSON values sent via IPC when searching for a model index. Methods that are guaranteed to return a value now return a reference. Methods that do not have such a guarantee return a pointer (rather than an Optional, because Optional cannot hold references). The DOM Inspector performs well at first, but will start lagging again once the tree is expanded a few nodes deep and/or with many nodes visible in the tree.
2021-06-30LibJS: Optimize & Bring String.prototype.repeat closer to the specIdan Horowitz
Specifically, we immediately return an empty string when `this` is an empty string, instead of wasting time in a loop doing nothing N times.
2021-06-30LibJS: Bring the Array constructor slightly closer to the specificationIdan Horowitz
Specifically, we now cast to a u32 instead of an i32, as well as use the validity check required by the specification. The current constructor is still quite far from the specification, as we directly set the indexed properties' length instead of going through the Array's overriden DefineOwnProperty. (and as a result the checks imposed by the ArraySetLength abstract operation)
2021-06-30Assistant: Use static_cast instead of dynamic_castAndreas Kling
When the type is guaranteed to be known, there's no need to use RTTI.
2021-06-30Assistant: Don't add a subtitle label widget if we don't need itAndreas Kling
2021-06-30Kernel: Don't compile JsonValue & friends into the kernelAndreas Kling
2021-06-30LibKeyboard: Remove an unnecessary #include when building with KERNELAndreas Kling
2021-06-30run-tests: Update for LexicalPath API changesAndreas Kling
2021-06-30AK: Use canonicalized_path in LexicalPath::relative_pathMax Wipfli
This avoids construction of LexicalPath objects.
2021-06-30AK: Add [[nodiscard]] to LexicalPath methods construction objectsMax Wipfli
2021-06-30AK: Move path canonicalization into LexicalPath::canonicalized_pathMax Wipfli
This moves the path canonicalization from the LexicalPath constructor to canonicalized_path. This allows canonicalized path to no longer construct a LexicalPath object and initialize all its member variables.
2021-06-30AK+Everywhere: Remove "null state" of LexicalPathMax Wipfli
This removes the default constructor of LexicalPath, and subsequently modifies all its users to accommodate the change.
2021-06-30AK: Make LexicalPath immutableMax Wipfli
This replaces the current LexicalPath::append() API with a new method that returns a new LexicalPath object and doesn't touch the this-object. With this, LexicalPath is now immutable. It also adds a LexicalPath::parent() method and the relevant test cases.
2021-06-30Tests: Rewrite tests for LexicalPathMax Wipfli
2021-06-30AK+Everywhere: Use mostly StringView in LexicalPathMax Wipfli
This changes the m_parts, m_dirname, m_basename, m_title and m_extension member variables to StringViews onto the m_string String. It also removes the m_is_absolute member in favour of computing if a path is absolute in the is_absolute() getter. Due to this, the canonicalize() method has been completely rewritten. The parts() getter still returns a Vector<String>, although it is no longer a const reference as m_parts is no longer a Vector<String>. Rather, it is constructed from the StringViews in m_parts upon request. The parts_view() getter has been added, which returns Vector<StringView> const&. Most previous users of parts() have been changed to use parts_view(), except where Strings are required. Due to this change, it's is now no longer allow to create temporary LexicalPath objects to call the dirname, basename, title, or extension getters on them because the returned StringViews will point to possible freed memory.
2021-06-30AK+Everywhere: Add and use static APIs for LexicalPathMax Wipfli
The LexicalPath instance methods dirname(), basename(), title() and extension() will be changed to return StringView const& in a further commit. Due to this, users creating temporary LexicalPath objects just to call one of those getters will recieve a StringView const& pointing to a possible freed buffer. To avoid this, static methods for those APIs have been added, which will return a String by value to avoid those problems. All cases where temporary LexicalPath objects have been used as described above haven been changed to use the static APIs.
2021-06-30AK: Remove the LexicalPath::is_valid() APIMax Wipfli
Since this is always set to true on the non-default constructor and subsequently never modified, it is somewhat pointless. Furthermore, there are arguably no invalid relative paths.
2021-06-30AK: Use east const style in LexicalPath.{cpp,h}Max Wipfli
2021-06-30Kernel/PCI: Keep track of the currently mapped bus in MMIO modeLuke
There is a check in map_bus_region to make sure we don't pointlessly remap the bus region if the previous mapping was for the same bus. This is tracked with `m_mapped_bus`. However, nothing was actually updating `m_mapped_bus`, and it is initialised to 0. This means that if we start with a device on bus 0, the read in data will be valid. If we map say bus 1 then bus 0 again, the map for bus 0 will now be ignored and invalid data will be read in. Fixed by updating `m_mapped_bus` with the currently mapped bus.
2021-06-30Kernel/PCI: Don't unmap determine_memory_mapped_bus_region after initLuke
This can be accessed after init via lspci.
2021-06-30LibGUI: Add PasswordBoxMax Wipfli
This patch adds a PasswordBox. At the moment, it's simply a TextBox with it's substitution code point set to '*', and the undo and redo actions disabled.
2021-06-30LibGUI: Add glyph substitution to TextEditorMax Wipfli
This patch adds the member variable m_substitution_code_point to GUI::TextEditor. If non-zero, all gylphs to be drawn will be substituted with the specified code point. This is mainly needed to support a PasswordBox. While the primary use-case is for single-line editors, multi-line editors are also supported. To prevent repeated String construction, a m_substitution_string_data members has been added, which is an OwnPtr<Vector<u32>>. This is used as a UTF-32 string builder. The substitution_code_point_view method uses that Vector to provide a Utf32View of the specified length.
2021-06-30LibGUI: Fix double-clicking words in syntax-highlighted textMax Wipfli
This patch fixes a bug where double-clicking on a word in a TextEditor with syntax highlighting would also select an additional character after the word. This also simplifies the logic for double- and triple-clicking.
2021-06-30LibVideo: Migrate to east-const style & apply other minor fixesFalseHonesty
This patch brings all of LibVideo up to the east-const style in the project. Additionally, it applies a few fixes from the reviews in #8170 that referred to older LibVideo code.
2021-06-30LibVideo/VP9: Implement most of block_mode_info methods (6.4.15-6.4.18)FalseHonesty
2021-06-30LibVideo/VP9: Implement most of inter_frame_mode_info (6.4.11-6.4.14)FalseHonesty
2021-06-30LibVideo/VP9: Implement intra_frame_mode_info procedure (6.4.6)FalseHonesty
2021-06-30LibVideo/VP9: Add SAFE_CALL macro to help propagate failure stateFalseHonesty
2021-06-30LibVideo/VP9: Refactor how TreeParser accesses decoder dataFalseHonesty
The TreeParser requires information about a lot of the decoder's current state in order to parse syntax tree elements correctly, so there has to be some communication between the Decoder and the TreeParser. Previously, the Decoder would copy its state to the TreeParser when it changed, however, this was a poor choice. Now, the TreeParser simply has a reference to its owning Decoder, and accesses its state directly.
2021-06-30LibVideo/VP9: Begin decoding VP9 blocksFalseHonesty
2021-06-30LibVideo/VP9: Successfully parse partition syntax elementFalseHonesty
2021-06-30LibVideo/VP9: Begin creating a tree parser to parse syntax elementsFalseHonesty
2021-06-30LibVideo/VP9: Begin decoding tilesFalseHonesty
2021-06-30LibVideo/VP9: Parse compressed header dataFalseHonesty
This patch adds compressed header parsing to the VP9 decoder (section 6.4 of the spec). This is the final decoder step before we can start to decode tiles.
2021-06-30Kernel: Give Devices without a custody a less fake absoulte_pathAndrew Kaster
This hack allows self-test mode run-tests-and-shutdown.sh to give TestProcFs a stat(2)-able /proc/self/fd/0. For some reason, when stdin is a SerialDevice, /proc/self/fd/0 will be a symlink to the device as expected, but, calling realpath or stat on /proc/self/fd/0 will error out. realpath will give the string from Device::absolute_path() which would be something like "device:4,64 (SerialDevice)". When VFS is trying to resolve_path so that we can stat the file, it would bail out on this fake-y path. Change the fake path (that doesn't show up when you ls a device, nor when checking the devices tab in SystemMonitor) from the major/minor device number and class_name() to /dev/device_name(). There's probably a very hairy yak standing behind this issue that was only discovered due to the ProcFS rework.