summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-24LibDebug: Make sure to not single step the program twiceItamar
After hitting a breakpoint, we single step the program to execute the instruction we breaked on and re-enable the breakpoint. We also single step the program when the user of LibDebug returned a DebugDecision::SingleStep. Previously, if we hit a breakpoint and then were asked to to a DebugDecision::SingleStep, we would single step twice. This bug can actually crash programs, because it might cause us to skip over a patched INT3 instruction in the second single-step. Interestingely enough, this bug manifested as functrace crashing certain programs: after hitting a breakpoint on a CALL instruction, functrace single steps the program to see where the CALL jumps to (yes, this can be optimized :D). functrace crashed when a CALL instruction jumps to another CALL, because it inserts breakpoints on CALL instructions, and so the INT3 in the 2nd CALL was skipped over, and we executed garbage :). This commit fixes this by making sure not to single-step twice.
2020-05-24LibDebug: Tolerate missing debug informationItamar
We previously crashed when programs were missing certain debug information.
2020-05-24LibWeb: Improve support for white-space CSS property (#2348)Jack Byrne
Add reasonable support for all values of white-space CSS property. Values of the property are translated into a 3-tuple of rules: do_collapse: whether whitespace is to be collapsed do_wrap_lines: whether to wrap on word boundaries when lines get too long do_wrap_breaks: whether to wrap on linebreaks The previously separate handling of per-line splitting and per-word splitting have been unified. The Word structure is now a more general Chunk, which represents different amounts of text depending on splitting rules.
2020-05-24LibWeb: HtmlTokenizer.cpp: fix ON_WHITESPACE macroEmanuele Torre
The "audible bell" character ('\a' U+0007) was treated as whitespace while the "line feed" character ('\n' U+000a) was not. '\a' is no longer considered whitespace. '\n' is now considered whitespace.
2020-05-24Browser: Set the console's interpreter when a tab's document changesFalseHonesty
Previously, once a console was opened for a tab, its interpreter would never change, leaving it with a stale interpreter. Now, when the tab's HtmlView loads a new document, the console will receive that document's interpreter.
2020-05-24LibWeb: Add hook to HtmlView when a new document is setFalseHonesty
2020-05-24Browser: Add JS ConsoleFalseHonesty
The JavaScript console can be opened with Control+I, or using the menu option. The console is currently a text box with JS syntax highlighting which will send commands to the document's interpreter. All output is printed to an HTML view in the console. The output is an HtmlView to easily allow complex output, such as expandable views for JS Objects in the long run.
2020-05-24LibGUI: Use word breaks to intelligently navigate a TextEditorFalseHonesty
Previously, holding Control while using the left/right arrow keys to navigate through a TextEditor would only be helpful if the document had spans. Now, if there are no spans, it will navigate to the next "word break", defined to be the threshold where text changes from alphanumeric to non-alphanumeric, or vice versa.
2020-05-24LibGUI: Add word break locator methods to TextDocumentFalseHonesty
TextDocument now has utilities to locate a word break both before and after any TextPosition.
2020-05-24Keymap: Added keymap file for Japanese keyboard, without IMEMagentah
configuration keys.
2020-05-24LibWeb: Implement enough HTML parsing to handle a small simple DOM :^)Andreas Kling
We can now parse a little DOM like this: <!DOCTYPE html> <html> <head></head> <body> <div></div> </body> </html> This is pretty slow work, but the incremental progress is satisfying!
2020-05-24LibWeb: Start building the tree building part of the new HTML parserAndreas Kling
This patch adds a new HTMLDocumentParser class. It keeps a tokenizer object internally and feeds itself with one token at a time from it. The names and idioms in this class are expressed as closely to the actual HTML parsing spec as possible, to make development as easy and bug free as possible. :^) This is going to become pretty large, but it's pretty cool!
2020-05-24LibWeb: Add HTMLFormElement to forwarding headerAndreas Kling
2020-05-24LibWeb: Add "name" to DocumentType nodesAndreas Kling
2020-05-23LibWeb: Make hit-testing work with display: inline-block;Andreas Kling
When hit testing encountered a block with inline children, we assumed that the inline children are nothing but text boxes. An inline-block box is actually a block child of a block with inline children, so we have to handle that scenario as well. :^) Fixes #2353.
2020-05-23LibWeb: Colorize tag names in layout tree dumps + show element IDsAndreas Kling
Showing element IDs in layout tree dumps makes it much easier to compare against the DOM.
2020-05-23LibWeb: Implement a bit more of DOCTYPE tokenizationAndreas Kling
2020-05-23Base: Add a really bad, but yummy Slice of Pizza emoji 🍕Bryan Steele
2020-05-23LibWeb: Emit character/comment tokens lazily to accumulate more dataAndreas Kling
Instead of emitting data-bearing tokens immediately, do it lazily at the next state change. This allows us to accumulate full bursts of text in between tags instead of having one token per character. :^)
2020-05-23Userland: Allow passing a specific HTML file to the "ht" test programAndreas Kling
2020-05-23LibJS: Use __APPLE__ instead of __MACH__ for MacOS buildMarcin Gasperowicz
This is regarding PR #234. Sergey pointed out that not every Mach is Darwin.
2020-05-23LibLine: Default to resetting styles when a cell has no styles setAnotherTest
2020-05-23LibC: Move ssize_t from <stddef.h> to <sys/types.h>Andreas Kling
This should fix the toolchain build, where GCC doesn't use our stddef.h Also, Dr. POSIX says ssize_t goes in <sys/types.h> anyway. :^)
2020-05-23LibJS: Add Array.prototype.reduce() (#2334)Marcin Gasperowicz
This patch adds `Array.prototype.reduce()` method to LibJS Runtime. The implementation is (to my best knowledge) comformant to ECMA262. The test `Array.prototype-generic-functions.js` demonstrates that the function can be applied to other objects besides `Array`.
2020-05-23LibJS: Treat NaN in Value::to_i32() as zeroLinus Groh
Let's treat it as zero like the ECMAScript spec does in toInteger(). That way we can use to_i32() and don't have to care about weird input input values where a number is expected, i.e. "foo".charAt() === "f" "foo".charAt("bar") === "f" "foo".charAt(0) === "f"
2020-05-23Base: Add red heart emoji ❤️Spencer Dixon
2020-05-23Kernel: Use TypedMapping for accessing IOAPIC registersAndreas Kling
2020-05-23Kernel: Add non-const version of TypedMapping::operator->()Andreas Kling
2020-05-23Kernel: Oops, we need to use map_typed_writable() for write access :^)Andreas Kling
2020-05-23Kernel: Use TypedMappings when looking for APIC informationAndreas Kling
2020-05-23Build: Make Lagom build under macOS (#2341)Marcin Gasperowicz
Lagom now builds under macOS. Only two minor adjustments were required: * LibCore TCP/UDP code can't use `SOCK_{NONBLOCK,CLOEXEC}` on macOS, use ioctl() and fcntl() instead * LibJS `Heap` code pthread usage ported to MacOS
2020-05-23Kernel+LibC: Fix various build issues introduced by ssize_tAndreas Kling
Now that ssize_t is derived from size_t, we have to
2020-05-23Kernel: Use TypedMappings in the very unfinished APIC codeAndreas Kling
2020-05-23Kernel+LibC: Let's say that off_t is a ssize_tAndreas Kling
2020-05-23LibWeb: Make BEGIN_STATE and END_STATE include some {{{ and }}}Andreas Kling
This makes it a compile error to omit the END_STATE. Also add some more missing END_STATE's exposed by this (nice!) Thanks to @predmond for suggesting the multi-pair trick! :^)
2020-05-23Kernel: Add missing casts when calling AK::min()Andreas Kling
2020-05-23AK: Fix inconsistent signature for dbgputstr()Andreas Kling
2020-05-23LibC: Declare ssize_t in a platform-agnostic wayAndreas Kling
While the compiler provides __SIZE_TYPE__ for declaring size_t, there's unfortunately no __SSIZE_TYPE__ for ssize_t. However, we can trick the preprocessor into doing what we want anyway by doing "#define unsigned signed" before using __SIZE_TYPE__ again.
2020-05-23Kernel: Tweak some suspicious casts in InterruptManagementAndreas Kling
This code needs a closer looking-into at some point. It doesn't seem entirely safe to be casting u32's to pointers like it does.
2020-05-23Kernel: Dont't static_assert that size_t is 32-bit :^)Andreas Kling
2020-05-23Kernel: Use a FlatPtr for the "argument" to ioctl()Andreas Kling
Since it's often used to pass pointers, it should really be a FlatPtr.
2020-05-23Kernel: Simplify MP table parser a little bit moreAndreas Kling
Get rid of the ConfigurationTableEntryLength enum and just look at the sizeof() for each entry type.
2020-05-23Kernel: Make dump_backtrace_impl() take base pointer as a FlatPtrAndreas Kling
Since FlatPtr is register width agnostic. :^)
2020-05-23AK: Simplify Types.h a little bitAndreas Kling
2020-05-23AK: Add MakeSigned<T> helper templateAndreas Kling
2020-05-23AK: Allow NumericLimits.h to compile in a kernel contextAndreas Kling
We explicitly disallow floating point numbers during kernel compilation so we have to #ifdef out those parts here.
2020-05-23Browser: An anchor link should open in a new tab when requiredFalseHonesty
Previously, clicking on an anchor link (href="#section1") would always scroll to it on the current page, even if control was held or the target="_blank" attribute was set. This fixes that behaviour, and the link will always open in a new tab if required.
2020-05-23LibWeb: Fix HtmlView not scrolling to a url's anchor on page loadFalseHonesty
Previously, when HtmlView loaded a url, the url's fragment was ignored, but now it will be automatically scrolled to.
2020-05-23AK: Fix URL::complete_url behaviour for when a fragment is passedFalseHonesty
Previously, passing a fragment string ("#section3") to the complete_url method would result in a URL that looked like "file:///home/anon/www/#section3" which was obviously incorrect. Now the result looks like "file:///home/anon/www/afrag.html#section3".
2020-05-23LibWeb: Add missing END_STATE for TagNameAndreas Kling
Fixes #2339.