Commit graph

19977 commits

Author SHA1 Message Date
Matthew Olsson 72f693e9ed LibPDF: Add a basic parser and Document structure
This commit adds a parser as well as the Reader class, which serves
as a utility to aid in reading the PDF both forwards and in reverse.
The parser currently is capable of reading xref tables, as well as
all values. We don't really do anything with any of this information,
however.
2021-05-10 10:32:39 +02:00
Matthew Olsson a8f5b6aaa3 LibPDF: Create basic object structure
This commit is the start of LibPDF, and introduces some basic structure
objects. This emulates LibJS's Value structure, where Value is a simple
class that can contain a pointer to a more complex Object class with
more data. All of the basic PDF objects have a representation.
2021-05-10 10:32:39 +02:00
Matthew Olsson af9a7b1374 AK: Add missing 'const' in Span 2021-05-10 10:32:39 +02:00
Andreas Kling d0637e7923 IRCClient: Apply some polish to menus and actions 2021-05-10 10:28:41 +02:00
Andreas Kling e0508dd38a HexEditor: Apply some polish to menus and actions 2021-05-10 10:27:30 +02:00
Andreas Kling d4081b218c Browser: Apply some polish to menus and actions 2021-05-10 10:27:23 +02:00
Andreas Kling 634e652b6c WindowServer: Add "Move" action to window menus
This can be used to initiate a window move. It's only enabled while
the window is normal (not minimized, maximized or fullscreen.)
2021-05-10 09:06:37 +02:00
Andreas Kling 2bc3cc4cab WindowServer: Add separator above "Close" in window menus 2021-05-10 08:43:44 +02:00
Gunnar Beutner 9a41e7df2d Ports: Update build options for curl
This enables SSL support (verified to work), IPv6 (won't work for
lack of IPv6 support in the kernel) and threads.
2021-05-09 23:47:37 +01:00
Adam Hodgen 1e1571d647 Meta: Pin prettier linter version 2021-05-10 00:24:05 +02:00
Andreas Kling 353a831c8c WindowServer: Compute final window title before passing to WM clients
We were not substituting the window modified marker ("[*]") in the
title strings we were sending to WM clients. This caused the Taskbar
to show pre-substitution window titles for the Text Editor application.

This patch moves the window title resolution to Window::compute_title()
which is then used throughout.
2021-05-10 00:02:05 +02:00
Andreas Kling 1f24ab91f2 WindowServer: Notify WM clients when a window's modified state changes
Also update the window switcher for good measure. The window switcher
doesn't visualize this information at the moment, but we generally do
this when any window state changes.
2021-05-09 23:59:35 +02:00
Andreas Kling a47d576e94 WindowServer: Tweak width/height of automatic window tile rects
The resulting window rects when snapping to some edges/corners were
a bit lopsided. This patch makes them symmetrical. :^)
2021-05-09 21:48:38 +02:00
Andreas Kling 5497b7a718 WindowServer: Tweak spacing above maximized windows
Nudge maximized windows 1px upwards. This prevents the outer window
border from showing up above the title bar.
2021-05-09 21:48:38 +02:00
Andreas Kling 5aa9f128fc WindowServer: Simplify the way we update items in the window menu
Instead of trying to update only the little bit that changes, let's
have a function that updates all the window menu items in one go.

It's just a couple of string and boolean assignment, and the real
cost is performing the subsequent menu redraw, which remains the same.
2021-05-09 21:48:38 +02:00
Gunnar Beutner 62b76a7c95 Ports: Remove obsolete patches for openttd 2021-05-09 21:16:11 +02:00
Gunnar Beutner 76160ba3be Ports: Remove IPv6 patches for cmake 2021-05-09 21:16:11 +02:00
Gunnar Beutner 2a10257f33 Ports: Remove obsolete patches for stress-ng 2021-05-09 21:16:11 +02:00
Gunnar Beutner e4339be13b LibC: Add definitions/stubs for IPv6 functionality
This lets us build some of the ports without patching out any of their
IPv6 stuff.
2021-05-09 21:16:11 +02:00
Itamar 1bd6705636 LibCpp: Support Lexing escaped newlines 2021-05-09 20:58:27 +02:00
Itamar 5c19a48b95 CppLanguageServer: Cache declarations from headers in every document
Previously, to get the globally available declarations in a document
(including declarations from headers), we would have to recursively
walk the #include tree and get the declarations of each included
document.

To improve upon this, we now store a HashTable of globally available
declaration from included header files in each document, and populate
it when we first process the document.

Before this, invoking simple autocomplete actions in code documents
that had a very large #include tree (e.g when <LibGUI/Widget.h> was
included) hang the CppLanguageServer process and used 100% CPU until
the process ran out of memory.

