diff options
author | drochner <drochner@pkgsrc.org> | 2011-01-25 18:38:16 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2011-01-25 18:38:16 +0000 |
commit | 262ca0f5aeb0ce5e1b2a32363df48eda513247a2 (patch) | |
tree | 83c6c525c60d75afc09baa5225b405762de32708 /www | |
parent | 61268c58adb7a5bae9b93b5d5beacc66e8f5adab (diff) | |
download | pkgsrc-262ca0f5aeb0ce5e1b2a32363df48eda513247a2.tar.gz |
-fix the png-1.5 API problem using a new function introduced in beta08
which is simpler and more runtime efficient
-pull in some stability patches from upstream
bump PKGREV
Diffstat (limited to 'www')
-rw-r--r-- | www/webkit-gtk/Makefile | 5 | ||||
-rw-r--r-- | www/webkit-gtk/distinfo | 7 | ||||
-rw-r--r-- | www/webkit-gtk/patches/patch-ab | 61 | ||||
-rw-r--r-- | www/webkit-gtk/patches/patch-bc | 18 | ||||
-rw-r--r-- | www/webkit-gtk/patches/patch-bd | 58 | ||||
-rw-r--r-- | www/webkit-gtk/patches/patch-be | 27 |
6 files changed, 120 insertions, 56 deletions
diff --git a/www/webkit-gtk/Makefile b/www/webkit-gtk/Makefile index 5de1bfc5361..08cf25995f6 100644 --- a/www/webkit-gtk/Makefile +++ b/www/webkit-gtk/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.34 2011/01/15 14:51:26 wiz Exp $ +# $NetBSD: Makefile,v 1.35 2011/01/25 18:38:16 drochner Exp $ DISTNAME= webkit-1.2.6 PKGNAME= ${DISTNAME:S/webkit/webkit-gtk/} -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= www MASTER_SITES= http://www.webkitgtk.org/ @@ -42,6 +42,7 @@ REPLACE_PERL+= JavaScriptCore/pcre/dftables \ # A correct Webkit build requires flex 2.5.33 .include "../../graphics/freetype2/buildlink3.mk" .include "../../mk/jpeg.buildlink3.mk" +BUILDLINK_API_DEPENDS.png+= png>=1.5.1beta08 .include "../../graphics/png/buildlink3.mk" .include "../../multimedia/gstreamer0.10/buildlink3.mk" .include "../../multimedia/gst-plugins0.10-base/buildlink3.mk" diff --git a/www/webkit-gtk/distinfo b/www/webkit-gtk/distinfo index 92efcdb95ed..035a61d0017 100644 --- a/www/webkit-gtk/distinfo +++ b/www/webkit-gtk/distinfo @@ -1,10 +1,13 @@ -$NetBSD: distinfo,v 1.25 2011/01/15 14:51:52 wiz Exp $ +$NetBSD: distinfo,v 1.26 2011/01/25 18:38:16 drochner Exp $ SHA1 (webkit-1.2.6.tar.gz) = 0dcfbf7cedda400567f2e081b12987b9d82b33eb RMD160 (webkit-1.2.6.tar.gz) = 84d7101c84f2735744f08b5e8ed684ccf05a59dd Size (webkit-1.2.6.tar.gz) = 6613589 bytes -SHA1 (patch-ab) = f5145029bc03f14911e3678d8f3284853e48ac90 +SHA1 (patch-ab) = 48e493e98451b2a86c4af0b8308831ce5db8c841 SHA1 (patch-ad) = a5edd3fbff91488d220a3bfeb506865883c912cb SHA1 (patch-af) = 971258e19192d058c4ca580abcbeb3b02f3bf6ce SHA1 (patch-ba) = 4de4994b4e27db0243cca5a2cf409495c3fd382f SHA1 (patch-bb) = 7199554b39664df9a6310106f7a03d632731105a +SHA1 (patch-bc) = 2d5057e1caa48e9592c7185c160912d1ef4a8f4f +SHA1 (patch-bd) = aaca4c45c4d313f3d92b599842272d0e61fb24c2 +SHA1 (patch-be) = a90f18d4954ba3abf46a30c9792d6c48f83f6e60 diff --git a/www/webkit-gtk/patches/patch-ab b/www/webkit-gtk/patches/patch-ab index 316fedc5299..f71040e9e8a 100644 --- a/www/webkit-gtk/patches/patch-ab +++ b/www/webkit-gtk/patches/patch-ab @@ -1,4 +1,4 @@ -$NetBSD: patch-ab,v 1.5 2011/01/15 14:51:52 wiz Exp $ +$NetBSD: patch-ab,v 1.6 2011/01/25 18:38:16 drochner Exp $ Fix build with png-1.5. From John Bowler. @@ -16,47 +16,7 @@ Fix build with png-1.5. From John Bowler. } // Callbacks given to the read struct. The first is for warnings (we want to -@@ -139,14 +143,31 @@ public: - - const char* segment; - while (unsigned segmentLength = data.getSomeData(segment, m_readOffset)) { -- m_readOffset += segmentLength; -- m_currentBufferSize = m_readOffset; -- png_process_data(m_png, m_info, reinterpret_cast<png_bytep>(const_cast<char*>(segment)), segmentLength); -- // We explicitly specify the superclass isSizeAvailable() because we -- // merely want to check if we've managed to set the size, not -- // (recursively) trigger additional decoding if we haven't. -- if (sizeOnly ? decoder->ImageDecoder::isSizeAvailable() : decoder->isComplete()) -- return; -+ if (sizeOnly) { -+ while (segmentLength > 0) { -+ // Unfortunately if we read the image at this point it will be ignored, -+ // therefore take small steps through the data until the head is read. -+ // This is crude but effective. -+ m_currentBufferSize = ++m_readOffset; -+ png_process_data(m_png, m_info, reinterpret_cast<png_bytep>(const_cast<char*>(segment)), 1); -+ -+ // We explicitly specify the superclass isSizeAvailable() because we -+ // merely want to check if we've managed to set the size, not -+ // (recursively) trigger additional decoding if we haven't. -+ if (decoder->ImageDecoder::isSizeAvailable()) -+ return; -+ -+ --segmentLength; -+ ++segment; -+ } -+ } else { -+ // Just process the whole segment at once: -+ m_readOffset += segmentLength; -+ m_currentBufferSize = m_readOffset; -+ png_process_data(m_png, m_info, reinterpret_cast<png_bytep>(const_cast<char*>(segment)), segmentLength); -+ if (decoder->isComplete()) -+ return; -+ } - } - if (!decoder->isComplete() && decoder->isAllDataReceived()) - decoder->pngComplete(); -@@ -216,18 +237,26 @@ void PNGImageDecoder::headerAvailable() +@@ -216,18 +220,26 @@ void PNGImageDecoder::headerAvailable() { png_structp png = m_reader->pngPtr(); png_infop info = m_reader->infoPtr(); @@ -86,20 +46,17 @@ Fix build with png-1.5. From John Bowler. return; } -@@ -274,12 +303,6 @@ void PNGImageDecoder::headerAvailable() - ASSERT(channels == 3 || channels == 4); +@@ -277,8 +289,7 @@ void PNGImageDecoder::headerAvailable() - m_reader->setHasAlpha(channels == 4); -- -- if (m_reader->decodingSizeOnly()) { -- // If we only needed the size, halt the reader. + if (m_reader->decodingSizeOnly()) { + // If we only needed the size, halt the reader. - m_reader->setReadOffset(m_reader->currentBufferSize() - png->buffer_size); - png->buffer_size = 0; -- } ++ m_reader->setReadOffset(m_reader->currentBufferSize() - png_process_data_pause(png, 0/*do not save the data*/)); + } } - void PNGImageDecoder::rowAvailable(unsigned char* rowBuffer, unsigned rowIndex, int interlacePass) -@@ -291,7 +314,11 @@ void PNGImageDecoder::rowAvailable(unsig +@@ -291,7 +302,11 @@ void PNGImageDecoder::rowAvailable(unsig RGBA32Buffer& buffer = m_frameBufferCache[0]; if (buffer.status() == RGBA32Buffer::FrameEmpty) { if (!buffer.setSize(scaledSize().width(), scaledSize().height())) { @@ -111,7 +68,7 @@ Fix build with png-1.5. From John Bowler. return; } buffer.setStatus(RGBA32Buffer::FramePartial); -@@ -300,7 +327,8 @@ void PNGImageDecoder::rowAvailable(unsig +@@ -300,7 +315,8 @@ void PNGImageDecoder::rowAvailable(unsig // For PNGs, the frame always fills the entire image. buffer.setRect(IntRect(IntPoint(), size())); diff --git a/www/webkit-gtk/patches/patch-bc b/www/webkit-gtk/patches/patch-bc new file mode 100644 index 00000000000..e05768086bd --- /dev/null +++ b/www/webkit-gtk/patches/patch-bc @@ -0,0 +1,18 @@ +$NetBSD: patch-bc,v 1.1 2011/01/25 18:38:16 drochner Exp $ + +--- WebCore/page/FrameView.cpp.orig 2010-09-28 21:02:14.000000000 +0000 ++++ WebCore/page/FrameView.cpp +@@ -972,8 +972,11 @@ bool FrameView::scrollToAnchor(const Str + if (anchorNode && anchorNode->hasTagName(SVGNames::viewTag)) { + RefPtr<SVGViewElement> viewElement = anchorNode->hasTagName(SVGNames::viewTag) ? static_cast<SVGViewElement*>(anchorNode) : 0; + if (viewElement.get()) { +- RefPtr<SVGSVGElement> svg = static_cast<SVGSVGElement*>(SVGLocatable::nearestViewportElement(viewElement.get())); +- svg->inheritViewAttributes(viewElement.get()); ++ SVGElement* element = SVGLocatable::nearestViewportElement(viewElement.get()); ++ if (element->hasTagName(SVGNames::svgTag)) { ++ RefPtr<SVGSVGElement> svg = static_cast<SVGSVGElement*>(element); ++ svg->inheritViewAttributes(viewElement.get()); ++ } + } + } + } diff --git a/www/webkit-gtk/patches/patch-bd b/www/webkit-gtk/patches/patch-bd new file mode 100644 index 00000000000..6bd779c27b1 --- /dev/null +++ b/www/webkit-gtk/patches/patch-bd @@ -0,0 +1,58 @@ +$NetBSD: patch-bd,v 1.1 2011/01/25 18:38:16 drochner Exp $ + +--- WebCore/editing/ReplaceSelectionCommand.cpp.orig 2010-09-10 13:20:33.000000000 +0000 ++++ WebCore/editing/ReplaceSelectionCommand.cpp +@@ -51,11 +51,14 @@ + #include "markup.h" + #include "visible_units.h" + #include <wtf/StdLibExtras.h> ++#include <wtf/Vector.h> + + namespace WebCore { + + using namespace HTMLNames; + ++typedef Vector<RefPtr<Node> > NodeVector; ++ + enum EFragmentType { EmptyFragment, SingleTextNodeFragment, TreeFragment }; + + // --- ReplacementFragment helper class +@@ -707,7 +710,13 @@ void ReplaceSelectionCommand::handleStyl + void ReplaceSelectionCommand::copyStyleToChildren(Node* parentNode, const CSSMutableStyleDeclaration* parentStyle) + { + ASSERT(parentNode->hasTagName(spanTag)); +- for (Node* childNode = parentNode->firstChild(); childNode; childNode = childNode->nextSibling()) { ++ NodeVector childNodes; ++ for (RefPtr<Node> childNode = parentNode->firstChild(); childNode; childNode = childNode->nextSibling()) ++ childNodes.append(childNode); ++ ++for (NodeVector::const_iterator it = childNodes.begin(); it != childNodes.end(); it++) { ++ Node* childNode = it->get(); ++ + if (childNode->isTextNode() || !isBlock(childNode) || childNode->hasTagName(preTag)) { + // In this case, put a span tag around the child node. + RefPtr<Node> newSpan = parentNode->cloneNode(false); +@@ -867,7 +876,11 @@ void ReplaceSelectionCommand::doApply() + + // Inserting content could cause whitespace to collapse, e.g. inserting <div>foo</div> into hello^ world. + prepareWhitespaceAtPositionForSplit(insertionPos); +- ++ ++ // If the downstream node has been removed there's no point in continuing. ++ if (!insertionPos.downstream().node()) ++ return; ++ + // NOTE: This would be an incorrect usage of downstream() if downstream() were changed to mean the last position after + // p that maps to the same visible position as p (since in the case where a br is at the end of a block and collapsed + // away, there are positions after the br which map to the same visible position as [br, 0]). +@@ -945,8 +958,8 @@ void ReplaceSelectionCommand::doApply() + bool plainTextFragment = isPlainTextMarkup(refNode.get()); + + while (node) { +- Node* next = node->nextSibling(); +- fragment.removeNode(node); ++ RefPtr<Node> next = node->nextSibling(); ++ fragment.removeNode(node.get()); + insertNodeAfterAndUpdateNodesInserted(node, refNode.get()); + + // Mutation events (bug 22634) may have already removed the inserted content diff --git a/www/webkit-gtk/patches/patch-be b/www/webkit-gtk/patches/patch-be new file mode 100644 index 00000000000..c62c0f021ed --- /dev/null +++ b/www/webkit-gtk/patches/patch-be @@ -0,0 +1,27 @@ +$NetBSD: patch-be,v 1.1 2011/01/25 18:38:16 drochner Exp $ + +--- JavaScriptCore/interpreter/Interpreter.cpp.orig 2010-12-28 12:24:33.000000000 +0000 ++++ JavaScriptCore/interpreter/Interpreter.cpp +@@ -3465,17 +3465,17 @@ skip_id_custom_self: + goto vm_throw; + } + ASSERT(!callFrame->callee()->isHostFunction()); +- uint32_t expectedParams = callFrame->callee()->jsExecutable()->parameterCount(); +- uint32_t inplaceArgs = min(argCount, expectedParams); +- uint32_t i = 0; ++ int32_t expectedParams = callFrame->callee()->jsExecutable()->parameterCount(); ++ int32_t inplaceArgs = min(static_cast<int32_t> (argCount), expectedParams); ++ int32_t i = 0; + Register* argStore = callFrame->registers() + argsOffset; + + // First step is to copy the "expected" parameters from their normal location relative to the callframe + for (; i < inplaceArgs; i++) + argStore[i] = callFrame->registers()[i - RegisterFile::CallFrameHeaderSize - expectedParams]; + // Then we copy any additional arguments that may be further up the stack ('-1' to account for 'this') +- for (; i < argCount; i++) +- argStore[i] = callFrame->registers()[i - RegisterFile::CallFrameHeaderSize - expectedParams - argCount - 1]; ++ for (; i < static_cast<int32_t> (argCount); i++) ++ argStore[i] = callFrame->registers()[i - RegisterFile::CallFrameHeaderSize - expectedParams - static_cast<int32_t> (argCount) - 1]; + } else if (!arguments.isUndefinedOrNull()) { + if (!arguments.isObject()) { + exceptionValue = createInvalidParamError(callFrame, "Function.prototype.apply", arguments, vPC - callFrame->codeBlock()->instructions().begin(), callFrame->codeBlock()); |