Commit Graph

35419 Commits

Author SHA1 Message Date
Ali Mohammad Pur
d7d847c8c6 LibLine: Allow the embedder to optionally handle pasted data itself
If the 'on_paste' callback is set, LibLine will buffer the pasted data
and pass it over to the embedder to use as it pleases; in practice, this
means that the users of LibLine can now escape or otherwise handle
pasted data without the incremental codepoint-by-codepoint buildup.
2022-03-06 13:20:41 +01:00
Ali Mohammad Pur
0ea775f257 Shell: Allow completing StringLiterals as paths
This auto-escapes the token as well :^)
2022-03-06 13:20:41 +01:00
Ali Mohammad Pur
118590325a LibLine+Userland: Make suggestion offsets per-suggestion
This allows the user to modify different parts of the input with
different suggestions.
2022-03-06 13:20:41 +01:00
Ali Mohammad Pur
1fcef99ff7 LibLine: Never assume a 25x80 terminal
Just reuse the lldb hack if the normal stderr ioctl fails for any
reason, and read the size directly off /dev/tty.
2022-03-06 13:20:41 +01:00
Ali Mohammad Pur
b05af48d80 js: Use token offset for highlighting instead of column offset
This makes it work correctly with multiline inputs as well.
2022-03-06 13:20:41 +01:00
Jelle Raaijmakers
287f33165e LibGL: Implement glNormalPointer
Used for `glDrawArrays` and `glDrawElements`, the normal pointer should
point to sets of X, Y and Z values.
2022-03-06 13:20:09 +01:00
Jelle Raaijmakers
53edb41d40 LibGL: Support local viewer light model
We already had the implementation, but we were erroneously rejecting
`GL_LIGHT_MODEL_LOCAL_VIEWER` as a parameter to `glLightModel`.
2022-03-06 13:20:09 +01:00
Jelle Raaijmakers
c91e86e020 LibGL: Clean up reading floats and doubles from pointers
No functional changes, just removal of superfluous braces.
2022-03-06 13:20:09 +01:00
Jelle Raaijmakers
4450aef175 LibGL: Set sampler config to dirty if modifying tex env 2022-03-06 13:20:09 +01:00
Alex O'Brien
ad1065e213 LibC: Remove semicolon in definition of FD_ZERO
This causes problems in code of the form

  if (/* condition */)
    FD_ZERO(&thing);
  else
    do_other_thing();

Wrapping the call to memset() in a do/while block fixes the issue.
2022-03-06 13:00:42 +01:00
Andreas Kling
7d5d5b387e LibWeb: Respect CSS image-rendering mode when painting canvas elements
If the content wants to be pixelated, we should honor that and paint
with nearest-neighbor scaling. The fact that it's faster is a nice bonus
as well. :^)
2022-03-06 01:51:18 +01:00
Jelle Raaijmakers
9fc419395e LibSoftGPU: Use destination alpha for texture decal function
According to the OpenGL spec, the decal function uses the destination
(or texture) alpha instead of the source alpha. This fixes the sky in
GLQuake.
2022-03-06 01:38:01 +01:00
sa
fd628cdfec Browser: Fix crash in Storage Inspector when the cookie list is emtpy
This patch fixes a crash when clicking on an empty cookie list in the
Browsers Storage Inspector.
2022-03-06 01:36:41 +01:00
Andreas Kling
d5aed70dcf LibJS: Actually override is_private_identifier() in PrivateIdentifier
Regression from 72689ce7bd.
2022-03-06 00:49:35 +01:00
Idan Horowitz
7ebb421ee9 LibJS: Implement the object literal __proto__ property key special case 2022-03-06 01:38:25 +02:00
Andreas Kling
9fa78b1a05 LibGfx: Don't mix up red/blue channels when blitting RGBA8888 bitmap
This makes CanvasRenderingContext2D.putImageData() actually paint the
right colors into the canvas.
2022-03-06 00:15:12 +01:00
Andreas Kling
72689ce7bd LibJS: Add fast_is<PrivateIdentifier>() 2022-03-05 23:49:37 +01:00
Idan Horowitz
bc0fafade9 LibWeb: Add all overloads of CanvasRenderingContext2D::drawImage() 2022-03-05 23:40:08 +01:00
Idan Horowitz
59e9e7cc61 LibWeb: Add a very basic and ad-hoc version of IDL overload resolution
This initial version lays down the basic foundation of IDL overload
resolution, but much of it will have to be replaced with the actual IDL
overload resolution algorithms once we start implementing more complex
IDL overloading scenarios.
2022-03-05 23:40:08 +01:00
Idan Horowitz
24cf56896b LibWeb: Use image's intrinsic dimensions when checking their usability
Instead of the rendered dimensions.
2022-03-05 23:40:08 +01:00
Jakub Berkop
d084f8d90a Profiler: Present read event info in tree structure
This commit adds "Filesystem Events" View to the Profiler. This tab
 will present combined information for recorded Filesystem events.
