Commit Graph

54880 Commits

Author SHA1 Message Date
Jérôme Duval
ac7f52fc91 app_server: fix x86_64 build. 2015-11-14 19:37:59 +01:00
Jérôme Duval
81768f44e7 XHCI USB: include in the Haiku package, only enabled two devices
for now.
2015-11-14 19:37:59 +01:00
Adrien Destugues
894640da2d ffmpeg: recognize planar audio and request packed instead
* Our media kit is designed to work with packed audio: which means the
  samples from different channels are interleaved in a single stream
* Old ffmpeg versions also used this, but they now switched to the
  planar format, where each channel is stored separately.
* Fortunately, we can request ffmpeg to use the packed format. We
  actually already tried to do that, but the API for requesting a sample
  format has also changed.
* Finally, we didn't recognize the packed format reported by the codecs,
  which in some cases could lead to 16/32 bit mismatches on top of the
  planar/packed mixup.

Fixes audio with ffmpeg 2.8 (ticket #12460)
2015-11-14 19:22:26 +01:00
Julian Harnath
6b56f7d282 app_server: add a few missing std::nothrow 2015-11-14 16:09:54 +01:00
Julian Harnath
b54b3ae511 app_server: add a cache for AlphaMasks
* If the same shape alpha mask is set again and again, we now keep
  the rendered masks in a cache. On certain websites, WebKit sets
  the same shape for clipping hundreds of times, which uses a lot
  of time to render the masks.

* When a shape mask was generated, we put it into AlphaMaskCache.
  The constructor for ShapeAlphaMask is made private and a factory
  method is used for instantiation instead, which transparently
  looks up in the cache whether a suitable mask was already generated
  before (so the entire caching is encapsulated inside the AlphaMask
  class).

* When taking a mask out of the cache, we still create a new
  AlphaMask instance. However, the new instance will share the
  mask bitmap with the previously generated instance (aside from
  the rendering of their bitmap, AlphaMask instances are pretty
  lightweight). Shape masks are only seen as identical when
  their shape is the same, the inverse flag, and they have the
  same parent mask.

* Cache is limited to a fixed size of currently 8 MiB, using a
  simple random replacement scheme. An LRU scheme can be added in
  the future if necessary. Counting of bytes for the cache size
  includes parent masks of masks in the cache, even if the parent
  itself is not cached. A reference counter for "indirect" cache
  references keeps track of which masks are not part of the cache,
  but still need to be added to the cache byte size.

* For now, only for ShapeAlphaMasks, other mask types can be added
  as necessary.
2015-11-14 16:09:52 +01:00
Julian Harnath
10df15449b app_server: plug leak of layers when empty clipping
* If there is an empty clipping region (invalid clipping) for the
  current view, a new layer could still be started, but not ended
  anymore. That's because unlike begin layer, end layer is handled in
  _DispatchViewDrawingMessage (because it can do actual drawing)
  and this method checks whether the clipping is valid and bails out
  if it isn't.

* Add an exception for the AS_VIEW_END_LAYER command code to still
  process it even when the clipping is invalid. The layer itself
  can after all set a valid clipping later on when its command list
  is played back. And even if it doesn't, we still have to play it
  to make sure nested layers are cleaned up.

* Fixes the memory leak in #12460 where webkit creates
  said situation: it had a layer open and then the closing was
  ignored due to empty clipping. All subsequent layer calls created
  nested layers in that one, hundreds of them, and their BPictures
  contained bitmaps, quickly eating up and leaking hundreds of MiB
  in app_server.
2015-11-14 16:09:49 +01:00
Julian Harnath
0fab27a23e app_server: don't ignore invisible layers
* When a layer has opacity 0, we can't just ignore it, we still
  have to play back its picture, even if the drawing will never
  appear on screen. This is because there might be nested layers
  and if they don't get blended, their references are not released.
  Also, it can be argued that state changes in the layer should be
  applied even if the layer is invisible (if we ignore it there,
  it would be inconsistent with other layers).

  This edge case of invisible layers could be optimized further, but
  it is rare enough anyway, so this should do.
2015-11-14 16:09:47 +01:00
Julian Harnath
2193dcd799 app_server: plug DrawState instance leak, other minor fixes
* OffscreenCanvas was not deleting its DrawState. Found thanks to
  the allocation tracking feature in libroot_debug (thanks mmlr!)

* Also a missing nothrow and a missing ref release in an error case
2015-11-14 16:09:45 +01:00
Julian Harnath
bcc5cf7d29 test_app_server: fix use after free
* Caught with libroot_debug
2015-11-14 16:09:43 +01:00
Julian Harnath
e718dc9178 app_server: Clip alpha masks to canvas size
* Making the alpha masks independent of view size is a good thing,
  however it turns out that I was too optimistic about the
  consequences: webkit sometimes sets masks for the whole page, not
  just the currently visible area. E.g. on Github diff views, it
  was seen to set a clipping path which is about 1,000 x 10,000
  pixels in size. Generating these huge masks eats up lots of memory
  and time.

* We now clip the alpha masks to the current view size. This
  introduces a dependency between mask and view again, however a
  weaker one than it used to be before the mask rework. When the
  view is enlarged, and the alpha mask was previously clipped during
  rendering, we regenerate it at the new size. When the view is
  shrunk however, we don't do anything and just keep the
  now larger than necessary mask around (so we don't have to
  regenerate again when the view is subsequently enlarged again --
  except if it then becomes even larger than it used to be).
  Changing the view origin is unaffected and still doesn't cause a
  regenerate.
2015-11-14 16:09:40 +01:00
Gerasim Troeglazov
c37db53b57 Add sane_backends and Sanity packages 2015-11-14 11:10:35 +00:00
autonielx
d7188e0b65 Update translations from Pootle 2015-11-14 06:39:38 +01:00
Adrien Destugues
7460727d4a IP address control: don't try to DNS resolve
* This is used when configuring the DNS client, so resolving will not
  work
* It is supposed to be a control for entering IPs, not domain names.

Fixes #12464.
2015-11-13 21:50:11 +01:00
Adrien Destugues
1f70a8df4b SecureSocket: enable auto retry on connexion re-negociation
This is required to talk with the proxy in Thalys trains.
Now I'm online and I can push this!
2015-11-13 18:25:35 +01:00
Adrien Destugues
2ecff85ce1 HttpRequest: don't send an empty URL for GET request
* The new proxy in Thalys trains doesn't like that.
2015-11-13 18:23:52 +01:00
Adrien Destugues
f86df64b91 Web+: implement a simple session management system.
When quitting the app or closing the last window, all windows and tabs
are stored in a "Session" file. This is reloaded when the browser
starts, allowing to restore all windows and tabs.

Limitations: the page content and navigation history are not saved. The
file is written only at exit so this can't be used for crash recovery
(but you can make a backup of your default session).

Fixes #6680.
2015-11-13 14:32:13 +01:00
Axel Dörfler
be741f6ec1 Minor cleanup of translator roster commit, updated copyright. 2015-11-13 11:37:15 +01:00
Axel Dörfler
07432f3975 AboutSystem: Added Markus Himmel as contributor. 2015-11-13 11:35:15 +01:00
Markus Himmel
a1eccae96f Make sure images containing BTranslators are not unloaded early
When a translator is uninstalled, BTranslatorPrivate::_RemoveTranslators is
called. This method used to unload the image containing the translator after
calling Release() on it resulting in several problems:

- If the translator was still busy, e.g. translating something while being
  installed, it crashed since the image was unloaded even though its refcount
  was larger than 0.
- Applications using code from one of the translators (e.g. its config view)
  would crash when the translator is uninstalled (this is bug #12005).

This problem is now fixed. The roster keeps track of all translators whose
image it manages (even if the translator was already removed from the roster).
It also keeps a refcount to all images. When a translator's refcount drops to
zero and it belonged to a roster at some point, it does not delete itself, but
notifies the roster that it is ready to destruct, which then removes it from
the roster if the translator is still in it, destroys the translator, decrements
the refcount of the image and if the new refcount is zero, unloads the image.
All of this is done in a message handler, since if the translator called
TranslatorDeleted like before, the unloaded image would be referenced when
the stack is walked up.

Finally, the DataTranslations preflet is required to Acquire() the translator
whose config view it is showing, because otherwise its refcount could be reduced
to 0 and the image unloaded. BTranslatorRoster now enables users to acquire a
translator by ID. By the time the translator has to be released, it might not
be part of the roster anymore though. Since BTranslatorRoster tries not to give
out raw pointers to the translators it manages, users who acquire a translator
through a roster now are given a BTranslatorReleaseDelegate, which allows for
releasing the BTranslator exactly once and then self-destructs.

Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2015-11-13 11:26:53 +01:00
Markus Himmel
fdfc54b571 Remove unnecessary whitespace in AppDefs.h
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2015-11-13 11:26:41 +01:00
Adrien Destugues
43c2927886 pkgman: show old version when updating packages. 2015-11-13 11:02:49 +01:00
Adrien Destugues
709ac637dd Update hub, f1spirit, and sdl_net 2015-11-13 10:07:58 +01:00
Adrien Destugues
bbb79b8b7f openssl_x86: really fix library versionning. 2015-11-13 08:53:54 +01:00
Adrien Destugues
691e517bbd build fix.
* can't use min here, this header is not supposed to #include
  <algorithm>.
2015-11-12 22:24:16 +01:00
Adrien Destugues
4e3137c085 Add another missing string::compare method
* Makes our gcc2 slightly more C++98 compliant...
2015-11-12 22:08:23 +01:00
Adrien Destugues
6ae8d586ea Web+: More reasonable default size for cookie manager. 2015-11-12 14:07:28 +01:00
Gerasim Troeglazov
33ba5c6a7f Update libqt4 and qsystray packages for x86_gcc2 2015-11-12 12:44:59 +00:00
Adrien Destugues
9c1f4f1026 Fix NetSurf dependency on libutf8proc. 2015-11-12 13:18:56 +01:00
François Revol
220c5364ab unbootstrap.sh: make it executable 2015-11-12 11:07:46 +01:00
Adrien Destugues
5b7cdbbb23 WebPositive: add a cookie manager.
* Allows you to view and delete cookies.
* The list of domains is hierarchized and collapsed to minimize the
  number of empty entries
* All cookie parameters are shown for each domain: name, path, value,
  expiration date, and known flags.
2015-11-12 10:48:12 +01:00
Adrien Destugues
0b6c189559 BNetworkCookieJar: rework locking
The cookie jar used to be locked whenever an iterator was instanciated.
This didn't work well when using several iterators in the same thread,
because the BLocker then allows all of them to access the list
concurrently.

Rework the locking code to use a more fine grained approach, where the
cookie jar is only locked temporarily by methods which require it. These
methods are the ones which get and put new domain-lists in the jar, as
well as acquiring the locks on the domain-lists.

Each domain-list in the jar is locked using a read/write lock as before.
This means there can be many requests getting cookies for the same
domain in paralel, but only one at a time is allowed to set new cookies.

The iterators keep domain lists they need to access read-locked, as long
as they iterate the cookies for that domain.

A limitation of this approach is that deleting a domain-list when it
becomes empty is difficult. We can live with this, however, the
iteration still works (it just skips empty lists), and the empty lists
will not be stored or restored when archiving the cookie jar.
2015-11-12 10:18:35 +01:00
Adrien Destugues
bd0bb0cae6 add libutf8proc
Required by NetSurf.
2015-11-12 08:33:36 +01:00
Automatic Committer
9311f342ef Update pci.ids from pciids.sourceforge.net 2015-11-12 05:20:24 +01:00
Axel Dörfler
93bb55e413 launch_daemon: Fixed resetting launch status, port update.
* _SetLaunchStatus() doesn't allow to set the status to B_NO_INIT
  (and rightly so).
* Therefore, we now reset it manually in Job::TeamDeleted(). This
  fixes restarting things that once ran on demand.
* Also update the port message when the default port changes.
2015-11-11 21:27:49 +01:00
Rene Gollent
190df86bd4 Debugger: Fix handling of pointer fields in messages.
BMessageValueNode:
- When resolving a pointer field, look up the type by the  fully qualified
  name, as that's how it winds up being stored in the lookup map. Also,
  due to gcc omitting the unspecified parent type on such pointers entirely,
  looking them up by base type name this way won't work anyhow.
2015-11-11 15:11:47 -05:00
Rene Gollent
6ec76089d9 x86: Revert changes due to various dependency issues. 2015-11-11 11:26:16 -05:00
Rene Gollent
cdb29d3806 x86: Update subversion and deps. 2015-11-11 10:45:32 -05:00
Rene Gollent
fcffaec1ca x86: Add libz. 2015-11-11 10:07:47 -05:00
Axel Dörfler
9e73b62749 launch_daemon: Fixed preregister consequences.
* Since the last change, the user launch_daemon would talk to the
  registrar again.
* However, this also caused BRoster::Launch() to preregister the app,
  which messed up our preallocated port.
* BRoster::Private::Launch() now allows to get the port that the
  registrar created in such a case, and the launch_daemon will now just
  use that one as default port.
* This lets us talk to the Deskbar again, and should fix #12455, as
  well as #12454 (again).
2015-11-11 16:04:02 +01:00
Rene Gollent
2c2ba72cf4 x86: Update more OpenSSL-dependent packages. 2015-11-11 09:30:54 -05:00
François Revol
bf53f0684f <disk_system>fat: fix gcc4 build
I noticed the syntax for libsupc++ in the BFS Jamfile addon differed but didn't think it mattered.
2015-11-11 15:18:04 +01:00
François Revol
038621114e Add FAT addon for DriveSetup
Tested with a 5MB image, seems to work.

There seems to be an issue with too long names though, or possibly names with spaces.

Also, technically it supports FAT12,16 and 32, so it should probably be renamed
in the interface.

Didn't check how to declare support for more than 1 partition types either.
2015-11-11 14:41:51 +01:00
François Revol
910a2b8c86 fat: Add initialization support
Not much tested yet but it does work on a 5MB image with mkfs.
2015-11-11 14:41:51 +01:00
François Revol
6476935b27 fat: copy over the mkdos sources 2015-11-11 14:41:51 +01:00
Adrien Destugues
ae2f71baa7 Update several packages that link against openssl. 2015-11-11 11:59:03 +01:00
Adrien Destugues
e7f7c4b2d3 ffmpeg: add some alternate MIME types to the known demuxers
* These are the standard types used in HTML5 media, tell everyone that
  we can handle them.
* A few more green items in html5test.com, no extra points since none of
  the formats are mandatory however.
2015-11-11 11:58:42 +01:00
Julian Harnath
b45b6e2341 haikuwebkit: update revision in the package desc. as well 2015-11-11 10:03:07 +01:00
Rene Gollent
aac45df1e8 x86: Update curl to 7.45. 2015-11-10 22:19:19 -05:00
Rene Gollent
9d5046cf55 x86: Update OpenSSL and WebKit packages. 2015-11-10 21:49:58 -05:00
Adrien Destugues
f1c1a9dfa8 SecureSocket: stubs for no-openssl version 2015-11-11 01:50:17 +01:00