Commit Graph

28447 Commits

Author SHA1 Message Date
Jelle Raaijmakers
91ad7754fe Ports: Compile ncurses with --enable-term-driver
In commit ba97548686 `--with-termlib` was added to produce a
`libtinfo.a` file that nano then required. However, this causes ncurses
to build with _only_ screen-pointer ext funcs: e.g.
`reset_prog_mode_sp` exists, but `reset_prog_mode` does not.

By switching to `--enable-term-driver`, all functions are properly
exported again and the nano port compiles and runs just fine. :^)
2021-10-02 21:07:47 +01:00
Jelle Raaijmakers
8487ff551c Ports: Switch ncurses to SHA256 auth type 2021-10-02 21:07:47 +01:00
Gal Horowitz
cfc5df27f0 FontEditor: Close preview window when the main window is closed 2021-10-02 20:55:14 +02:00
Gal Horowitz
aa180c821d LibGFX: Draw the ends of lines with non-standard thickness
Lines are drawn using squares the size of the thickness, so if the
length of the line was not a multiple of the thickness, the end of the
line was not drawn correctly.
2021-10-02 20:54:47 +02:00
Gal Horowitz
cd7473d1a3 PixelPaint: Correctly offset stroke position for even thicknesses 2021-10-02 20:54:32 +02:00
Gal Horowitz
be4485fe85 PixelPaint: LayerListWidget::set_selected_layer now handles nullptr 2021-10-02 20:54:12 +02:00
Andreas Kling
87290e300e AK: Simplify Utf16View::operator==(Utf16View) 2021-10-02 18:32:56 +02:00
Andreas Kling
f0b3a06746 LibJS: Use Vector<u16, 1> for UTF-16 in a few more places 2021-10-02 18:32:56 +02:00
Brian Gianforcaro
dc99b702be Meta: Include source sha in sonarcloud analysis metadata
Having the version included in each analysis allows you to do more
filtering in the UI where results are viewed.
2021-10-02 18:16:15 +02:00
Brian Gianforcaro
92844a6af6 Kernel: Access Processor static methods statically
SonarCloud flagged this "Code Smell", where we are accessing these
static methods as if they are instance methods. While it is technically
possible, it is very confusing to read when you realize they are static
functions.
2021-10-02 18:16:15 +02:00
Brian Gianforcaro
0223faf6f4 Kernel: Access MemoryManager static functions statically
SonarCloud flagged this "Code Smell", where we are accessing these
static methods as if they are instance methods. While it is technically
possible, it is very confusing to read when you realize they are static
functions.
2021-10-02 18:16:15 +02:00
Andreas Kling
024367d82e LibJS+AK: Use Vector<u16, 1> for UTF-16 string storage
It's very common to encounter single-character strings in JavaScript on
the web. We can make such strings significantly lighter by having a
1-character inline capacity on the Vectors.
2021-10-02 17:39:38 +02:00
Luke Wilde
ae0bdda86e LibJS: Remove read buffer overflow in Lexer::consume
The position is added to manually in the line terminator and Unicode
character cases. While it checks for EOF after doing so, the EOF check
used `!=` instead of `<`, meaning if the position went _over_ the
source length, it wouldn't think it was EOF and would cause read buffer
overflows.

For example, `0xea` followed by `0xfd` would cause this.
2021-10-02 17:16:09 +02:00
Andreas Kling
bb6634b024 LibRegex: Don't emit signpost events for every regular expression
The time we were spending on these signposts was adding up to way too
much, so let's not do it automatically.
2021-10-02 16:53:03 +02:00
Andreas Kling
6a1b82df2b LibJS: Put zombie cell tracking code behind a compile-time flag
Since this is a debug-only feature, let's not have it impact GC marking
performance when you don't need it.
2021-10-02 16:39:28 +02:00
Andreas Kling
f290c59dd8 LibJS: Keep track of PrimitiveStrings and share them
VM now has a string cache which tracks all live PrimitiveStrings and
reuses an existing one if possible. This drastically reduces the number
of GC-allocated strings in many real-word situations.
2021-10-02 16:39:28 +02:00
Linus Groh
ba6e4c7ae1 LibJS+LibWeb: Use Object::set_prototype() in more places 2021-10-02 14:53:06 +01:00
Linus Groh
84c9f3e0d0 LibJS: Add Object::set_prototype()
This is just factoring out step "9. Set O.[[Prototype]] to V." of
10.1.2 [[SetPrototypeOf]] into its own method so that we don't have to
use internal_set_prototype_of() for setting an object prototype in all
cases.
2021-10-02 14:53:06 +01:00
Linus Groh
c500ebdcd5 LibWeb: Implement Navigator.cookieEnabled 2021-10-02 13:55:19 +01:00
Idan Horowitz
a4bc3fa255 LibWeb: Initialize IDL-generated prototypes' prototype directly
Instead of setting it to the default object prototype and then
immediately setting it again via internal_set_prototype_of, we can just
set it directly in the parent constructor call.
2021-10-02 13:23:59 +01:00
networkException
a7ce118249 Base: Add glyphs for the U+20AC euro sign to all bitmap fonts 2021-10-02 09:21:38 +01:00
Nico Weber
6c4392bc50 Prekernel: Better datasheet link for RPi3 2021-10-02 02:01:07 +02:00
Idan Horowitz
6a8246cacc Base: Add glyphs for the U+2014 em dash to KaticaRegular 2021-10-01 20:54:48 +02:00
Idan Horowitz
036bdb0a01 Base: Add glyphs for the U+2019 apostrophe to KaticaRegular 2021-10-01 20:54:48 +02:00
Andreas Kling
77f0e57b27 RequestServer: Don't hide the SIGINFO state dump behind a debug macro
Until we're confident that RequestServer doesn't need this runtime debug
dump helper, it's much nicer if everyone has it built in, so they can
simply send a SIGINFO if they see it acting up.
2021-10-01 20:17:15 +02:00
Andreas Kling
3db847c64a LibWeb: Implement CSSRule and CSSStyleDeclaration serialization
There are a handful of FIXME's here, but this seems generally good.
Note that CSS *values* don't get serialized in a spec-compliant way
since we currently rely on StyleValue::to_string() which is ad-hoc.
2021-10-01 20:17:15 +02:00
Andreas Kling
c953103d2f LibWeb: Make CSSStyleDeclaration support both dashed-name and camelCase
Turns out we need to support *both* of these styles since there's
content that uses one or both of these.
2021-10-01 20:17:15 +02:00
Andreas Kling
918b0b4394 LibWeb: Add missing virtual/override/final in CSSStyleRule 2021-10-01 20:17:15 +02:00
Tobias Christiansen
1496ad0605 LibWeb: Flexbox: Catch zero flex-basis and use width instead
A flex-basis of zero doesn't actually mean that the preferred size of
the particular Box is 0. It means that the Box should take the least
amount of space possible while still accomodating the content inside.