Currently only accumulated count and duration is presented.
Duration amount currently only shows events that took over 1ms,
which means that in most cases 0 is show.
2022-03-05 21:47:01 +01:00
Andreas Kling
bc82b3eaec LibWeb: Improve height:auto for position:absolute blocks
Previously we were not giving automatic height to position:absolute
blocks that had both top:auto and bottom:auto.
2022-03-05 21:26:19 +01:00
Andreas Kling
e61bf997db LibWeb: Don't break on *every character* in AllPossibleLineBreaks mode
This mode is used to find the min-content inline size, so we should
break between words, not characters.
2022-03-05 21:26:19 +01:00
Karol Kosek
32bd57bdc9 LibWeb: Use monospace font for <kbd> and <samp> elements 2022-03-05 21:25:14 +01:00
Karol Kosek
049abbc417 LibWeb: Strike-through <s> and <del> elements by default 2022-03-05 21:25:14 +01:00
Karol Kosek
ed70a67a49 LibWeb: Set default fantasy font to Comic Book
> Fantasy fonts are primarily decorative or expressive fonts that
> contain decorative or expressive representations of characters.
https://drafts.csswg.org/css-fonts/#valdef-font-family-fantasy

Seems like this font fits this description. :)
2022-03-05 21:25:14 +01:00
Karol Kosek
d7c27ad11a LibWeb: Set default serif font to Roman
It's the only Serif font we have, so let's use it!
2022-03-05 21:25:14 +01:00
electrikmilk
056ca62778 FontEditor: Add code previews for fixed-width fonts
Add pseudo code to font preview for fixed-width programming fonts.
2022-03-05 21:24:25 +01:00
Jelle Raaijmakers
59fa8323cf LibGL: Implement lighting parameter error checking 2022-03-05 21:23:56 +01:00
Jelle Raaijmakers
e1c863d99a LibSoftGPU: Use non-normalized light vector for attenuation
There were some issues with the old code: we were saving the length of
the light vector but not actually using it anywhere, if we were dealing
with a zero-vector this could potentially divide by zero resulting in a
black fragment color, and we were erroneously using P2's length instead
of P1's length when P1's W coordinate is zero in the SGI arrow
operation.

This fixes some lighting bugs in Grim Fandango, but this probably
affects all lighting as well.
2022-03-05 21:23:56 +01:00
Karol Kosek
743c0f0882 Base: Widen Plus Sign, Soliduses and Circumflex Accent in Katica Bold 12
Previously, the characters looked the same as in the Regular font
version.

Codepoints of modified characters: U+002B, U+002F, U+005C and U+005E.
2022-03-05 19:07:32 +01:00
Itamar
e9de381607 LibCpp: Don't include parameter type in FunctionType::to_string if null
The type of a function parameter can be null if we failed to parse it.
In such a case, calling to_string() on a FunctionType node used to cause
a null dereference.

