Linus Groh
18a5ddfadd
LibGfx: Draw window frame icon scaled to title_bar_icon_rect()
...
Partially fixes #5806 .
2021-03-15 22:47:05 +01:00
Oleg Sikorskiy
33bd18f308
QuickShow: Do not reset the panning on 100% zoom.
2021-03-15 22:46:53 +01:00
Oleg Sikorskiy
ee64c814c6
QuickShow: Use a better formula for zooming.
...
Now the pixel under the cursor doesn't move, which is more consistent
with other image viewers (e.g. GwenView and IrfanView). Also switch
m_pan_origin to use window space to have less space transformations.
2021-03-15 22:46:53 +01:00
Linus Groh
d6239b691f
LibJS: Throw SyntaxError in eval() when parser has error(s)
2021-03-15 22:43:27 +01:00
Mițca Dumitru
01a49dda85
LibM: Implement fmin/fmax
2021-03-15 22:02:38 +01:00
Mițca Dumitru
987cc904c2
LibM: Make the gamma family of functions more accurate and conformant
...
This patch makes tgamma use an approximation that is more accurate with
regards to floating point arithmetic, and fixes some issues when tgamma
was called with positive integer values.
It also makes lgamma set signgam to the correct value, and makes its
return value be more inline with what the C standard defines.
2021-03-15 22:02:38 +01:00
Mițca Dumitru
2d0f334e5d
LibM: Declare rintl in math.h
2021-03-15 22:02:38 +01:00
Andreas Kling
45e6b5e601
LibJS: Make eval() return the last value from the executed statement
...
This is kinda awkward but since the statement we're executing is
actually a JS::Program, we have to get the result via VM::last_value().
2021-03-15 21:43:40 +01:00
Idan Horowitz
a955fd4156
LibCompress+AK: Propagate error handling to wrapped streams
...
This ensures that when a DeflateCompressor stream is cleared of any
errors its underlying wrapped streams (InputBitStream/InputMemoryStream)
will be cleared as well and wont fail a VERIFY on destruction.
2021-03-15 21:35:48 +01:00
Idan Horowitz
f532421c9c
LibCompress: Make the Zlib decompressor fail gracefuly
...
This commit adds a verify-less try_create method to the Zlib
decompressor to allow for graceful failures of parsing the
Zlib headers.
2021-03-15 21:35:48 +01:00
Andreas Kling
a7b5a58509
Kernel: Fix sys$select() not marking fd's after blocking was avoided
...
In case multiple file descriptors in the `fd_set` were already readable
and/or writable when calling Thread::block<SelectBlocker>(), we would
only mark the first fd in the output sets instead of all relevant fd's.
The short-circuit code path when blocking isn't necessary must ensure
that unblock flags are collected for all file descriptors, not just the
first one encountered.
Fixes #5795 .
2021-03-15 21:21:52 +01:00
Andreas Kling
8cafdf8985
LibWeb: Make sure <script> elements get prepared when connected
...
There's a bit more nuance to how this should really work, but let's at
least make sure we execute <script> elements if you insert them into
the document.
2021-03-15 21:20:33 +01:00
Andreas Kling
d434ae71b3
LibWeb: Add CanvasRenderingContext2D.clearRect()
...
Similar to fillRect, except this API fills with transparent black.
2021-03-15 21:20:33 +01:00
Andreas Kling
4559faf8d8
LibWeb: Support named CSS properties on CSSStyleDeclaration wrapper
...
Use the new CustomGet/CustomPut wrapper mechansim to intercept gets and
puts on CSSStyleDeclaration objects. This allows content to get and set
individual CSS properties from JavaScript. :^)
2021-03-15 21:20:33 +01:00
Andreas Kling
ab23ef92b6
LibWeb: Allow JS wrappers to customize get() and put()
...
You can now set the CustomGet and/or CustomPut extended attributes on
an interface. This allows you to override JS::Object::get/put in the
wrapper class.
2021-03-15 21:20:33 +01:00
Andreas Kling
c7d1f73990
LibWeb: Make <option> elements display:none in the default CSS for now
2021-03-15 21:20:33 +01:00
Andreas Kling
8062fc711c
LibJS: Add arguments.callee to our hack arguments object
...
arguments.callee refers to the currently executing function.
2021-03-15 21:20:33 +01:00
Andreas Kling
093331df06
LibJS: Add Date.prototype.toGMTString()
2021-03-15 21:20:33 +01:00
Andreas Kling
36ea9fbd9e
LibWeb: Stub out Document.cookie
...
We don't get/set anything, but at least scripts that access document
cookies can now progress further. :^)
2021-03-15 21:20:33 +01:00
Andreas Kling
3596c42deb
LibJS: Partial support for Date.prototype.setFullYear()
2021-03-15 21:20:33 +01:00
Andreas Kling
4da3e5d91f
LibJS: Add naive implementation of eval() :^)
...
This parses and executes a code string in the caller's lexical scope.
2021-03-15 21:20:33 +01:00
Andreas Kling
64cb04996f
AK: Make ByteBuffer::slice(0, size()) a freebie
...
If you want the whole buffer, we can just give you the buffer itself.
2021-03-15 18:01:11 +01:00
Elie Donadio
3a5a9a683f
Apply suggestions from code review
...
Small adjustments, as suggested by linus.
Co-authored-by: Linus Groh <mail@linusgroh.de>
2021-03-15 16:08:31 +01:00
ElDonad
f4f12982ff
bt: add source file number integration
2021-03-15 16:08:31 +01:00
ElDonad
a0c0d781e8
LaunchServer: added additional file parameters
...
This small commit should allow to specify additionnal parameters in the
form of URL queries, when opening a file via a "file://" url through the
LaunchServer.
2021-03-15 16:08:31 +01:00
Idan Horowitz
c9f25bca04
LibTextCodec: Make UTF16BEDecoder read only up to an even offset
...
Reading up to the end of the input string of odd length results in
an out-of-bounds read
2021-03-15 16:08:12 +01:00
Brendan Coles
7156b61d57
UserspaceEmulator: downgrade TODO to dbgln for invalid fcntl cmd arg
2021-03-15 16:07:31 +01:00
Luke
7276511833
Kernel/Storage: Add SATA error disambiguation
2021-03-15 09:57:27 +01:00
Andreas Kling
a166a65eff
Kernel: Don't return -EFOO when return type is KResultOr<...>
2021-03-15 09:09:04 +01:00
Cesar Torres
2b269b27e7
LibGUI: Fix crash when text_in_range() was called on an empty document
2021-03-15 09:08:15 +01:00
Cesar Torres
4f34a78337
TextEditor: Add charcount info about selected text to the statusbar
2021-03-15 09:08:15 +01:00
Tom Needham
daf2e5d335
Ports: Do not call ./package.sh from a subshell in ./build_all.sh
...
This patch ensures that ./package.sh is run in the same shell
This solves compiling issues when building certain ports.
This fix was suggested by linusg in
https://github.com/SerenityOS/serenity/issues/5783#issuecomment-798906817
2021-03-15 09:07:17 +01:00
Tom Needham
26d72d3048
Ports: Allow verbose argument in build_all.sh
...
This patch allows for a verbose argument to be passed
so that the build output of the individual builds
is printed to stdout instead of /dev/null to help with diagnosing errors
If the verbose argument is not passed the old behaviour is preserved
and the build output is printed to /dev/null
2021-03-15 09:07:17 +01:00
Liav A
3c35ea30cc
Kernel: Return 0 to indicate EOF when reading from end-of-file of device
...
If we happen to read with offset that is after the end of file of a
device, return 0 to indicate EOF. If we return a negative value,
userspace will think that something bad happened when it's really not
the case.
2021-03-15 09:06:41 +01:00
Tom
5ccc3637e3
Kernel: Fix race conditions processing async device requests
2021-03-15 09:06:41 +01:00
Tom
8177f2474b
Kernel: Fix race condition completing IDEChannel async request
2021-03-15 09:06:41 +01:00
Liav A
a66c9fc593
Kernel: When writing to device node, use can_write for checking
...
Instead of can_read which is wrong, use can_write.
2021-03-15 09:06:41 +01:00
AnotherTest
125be2923c
Shell: Consume the username when parsing '~user'
...
Otherwise it will stay there and be parsed as a juxtaposition.
Fixes #5798 .
2021-03-15 09:06:21 +01:00
Linus Groh
f59d58cb76
LibELF+LibTest: Fix serenity_install_sources() paths
...
Currently we end up with the following:
serenity/
AK/
...
Kernel/
...
Libraries/
LibELF/
LibTest/
Userland/
Libraries/
<all other libs>
...
2021-03-15 09:06:10 +01:00
Magnus Alvestad
a3b03eef01
Keymap: Added no-latin1.json for Norwegian pc105 keyboards ( #5794 )
2021-03-15 08:48:26 +01:00
Mițca Dumitru
32b9437c13
LibM: Add remainder{f, l}
...
These just forward their arguments to fmod, but I think that should be
fine.
2021-03-14 21:43:08 +01:00
Mițca Dumitru
e4197b7854
LibM: Define HUGE_VAL{F,L} in terms of compiler builtins
2021-03-14 21:43:08 +01:00
Mițca Dumitru
e9533da0e7
LibM: Define MAXFLOAT
...
Looks like a POSIX extension
2021-03-14 21:43:08 +01:00
Mițca Dumitru
86ee9211be
LibM: Define FLT_EVAL_METHOD, float_t and double_t
2021-03-14 21:43:08 +01:00
Mițca Dumitru
1f1a4f488f
LibM: Declare ldexpl in math.h
...
It was already defined, but it wasn't declared in the header
2021-03-14 21:43:08 +01:00
Mițca Dumitru
93c554f6bd
LibM: Add the gamma family of functions
2021-03-14 21:43:08 +01:00
Mițca Dumitru
7aac174bc8
LibM: Organise math.h so it is less of a wall of functions
...
The categories are the same categories used by cppreference on its page
for numeric functions.
2021-03-14 21:43:08 +01:00
Mițca Dumitru
c9601cdee3
LibM: Implement the missing parts of the round family
2021-03-14 21:43:08 +01:00
Mițca Dumitru
03b2d30836
LibM: Add missing float and long double function variants
2021-03-14 21:43:08 +01:00
Brendan Coles
eecaa3bed6
test-compress: Initialize byte buffer with random data
2021-03-14 21:37:29 +01:00