head 1.4; access; symbols pkgsrc-2014Q4:1.3.0.6 pkgsrc-2014Q4-base:1.3 pkgsrc-2014Q3:1.3.0.4 pkgsrc-2014Q3-base:1.3 pkgsrc-2014Q2:1.3.0.2 pkgsrc-2014Q2-base:1.3 pkgsrc-2014Q1:1.1.0.2 pkgsrc-2014Q1-base:1.1; locks; strict; comment @// @; 1.4 date 2015.02.28.04.30.55; author ryoon; state dead; branches; next 1.3; commitid Y4EEeVfm51r1kJby; 1.3 date 2014.06.11.00.40.59; author ryoon; state Exp; branches; next 1.2; commitid QTw894DEf2Let2Ex; 1.2 date 2014.04.30.15.07.18; author ryoon; state Exp; branches; next 1.1; commitid BxErbE5mH8g3CIyx; 1.1 date 2014.03.20.21.02.00; author ryoon; state Exp; branches; next ; commitid 7yTA4yPlY6RyTttx; desc @@ 1.4 log @Update to 36.0 Changelog: New Pinned tiles on the new tab page can be synced New Support for the full HTTP/2 protocol. HTTP/2 enables a faster, more scalable, and more responsive web. New Locale added: Uzbek (uz) Changed -remote option removed Changed No longer accept insecure RC4 ciphers whenever possible Changed Phasing out Certificates with 1024-bit RSA Keys Changed Shut down hangs will now show the crash reporter before exiting the program Changed Add-on Compatibility HTML5 Support for the ECMAScript 6 Symbol data type added HTML5 unicode-range CSS descriptor implemented HTML5 CSSOM-View scroll behavior implemented allowing smooth scrolling of content without custom libraries HTML5 object-fit and object-position implemented. Defines how and where the content of a replaced element is displayed HTML5 isolation CSS property implemented. Create a new stacking context to isolate groups of boxes to control which blend together HTML5 CSS3 will-change property implemented. Hints the browser of elements that will be modified. The browser will perform some performance optimization for these HTML5 Changed JavaScript 'const' semantics to conform better to the ES6 specification. The const declaration is now block-scoped and requires an initializer. It also can not be redeclared anymore. HTML5 Improved ES6 generators for better performance Developer Eval sources now appear in the Debugger Debug JavaScript code that is evaluated dynamically, either as a string passed to eval() or as a string passed to the Function constructor Developer DOM Promises inspection Developer Inspector: More paste options in markup view Fixed CSS gradients work on premultiplied colors Fixed Fix some unexpected logout from Facebook or Google after restart Fixed Various security fixes Fixed in Firefox 36 2015-27 Caja Compiler JavaScript sandbox bypass 2015-26 UI Tour whitelisted sites in background tab can spoof foreground tabs 2015-25 Local files or privileged URLs in pages can be opened into new tabs 2015-24 Reading of local files through manipulation of form autocomplete 2015-23 Use-after-free in Developer Console date with OpenType Sanitiser 2015-22 Crash using DrawTarget in Cairo graphics library 2015-21 Buffer underflow during MP3 playback 2015-20 Buffer overflow during CSS restyling 2015-19 Out-of-bounds read and write while rendering SVG content 2015-18 Double-free when using non-default memory allocators with a zero-length XHR 2015-17 Buffer overflow in libstagefright during MP4 video playback 2015-16 Use-after-free in IndexedDB 2015-15 TLS TURN and STUN connections silently fail to simple TCP connections 2015-14 Malicious WebGL content crash when writing strings 2015-13 Appended period to hostnames can bypass HPKP and HSTS protections 2015-12 Invoking Mozilla updater will load locally stored DLL files 2015-11 Miscellaneous memory safety hazards (rv:36.0 / rv:31.5) @ text @$NetBSD: patch-content_media_gstreamer_GStreamerAllocator.cpp,v 1.3 2014/06/11 00:40:59 ryoon Exp $ --- content/media/gstreamer/GStreamerAllocator.cpp.orig 2014-05-29 23:30:33.000000000 +0000 +++ content/media/gstreamer/GStreamerAllocator.cpp @@@@ -51,7 +51,6 @@@@ typedef struct #pragma GCC diagnostic ignored "-Wunused-function" G_DEFINE_TYPE(MozGfxMemoryAllocator, moz_gfx_memory_allocator, GST_TYPE_ALLOCATOR); G_DEFINE_TYPE(MozGfxBufferPool, moz_gfx_buffer_pool, GST_TYPE_VIDEO_BUFFER_POOL); -#pragma GCC diagnostic pop void moz_gfx_memory_reset(MozGfxMemory *mem) @ 1.3 log @Update to 30.0 * debug build is broken Changelog: New Sidebars button in browser chrome enables faster access to social, bookmark, & history sidebars New Mac OS X command-E sets find term to selected text New Support for GStreamer 1.0 Changed Disallow calling WebIDL constructors as functions on the web Developer With the exception of those bundled inside an extension or ones that are whitelisted, plugins will no longer be activated by default (see blog post) Developer Fixes to box-shadow and other visual overflow (see bug 480888) Developer Mute and volume available per window when using WebAudio Developer background-blend-mode enabled by default Developer Use of line-height allowed for Developer ES6 array and generator comprehensions implemented (read docs for more details) Developer Error stack now contains column number Developer Support for alpha option in canvas context options (feature description) Fixed Ignore autocomplete="off" when offering to save passwords via the password manager (see 956906) Fixed TypedArrays don't support new named properties (see 695438) Fixed Various security fixes Fixed in Firefox 30 MFSA 2014-54 Buffer overflow in Gamepad API MFSA 2014-53 Buffer overflow in Web Audio Speex resampler MFSA 2014-52 Use-after-free with SMIL Animation Controller MFSA 2014-51 Use-after-free in Event Listener Manager MFSA 2014-50 Clickjacking through cursor invisability after Flash interaction MFSA 2014-49 Use-after-free and out of bounds issues found using Address Sanitizer MFSA 2014-48 Miscellaneous memory safety hazards (rv:30.0 / rv:24.6) @ text @d1 1 a1 1 $NetBSD: patch-content_media_gstreamer_GStreamerAllocator.cpp,v 1.2 2014/04/30 15:07:18 ryoon Exp $ @ 1.2 log @Update to 29.0 * Restore html5 audio playback under NetBSD Changelog: New Significant new customization mode makes it easy to personalize your Web experience to access the features you use the most (learn more) New A new, easy to access menu sits in the right hand corner of Firefox and includes popular browser controls New Sleek new tabs provide an overall smoother look and fade into the background when not active New An interactive onboarding tour to guide users through the new Firefox changes New The ability to set up Firefox Sync by creating a Firefox account (learn more) New Gamepad API finalized and enabled (learn more) New HTTPS used for Yahoo Searches performed in en-US locale New Malay [ma] locale added Changed Clicking on a W3C Web Notification will switch to the originating tab Developer 'box-sizing' (dropping the -moz- prefix) implemented (learn more) Developer Console object available in Web Workers (learn more) Developer Promises enabled by default (learn more) Developer SharedWorker enabled by default Developer implemented and enabled Developer implemented and enabled Developer Enabled ECMAScript Internationalization API Developer Add-on bar has been removed, content moved to navigation bar Developer Implemented URLSearchParams from the URL specification (see MDN for details ) Fixed Various security fixes Fixed in Firefox 29 MFSA 2014-47 Debugger can bypass XrayWrappers with JavaScript MFSA 2014-46 Use-after-free in nsHostResolve MFSA 2014-45 Incorrect IDNA domain name matching for wildcard certificates MFSA 2014-44 Use-after-free in imgLoader while resizing images MFSA 2014-43 Cross-site scripting (XSS) using history navigations MFSA 2014-42 Privilege escalation through Web Notification API MFSA 2014-41 Out-of-bounds write in Cairo MFSA 2014-40 Firefox for Android addressbar suppression MFSA 2014-39 Use-after-free in the Text Track Manager for HTML video MFSA 2014-38 Buffer overflow when using non-XBL object as XBL MFSA 2014-37 Out of bounds read while decoding JPG images MFSA 2014-36 Web Audio memory corruption issues MFSA 2014-35 Privilege escalation through Mozilla Maintenance Service Installer MFSA 2014-34 Miscellaneous memory safety hazards (rv:29.0 / rv:24.5) @ text @d1 1 a1 1 $NetBSD: patch-content_media_gstreamer_GStreamerAllocator.cpp,v 1.1 2014/03/20 21:02:00 ryoon Exp $ d3 1 a3 1 --- content/media/gstreamer/GStreamerAllocator.cpp.orig 2014-04-28 00:05:17.000000000 +0000 d5 8 a12 198 @@@@ -0,0 +1,197 @@@@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "GStreamerAllocator.h" + +#include +#include + +#include "GStreamerLoader.h" + +using namespace mozilla::layers; + +namespace mozilla { + +typedef struct +{ + GstAllocator parent; + GStreamerReader *reader; +} MozGfxMemoryAllocator; + +typedef struct +{ + GstAllocatorClass parent; +} MozGfxMemoryAllocatorClass; + +typedef struct +{ + GstMemory memory; + PlanarYCbCrImage* image; + guint8* data; +} MozGfxMemory; + +typedef struct +{ + GstMeta meta; +} MozGfxMeta; + +typedef struct +{ + GstVideoBufferPoolClass parent_class; +} MozGfxBufferPoolClass; + +typedef struct +{ + GstVideoBufferPool pool; +} MozGfxBufferPool; + +G_DEFINE_TYPE(MozGfxMemoryAllocator, moz_gfx_memory_allocator, GST_TYPE_ALLOCATOR); +G_DEFINE_TYPE(MozGfxBufferPool, moz_gfx_buffer_pool, GST_TYPE_VIDEO_BUFFER_POOL); + +void +moz_gfx_memory_reset(MozGfxMemory *mem) +{ + if (mem->image) + mem->image->Release(); + + ImageContainer* container = ((MozGfxMemoryAllocator*) mem->memory.allocator)->reader->GetImageContainer(); + mem->image = reinterpret_cast(container->CreateImage(ImageFormat::PLANAR_YCBCR).get()); + mem->data = mem->image->AllocateAndGetNewBuffer(mem->memory.size); +} + +static GstMemory* +moz_gfx_memory_allocator_alloc(GstAllocator* aAllocator, gsize aSize, + GstAllocationParams* aParams) +{ + MozGfxMemory* mem = g_slice_new (MozGfxMemory); + gsize maxsize = aSize + aParams->prefix + aParams->padding; + gst_memory_init(GST_MEMORY_CAST (mem), + (GstMemoryFlags)aParams->flags, + aAllocator, NULL, maxsize, aParams->align, + aParams->prefix, aSize); + mem->image = NULL; + moz_gfx_memory_reset(mem); + + return (GstMemory *) mem; +} + +static void +moz_gfx_memory_allocator_free (GstAllocator * allocator, GstMemory * gmem) +{ + MozGfxMemory *mem = (MozGfxMemory *) gmem; + + if (mem->memory.parent) + goto sub_mem; + + if (mem->image) + mem->image->Release(); + +sub_mem: + g_slice_free (MozGfxMemory, mem); +} + +static gpointer +moz_gfx_memory_map (MozGfxMemory * mem, gsize maxsize, GstMapFlags flags) +{ + // check that the allocation didn't fail + if (mem->data == nullptr) + return nullptr; + + return mem->data + mem->memory.offset; +} + +static gboolean +moz_gfx_memory_unmap (MozGfxMemory * mem) +{ + return TRUE; +} + +static MozGfxMemory * +moz_gfx_memory_share (MozGfxMemory * mem, gssize offset, gsize size) +{ + MozGfxMemory *sub; + GstMemory *parent; + + /* find the real parent */ + if ((parent = mem->memory.parent) == NULL) + parent = (GstMemory *) mem; + + if (size == (gsize) -1) + size = mem->memory.size - offset; + + /* the shared memory is always readonly */ + sub = g_slice_new (MozGfxMemory); + + gst_memory_init (GST_MEMORY_CAST (sub), + (GstMemoryFlags) (GST_MINI_OBJECT_FLAGS (parent) | GST_MINI_OBJECT_FLAG_LOCK_READONLY), + mem->memory.allocator, &mem->memory, mem->memory.maxsize, mem->memory.align, + mem->memory.offset + offset, size); + + sub->image = mem->image; + sub->data = mem->data; + + return sub; +} + +static void +moz_gfx_memory_allocator_class_init (MozGfxMemoryAllocatorClass * klass) +{ + GstAllocatorClass *allocator_class; + + allocator_class = (GstAllocatorClass *) klass; + + allocator_class->alloc = moz_gfx_memory_allocator_alloc; + allocator_class->free = moz_gfx_memory_allocator_free; +} + +static void +moz_gfx_memory_allocator_init (MozGfxMemoryAllocator * allocator) +{ + GstAllocator *alloc = GST_ALLOCATOR_CAST (allocator); + + alloc->mem_type = "moz-gfx-image"; + alloc->mem_map = (GstMemoryMapFunction) moz_gfx_memory_map; + alloc->mem_unmap = (GstMemoryUnmapFunction) moz_gfx_memory_unmap; + alloc->mem_share = (GstMemoryShareFunction) moz_gfx_memory_share; + /* fallback copy and is_span */ +} + +void +moz_gfx_memory_allocator_set_reader(GstAllocator* aAllocator, GStreamerReader* aReader) +{ + MozGfxMemoryAllocator *allocator = (MozGfxMemoryAllocator *) aAllocator; + allocator->reader = aReader; +} + +nsRefPtr +moz_gfx_memory_get_image(GstMemory *aMemory) +{ + NS_ASSERTION(GST_IS_MOZ_GFX_MEMORY_ALLOCATOR(aMemory->allocator), "Should be a gfx image"); + + return ((MozGfxMemory *) aMemory)->image; +} + +void +moz_gfx_buffer_pool_reset_buffer (GstBufferPool* aPool, GstBuffer* aBuffer) +{ + GstMemory* mem = gst_buffer_peek_memory(aBuffer, 0); + + NS_ASSERTION(GST_IS_MOZ_GFX_MEMORY_ALLOCATOR(mem->allocator), "Should be a gfx image"); + moz_gfx_memory_reset((MozGfxMemory *) mem); + GST_BUFFER_POOL_CLASS(moz_gfx_buffer_pool_parent_class)->reset_buffer(aPool, aBuffer); +} + +static void +moz_gfx_buffer_pool_class_init (MozGfxBufferPoolClass * klass) +{ + GstBufferPoolClass *pool_class = (GstBufferPoolClass *) klass; + pool_class->reset_buffer = moz_gfx_buffer_pool_reset_buffer; +} + +static void +moz_gfx_buffer_pool_init (MozGfxBufferPool * pool) +{ +} + +} // namespace mozilla @ 1.1 log @Update to 28.0 Changelog: NEW VP9 video decoding implemented NEW Mac OS X: Notification Center support for web notifications NEW Horizontal HTML5 audio/video volume control NEW Support for Opus in WebM CHANGED Now that spdy/3 is implemented support for spdy/2 has been removed and servers without spdy/3 will negotiate to http/1 without any penalty DEVELOPER Support for MathML 2.0 'mathvariant' attribute DEVELOPER Background thread hang reporting DEVELOPER Support for multi-line flexbox in layout FIXED Various security fixes Fixed in Firefox 28 MFSA 2014-32 Out-of-bounds write through TypedArrayObject after neutering MFSA 2014-31 Out-of-bounds read/write through neutering ArrayBuffer objects MFSA 2014-30 Use-after-free in TypeObject MFSA 2014-29 Privilege escalation using WebIDL-implemented APIs MFSA 2014-28 SVG filters information disclosure through feDisplacementMap MFSA 2014-27 Memory corruption in Cairo during PDF font rendering MFSA 2014-26 Information disclosure through polygon rendering in MathML MFSA 2014-25 Firefox OS DeviceStorageFile object vulnerable to relative path escape MFSA 2014-24 Android Crash Reporter open to manipulation MFSA 2014-23 Content Security Policy for data: documents not preserved by session restore MFSA 2014-22 WebGL content injection from one domain to rendering in another MFSA 2014-21 Local file access via Open Link in new tab MFSA 2014-20 onbeforeunload and Javascript navigation DOS MFSA 2014-19 Spoofing attack on WebRTC permission prompt MFSA 2014-18 crypto.generateCRMFRequest does not validate type of key MFSA 2014-17 Out of bounds read during WAV file decoding MFSA 2014-16 Files extracted during updates are not always read only MFSA 2014-15 Miscellaneous memory safety hazards (rv:28.0 / rv:24.4) @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- content/media/gstreamer/GStreamerAllocator.cpp.orig 2014-03-20 11:09:40.000000000 +0000 d5 1 a5 1 @@@@ -0,0 +1,198 @@@@ d64 1 a64 2 + ImageFormat format = PLANAR_YCBCR; + mem->image = reinterpret_cast(container->CreateImage(&format, 1).get()); @