This caused the language server to crash when processing
AK/StdLibExtraDetails.h
2022-03-05 15:36:03 +01:00
Tim Schumacher
495a1be925 tar: Implement support for extended headers :^) 2022-03-05 13:17:13 +01:00
Tim Schumacher
f6e86915f5 LibArchive: Implement a basic parser for tar extended headers 2022-03-05 13:17:13 +01:00
Tim Schumacher
ff19c1cffe tar: Use the prefixed path for listing and verbose output 2022-03-05 13:17:13 +01:00
Tim Schumacher
e0dba2b81b LibArchive: Add TarFileHeader::content_is_like_extended_header() 2022-03-05 13:17:13 +01:00
Tim Schumacher
e2d71823d3 tar: Prevent file buffering from reading uninitialized data
Regressed in 91fa10a0ab.
2022-03-05 13:09:42 +01:00
Jaime Valenzuela Durán
7c32400431 Base+LibGUI+LibGfx: Improve disabled text readability
Currently, disabled text colors are hardcoded. They look good in Default
and light themes, but no so good in dark ones. This PR adds new
variables for all themes to correctly display disabled text.
2022-03-05 10:25:14 +01:00
Linus Groh
26d29e9220 LibWeb: Implement LocationObject URL part getters closer to spec
- Perform a typed this check
- Use the 'associated URL' as the source of truth
- Don't append default port number in the host getter
- Don't return default port number in the port getter
- Add empty checks to the hash and search getters instead of returning
  '#' and '?' strings from the string builder
2022-03-05 10:24:53 +01:00
Linus Groh
7fb9f431ea LibWeb: Add LocationObject::url()
https://html.spec.whatwg.org/multipage/history.html#concept-location-url

> A Location object has an associated url, which is this Location
> object's relevant Document's URL, if this Location object's relevant
> Document is non-null, and about:blank otherwise.
2022-03-05 10:24:53 +01:00
Linus Groh
da8525279e LibWeb: Add LocationObject::relevant_document()
https://html.spec.whatwg.org/multipage/history.html#relevant-document

> A Location object has an associated relevant Document, which is this
> Location object's relevant global object's browsing context's active
> document, if this Location object's relevant global object's browsing
> context is non-null, and null otherwise.
2022-03-05 10:24:53 +01:00
Linus Groh
2f021e92a5 LibWeb: Add Window::browsing_context()
https://html.spec.whatwg.org/multipage/window-object.html#window-bc

> The Window object's browsing context is the Window object's associated
> Document's browsing context.
> NOTE: It is either null or a browsing context.
2022-03-05 10:24:53 +01:00
Linus Groh
986bd2e271 LibWeb: Add spec comments to LocationObject
This revealed a variety of issues, mostly missing origin checks,
conflating concepts like the 'associated URL', and serialization
(incorrect fallback values, string vs number, etc).

This commit fixes none of these issues, only adds FIXMEs.
2022-03-05 10:24:53 +01:00
u9g
4147b56e79 Spreadsheet: Allow integer() to throw in weird cases
Also makes numericResolve use parseInt to avoid using our own integer()
2022-03-05 05:46:35 +03:30
u9g
75a02300ba Spreadsheet: Add find, findIndex, indexOf, & has to CommonRange 2022-03-05 05:46:35 +03:30
u9g
87c818c571 Spreadsheet: Put common Range(s) functionality into CommonRange class 2022-03-05 05:46:35 +03:30
Andreas Kling
7d052250f2 LibWeb: Don't create unwanted layout nodes when recomputing style
When recomputing the style for an element that previously didn't have
a corresponding layout node, it may become necessary to create a layout
node for it.

However, we should not do this if it's within a subtree that can't have
layout children. Nor should we do it for elements who have an ancestor
with display:none.
2022-03-04 23:40:21 +01:00
Andreas Kling
a6a8ba80fc LibGfx: Rename Color::from_rgba() => Color::from_argb()
This matches the rename of RGBA32 to ARGB32. It also makes more sense
when you see it used with 32-bit hexadecimal literals:

Before:
    Color::from_rgba(0xaarrggbb)

After:
    Color::from_argb(0xaarrggbb)
2022-03-04 23:40:21 +01:00
Andreas Kling
5ace66a903 LibGfx: Rename RGBA32 => ARGB32
The ARGB32 typedef is used for 32-bit #AARRGGBB quadruplets. As such,
the name RGBA32 was misleading, so let's call it ARGB32 instead.

Since endianness is a thing, let's not encode any assumptions about byte
order in the name of this type. ARGB32 is basically a "machine word"
of color.
2022-03-04 23:40:21 +01:00
Andreas Kling
5c4bb03926 LibGfx+GameOfLife: Remove Gfx::make_rgb() and its one user 2022-03-04 23:40:21 +01:00