We catch and circumvent this now right when the flex-basis property gets
read for the FlexFormattingContext.

This isn't mentioned anywhere in the seemingly relevant portions of the
spec, however thanks to this answer https://stackoverflow.com/a/47579078
(which is not entirely correct about width either) lead to the behavior
that is wanted and used by other Browsers.
2021-10-01 20:16:58 +02:00
Idan Horowitz
d426edb87f LibWeb: Create real Keybord & Message events in Document::create_event 2021-10-01 20:14:45 +02:00
Idan Horowitz
37586f61be LibWeb: Change the type of MouseEvent members to double
These are defined as integers only in the legacy specification, the
new one defines these as doubles.
2021-10-01 20:14:45 +02:00
Idan Horowitz
f74b612aa4 LibWeb: Add the missing KeyboardEvent IDL constructor
This commit also does a bit of general cleanup on the header file.
2021-10-01 20:14:45 +02:00
Idan Horowitz
c5b924b1e6 LibWeb: Dispatch keydown/keyup events on the appropriate target 2021-10-01 20:14:45 +02:00
Idan Horowitz
43482dfde3 LibWeb: Support dictionary-only IDL files 2021-10-01 20:14:45 +02:00
Idan Horowitz
b888d14e42 LibWeb: Change the parent interface of MouseEvent to UIEvent
This was accidentally set to Event
2021-10-01 20:14:45 +02:00
Idan Horowitz
ac25c28c43 LibWeb: Add the missing UIEvent IDL constructor 2021-10-01 20:14:45 +02:00
Idan Horowitz
7b2c63fd87 LibWeb: Add support for unwrapping the WindowObject to WrapperGenerator 2021-10-01 20:14:45 +02:00
Idan Horowitz
f176514db8 LibWeb: Add the UIEvent::{view, detail} IDL attributes 2021-10-01 20:14:45 +02:00
Idan Horowitz
1c4404c46a LibWeb: Add the missing PageTransitionEvent IDL constructor 2021-10-01 20:14:45 +02:00
Idan Horowitz
4d71f22673 LibWeb: Add the missing ProgressEvent IDL constructor 2021-10-01 20:14:45 +02:00
Idan Horowitz
1e8ba0d9d3 LibWeb: Add the missing SubmitEvent IDL constructor
This commit also removes the SubmitEvent.cpp file, as all of the method
implementations were trivial and could be inlined into the header file.
2021-10-01 20:14:45 +02:00
Idan Horowitz
d44857d34d LibWeb: Add the missing MessageEvent IDL constructor 2021-10-01 20:14:45 +02:00
Idan Horowitz
9863de4609 LibWeb: Add the lastEventId IDL attribute to MessageEvent 2021-10-01 20:14:45 +02:00
Idan Horowitz
b53fc8ad3d LibWeb: Change the IDL type of MessageEvent::data to any 2021-10-01 20:14:45 +02:00
Idan Horowitz
ded8e84f32 LibWeb: Add the missing CloseEvent IDL constructor 2021-10-01 20:14:45 +02:00
Idan Horowitz
7f551d7f6a LibWeb: Use the LibWeb source directory as the IDL #import base path
This allows us to include IDL files from other base LibWeb directories
wihout using relative `../foo.idl` references.
2021-10-01 20:14:45 +02:00
Sam Atkins
bd648d082c LibWeb: Parse media queries! :^)
While not complete by any means, we are now compatible with the [level 3
spec](https://www.w3.org/TR/css3-mediaqueries/#syntax) and some parts of
[level 4.](https://www.w3.org/TR/mediaqueries-4#mq-syntax)

Compatibility with level 4+ requires:
- Implementing the range syntax: `(800px <= width <= 1200px)`
- Parsing `<general-enclosed>`, which represents syntax that is not yet
used but they may use in the future.
2021-10-01 20:03:03 +02:00
Sam Atkins
2ed0f880ee LibWeb: Add TokenStream::rewind_to_position()
Parsing media queries sometimes requires significant back-tracking, so
`reconsume_current_input_token()` was not good enough.
`rewind_to_position()` lets you reconsume an erbitrary number of tokens
to return to an earlier point in the stream, which you previously saved
from `TokenStream::position()`.
2021-10-01 20:03:03 +02:00
Sam Atkins
c7cd489689 LibWeb: Parse @media rules into CSSMediaRule objects
This is not yet actually useful, since we only have a stub for parsing
the query part, but now I have a nice way to test that things are
working. :^)
2021-10-01 20:03:03 +02:00
Sam Atkins
b4833bf2a3 Base: Add media-queries test page 2021-10-01 20:03:03 +02:00