Now, the autocomplete request in that situation returns immediately :^)
2021-05-09 20:58:27 +02:00
Itamar c85775d9f5 CppLanguageServer: Call Parser::parse() inside create_document_data() 2021-05-09 20:58:27 +02:00
Itamar 5c42dc854d LibCpp: Rename m_definitions=>m_preprocessor_definitions 2021-05-09 20:58:27 +02:00
Itamar de9be7cd70 LanguageServers: Fix incorrect use of adopt_ref in FileDB::get()
This fixes a bug introduced in c13d763 that caused the LanguageServer
process to crash whenever a file was edited in HackStudio.
2021-05-09 20:58:27 +02:00
Adam Hodgen dc9995a5ba LibWeb: Add tests for HTMLTableElement attributes
These tests aim to exercise all attributes on <html> elements, including
all edge cases.
2021-05-09 18:38:34 +02:00
Adam Hodgen 737f6e97b2 LibWeb: Fix nodeName attribute in tests
Commit 19731fc14c (#6864) made all nodeName attributes on HTML elements
uppercased. This change fixes that in all HTML & DOM tests.
2021-05-09 18:38:34 +02:00
Adam Hodgen 37685b0181 LibWeb: Implement HTMLTableElement tbody attributes
* tBodies - returns a HTMLCollection of all tbody elements
* createTBody - If necessary, creates a new tbody element
  and add it to the table after the last tbody element
2021-05-09 18:38:34 +02:00
Adam Hodgen d2e3e98b6b LibWeb: Implement HTMLTableElement tfoot attributes
* tFoot - Getter for the tfoot element
  The setter is not currently implemented
* createTFoot - If necessary, creates a new tfoot element
  and add it to the table after any tbody elements
* deleteTFoot - If a tfoot element exists in the table, delete it
2021-05-09 18:38:34 +02:00
Adam Hodgen b3f7ea9914 LibWeb: Implement HTMLTableElement thead attributes
* tHead - Getter for the thead element
  The setter is not currently implemented
* createTHead - If necessary, creates a new thead element
  and add it to the table after any caption or colgroup elements,
  but before anything else
* deleteTHead - If a thead element exists in the table, delete it
2021-05-09 18:38:34 +02:00
Adam Hodgen 0fa0367a39 LibWeb: Implement HTMLTableElement caption attributes
* caption - Getter and setter for the caption element
* createCaption - If necessary, creates a new caption element
  and add it to the table
* deleteCaption - If a caption element exists in the table, delete it
2021-05-09 18:38:34 +02:00
Adam Hodgen 887fa18e32 LibWeb: Implement HTMLTableElement row attributes
rows returns a HTMLCollection of all the tr elements contained within
the table.
We leave the SameObject attribute off the attribute in the IDL as we
cannot currently return the same HTMLCollection every time (see the
FIXME on DOM::Document::applets)

The WrapperGenerator currently does not correctly handle the default
value for the type long on insertRow. Currently not specifying the
index will insert a row at index 0.
2021-05-09 18:38:34 +02:00
Gunnar Beutner 2d600a8675 Ports: Add port for libopenal 2021-05-09 17:26:50 +01:00
Gunnar Beutner 8603041ed8 Ports: Add missing .so extension for ffmpeg library SONAMEs 2021-05-09 17:26:50 +01:00
Linus Groh 80a742b1b3 Ports: Remove obsolete patch for dropbear 2021-05-09 17:25:41 +01:00
Gunnar Beutner 52861226c3 Ports: Remove obsolete patches for stress-ng 2021-05-09 17:21:38 +01:00
Gunnar Beutner 93431b861a LibC: Add definition for the rlim_t type
The missing type caused the binutils and dash ports to fail to build.
2021-05-09 17:21:38 +01:00
Linus Groh 25cf59f2f6 Ports: Add note about Python webbrowser patch upstreaming 2021-05-09 17:15:15 +01:00
Linus Groh 2cbe510e89 Ports: Remove obsolete rlimit patch for Python
Stubs for getrlimit()/setrlimit() have been added in 1c3c072.
2021-05-09 17:11:02 +01:00
Mathieu Gaillard cf93512abe Demos: Implement basic Lambertian lighting for the GLTeapot
The teapot now looks more realistic
2021-05-09 16:14:15 +01:00
Mathieu Gaillard 7426c2fe45 Demos: Add indexed meshes in GLTeapot Demos
Improved the basic Wavefront OBJ loader to index vertices.
Uses less memory for the same mesh.
2021-05-09 16:14:15 +01:00
Egor Ananyin 782dc348fd LibGfx: Fix clipping in fill_ellipse
fill_ellipse used to clip the bounding box, so instead of drawing a
part of an ellipse it drew a smaller ellipse. This commit fixes this
behaviour.
2021-05-09 16:14:01 +01:00
Linus Groh 5eb062d8d3 Documentation: Update sync-local.sh keyboard layout example 2021-05-09 15:31:52 +01:00
Stephan Unverwerth e4db18e644 Demos: GLTeapot: Enable depth testing in demo 2021-05-09 15:58:35 +02:00
Stephan Unverwerth e8f66f821c LibGL: Add depth tests and writes to SoftwareRasterizer
Tests against and writes to the depth buffer when GL_DEPTH_TEST is
enabled via glEnable(). Currently fragment z is always compared against
existing depth with GL_LESS.
2021-05-09 15:58:35 +02:00
Stephan Unverwerth 608f81e6c2 LibGL: Add depth buffer class 2021-05-09 15:58:35 +02:00
Stephan Unverwerth a8fc4be47a LibGL: Add supporting code for depth buffer
This adds glClearDepth() and new caps for enabling and disabling
the depth buffer with glEnable() and glDisable()
2021-05-09 15:58:35 +02:00
Ömer Kurttekin d922c2f5f3
Userland: Preserve keyboard mapping preference on reboot (#6955) 2021-05-09 15:56:03 +02:00
Erlend 4c43fc0515
AnalogClock: New analog clock application (#6760) 2021-05-09 15:51:36 +02:00
Andreas Kling c53e937014 WindowServer: Constrain popup menu Y position within screen rect
This fixes an issue where large popup menus would open upwards despite
there not being enough space for that.
2021-05-09 15:47:21 +02:00
Andreas Kling 4c6e3d0c59 WindowServer: Fix a handful of clang-tidy warnings in the menu code
Some avoidable signed/unsigned mismatch, String move construction,
and functions that can be static constexpr.
2021-05-09 15:47:21 +02:00