Commit 6af8f0ef authored by Alberto Garcia's avatar Alberto Garcia
Browse files

Imported Upstream version 2.8.3+dfsg1

parent e9d750e4
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKit2GTK+ Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.8.2</p></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.8.3</p></div>
</div>
<hr>
</div>
......
......@@ -127,7 +127,7 @@ against at application run time.</p>
<hr>
<div class="refsect2">
<a name="WEBKIT-MICRO-VERSION:CAPS"></a><h3>WEBKIT_MICRO_VERSION</h3>
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (2)
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (3)
</pre>
<p>Like <a class="link" href="webkit2gtk-4.0-WebKitVersion.html#webkit-get-micro-version" title="webkit_get_micro_version ()"><code class="function">webkit_get_micro_version()</code></a>, but from the headers used at
application compile time, rather than from the library linked
......
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKitDOMGTK+ Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.8.2</p></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.8.3</p></div>
</div>
<hr>
</div>
......
=================
WebKitGTK+ 2.8.3
=================
What's new in WebKitGTK+ 2.8.3?
- Fixed a regression introduced in 2.8.2 that broke downloads when using the network
process.
- Fix the build with Netscape plugins disabled.
- Fix XPixamps leaked by GLContext when using EGL on X11.
=================
WebKitGTK+ 2.8.2
=================
......
......@@ -168,6 +168,16 @@ static inline JSString* jsStringWithReuse(ExecState* exec, JSValue originalValue
return jsString(exec, string);
}
// Helper that tries to use the JSString substring sharing mechanism if 'originalValue' is a JSString.
static inline JSString* jsSubstring(ExecState* exec, JSValue originalValue, const String& string, unsigned offset, unsigned length)
{
if (originalValue.isString()) {
ASSERT(asString(originalValue)->value(exec) == string);
return jsSubstring(exec, asString(originalValue), offset, length);
}
return jsSubstring(exec, string, offset, length);
}
static NEVER_INLINE String substituteBackreferencesSlow(StringView replacement, StringView source, const int* ovector, RegExp* reg, size_t i)
{
StringBuilder substitutedReplacement;
......@@ -1010,7 +1020,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncSlice(ExecState* exec)
// Return true in case of early return (resultLength got to limitLength).
template<typename CharacterType>
static ALWAYS_INLINE bool splitStringByOneCharacterImpl(ExecState* exec, JSArray* result, const String& input, StringImpl* string, UChar separatorCharacter, size_t& position, unsigned& resultLength, unsigned limitLength)
static ALWAYS_INLINE bool splitStringByOneCharacterImpl(ExecState* exec, JSArray* result, JSValue originalValue, const String& input, StringImpl* string, UChar separatorCharacter, size_t& position, unsigned& resultLength, unsigned limitLength)
{
// 12. Let q = p.
size_t matchPosition;
......@@ -1024,7 +1034,7 @@ static ALWAYS_INLINE bool splitStringByOneCharacterImpl(ExecState* exec, JSArray
// through q (exclusive).
// 2. Call the [[DefineOwnProperty]] internal method of A with arguments ToString(lengthA),
// Property Descriptor {[[Value]]: T, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true}, and false.
result->putDirectIndex(exec, resultLength, jsSubstring(exec, input, position, matchPosition - position));
result->putDirectIndex(exec, resultLength, jsSubstring(exec, originalValue, input, position, matchPosition - position));
// 3. Increment lengthA by 1.
// 4. If lengthA == lim, return A.
if (++resultLength == limitLength)
......@@ -1130,7 +1140,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec)
// through q (exclusive).
// 2. Call the [[DefineOwnProperty]] internal method of A with arguments ToString(lengthA),
// Property Descriptor {[[Value]]: T, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true}, and false.
result->putDirectIndex(exec, resultLength, jsSubstring(exec, input, position, matchPosition - position));
result->putDirectIndex(exec, resultLength, jsSubstring(exec, thisValue, input, position, matchPosition - position));
// 3. Increment lengthA by 1.
// 4. If lengthA == lim, return A.
......@@ -1150,7 +1160,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec)
// ToString(lengthA), Property Descriptor {[[Value]]: cap[i], [[Writable]]:
// true, [[Enumerable]]: true, [[Configurable]]: true}, and false.
int sub = ovector[i * 2];
result->putDirectIndex(exec, resultLength, sub < 0 ? jsUndefined() : jsSubstring(exec, input, sub, ovector[i * 2 + 1] - sub));
result->putDirectIndex(exec, resultLength, sub < 0 ? jsUndefined() : jsSubstring(exec, thisValue, input, sub, ovector[i * 2 + 1] - sub));
// c Increment lengthA by 1.
// d If lengthA == lim, return A.
if (++resultLength == limit)
......@@ -1215,10 +1225,10 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec)
separatorCharacter = separatorImpl->characters16()[0];
if (stringImpl->is8Bit()) {
if (splitStringByOneCharacterImpl<LChar>(exec, result, input, stringImpl, separatorCharacter, position, resultLength, limit))
if (splitStringByOneCharacterImpl<LChar>(exec, result, thisValue, input, stringImpl, separatorCharacter, position, resultLength, limit))
return JSValue::encode(result);
} else {
if (splitStringByOneCharacterImpl<UChar>(exec, result, input, stringImpl, separatorCharacter, position, resultLength, limit))
if (splitStringByOneCharacterImpl<UChar>(exec, result, thisValue, input, stringImpl, separatorCharacter, position, resultLength, limit))
return JSValue::encode(result);
}
} else {
......@@ -1233,7 +1243,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec)
// through q (exclusive).
// 2. Call the [[DefineOwnProperty]] internal method of A with arguments ToString(lengthA),
// Property Descriptor {[[Value]]: T, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true}, and false.
result->putDirectIndex(exec, resultLength, jsSubstring(exec, input, position, matchPosition - position));
result->putDirectIndex(exec, resultLength, jsSubstring(exec, thisValue, input, position, matchPosition - position));
// 3. Increment lengthA by 1.
// 4. If lengthA == lim, return A.
if (++resultLength == limit)
......@@ -1250,7 +1260,7 @@ EncodedJSValue JSC_HOST_CALL stringProtoFuncSplit(ExecState* exec)
// through s (exclusive).
// 15. Call the [[DefineOwnProperty]] internal method of A with arguments ToString(lengthA), Property Descriptor
// {[[Value]]: T, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true}, and false.
result->putDirectIndex(exec, resultLength++, jsSubstring(exec, input, position, input.length() - position));
result->putDirectIndex(exec, resultLength++, jsSubstring(exec, thisValue, input, position, input.length() - position));
// 16. Return A.
return JSValue::encode(result);
......
......@@ -634,7 +634,7 @@ void ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuild
if (auto* paragraphElement = enclosingElementWithTag(positionInParentBeforeNode(node.get()), pTag)) {
auto* parent = paragraphElement->parentNode();
if (parent && parent->hasEditableStyle())
moveNodeOutOfAncestor(node, paragraphElement);
moveNodeOutOfAncestor(node, paragraphElement, insertedNodes);
}
}
......@@ -642,7 +642,7 @@ void ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuild
auto* headerElement = highestEnclosingNodeOfType(positionInParentBeforeNode(node.get()), isHeaderElement);
if (headerElement) {
if (headerElement->parentNode() && headerElement->parentNode()->isContentRichlyEditable())
moveNodeOutOfAncestor(node, headerElement);
moveNodeOutOfAncestor(node, headerElement, insertedNodes);
else {
HTMLElement* newSpanElement = replaceElementWithSpanPreservingChildrenAndAttributes(downcast<HTMLElement>(node.get()));
insertedNodes.didReplaceNode(node.get(), newSpanElement);
......@@ -652,7 +652,7 @@ void ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuild
}
}
void ReplaceSelectionCommand::moveNodeOutOfAncestor(PassRefPtr<Node> prpNode, PassRefPtr<Node> prpAncestor)
void ReplaceSelectionCommand::moveNodeOutOfAncestor(PassRefPtr<Node> prpNode, PassRefPtr<Node> prpAncestor, InsertedNodes& insertedNodes)
{
RefPtr<Node> node = prpNode;
RefPtr<Node> ancestor = prpAncestor;
......@@ -670,8 +670,10 @@ void ReplaceSelectionCommand::moveNodeOutOfAncestor(PassRefPtr<Node> prpNode, Pa
removeNode(node);
insertNodeBefore(node, nodeToSplitTo);
}
if (!ancestor->firstChild())
if (!ancestor->firstChild()) {
insertedNodes.willRemoveNode(ancestor.get());
removeNode(ancestor.release());
}
}
static inline bool hasRenderedText(const Text& text)
......
......@@ -97,7 +97,7 @@ private:
void removeRedundantStylesAndKeepStyleSpanInline(InsertedNodes&);
void makeInsertedContentRoundTrippableWithHTMLTreeBuilder(InsertedNodes&);
void moveNodeOutOfAncestor(PassRefPtr<Node>, PassRefPtr<Node> ancestor);
void moveNodeOutOfAncestor(PassRefPtr<Node>, PassRefPtr<Node> ancestor, InsertedNodes&);
void handleStyleSpans(InsertedNodes&);
void handlePasteAsQuotationNode();
......
......@@ -161,7 +161,7 @@ ResourceLoader* DocumentLoader::mainResourceLoader() const
DocumentLoader::~DocumentLoader()
{
ASSERT(!m_frame || frameLoader()->activeDocumentLoader() != this || !isLoading());
RELEASE_ASSERT_WITH_MESSAGE(!m_waitingForContentPolicy, "The content policy callback should never outlive its DocumentLoader.");
ASSERT_WITH_MESSAGE(!m_waitingForContentPolicy, "The content policy callback should never outlive its DocumentLoader.");
if (m_iconLoadDecisionCallback)
m_iconLoadDecisionCallback->invalidate();
if (m_iconDataCallback)
......@@ -675,7 +675,7 @@ void DocumentLoader::responseReceived(CachedResource* resource, const ResourceRe
void DocumentLoader::continueAfterContentPolicy(PolicyAction policy)
{
RELEASE_ASSERT(m_waitingForContentPolicy);
ASSERT(m_waitingForContentPolicy);
m_waitingForContentPolicy = false;
if (isStopping())
return;
......@@ -952,7 +952,7 @@ void DocumentLoader::detachFromFrame()
InspectorInstrumentation::loaderDetachedFromFrame(*m_frame, *this);
m_frame = nullptr;
// The call to stopLoading() above should have canceled any pending content policy check.
RELEASE_ASSERT_WITH_MESSAGE(!m_waitingForContentPolicy, "The content policy callback needs a valid frame.");
ASSERT_WITH_MESSAGE(!m_waitingForContentPolicy, "The content policy callback needs a valid frame.");
}
void DocumentLoader::clearMainResourceLoader()
......
......@@ -170,9 +170,9 @@ std::unique_ptr<GLContextEGL> GLContextEGL::createPbufferContext(EGLContext shar
return std::make_unique<GLContextEGL>(context, surface, PbufferSurface);
}
#if PLATFORM(X11)
std::unique_ptr<GLContextEGL> GLContextEGL::createPixmapContext(EGLContext sharingContext)
{
#if PLATFORM(X11)
EGLDisplay display = sharedEGLDisplay();
if (display == EGL_NO_DISPLAY)
return nullptr;
......@@ -198,18 +198,15 @@ std::unique_ptr<GLContextEGL> GLContextEGL::createPixmapContext(EGLContext shari
}
EGLSurface surface = eglCreatePixmapSurface(display, config, pixmap, 0);
if (surface == EGL_NO_SURFACE) {
XFreePixmap(sharedX11Display(), pixmap);
eglDestroyContext(display, context);
return nullptr;
}
return std::make_unique<GLContextEGL>(context, surface, PixmapSurface);
#else
return nullptr;
#endif
return std::make_unique<GLContextEGL>(context, surface, pixmap);
}
#endif // PLATFORM(X11)
std::unique_ptr<GLContextEGL> GLContextEGL::createContext(EGLNativeWindowType window, GLContext* sharingContext)
{
......@@ -229,12 +226,13 @@ std::unique_ptr<GLContextEGL> GLContextEGL::createContext(EGLNativeWindowType wi
EGLContext eglSharingContext = sharingContext ? static_cast<GLContextEGL*>(sharingContext)->m_context : 0;
auto context = window ? createWindowContext(window, sharingContext) : nullptr;
#if PLATFORM(X11)
if (!context)
context = createPixmapContext(eglSharingContext);
#endif
if (!context)
context = createPbufferContext(eglSharingContext);
return WTF::move(context);
}
......@@ -242,12 +240,20 @@ GLContextEGL::GLContextEGL(EGLContext context, EGLSurface surface, EGLSurfaceTyp
: m_context(context)
, m_surface(surface)
, m_type(type)
#if USE(CAIRO)
, m_cairoDevice(0)
#endif
{
ASSERT(type != PixmapSurface);
}
#if PLATFORM(X11)
GLContextEGL::GLContextEGL(EGLContext context, EGLSurface surface, Pixmap pixmap)
: m_context(context)
, m_surface(surface)
, m_type(PixmapSurface)
, m_pixmap(pixmap)
{
}
#endif
GLContextEGL::~GLContextEGL()
{
#if USE(CAIRO)
......@@ -264,6 +270,11 @@ GLContextEGL::~GLContextEGL()
if (m_surface)
eglDestroySurface(display, m_surface);
#if PLATFORM(X11)
if (m_pixmap)
XFreePixmap(sharedX11Display(), m_pixmap);
#endif
}
bool GLContextEGL::canRenderToDefaultFramebuffer()
......
......@@ -23,9 +23,12 @@
#if USE(EGL)
#include "GLContext.h"
#include <EGL/egl.h>
#if PLATFORM(X11)
typedef unsigned long Pixmap;
#endif
namespace WebCore {
class GLContextEGL : public GLContext {
......@@ -36,6 +39,9 @@ public:
static std::unique_ptr<GLContextEGL> createWindowContext(EGLNativeWindowType, GLContext* sharingContext);
GLContextEGL(EGLContext, EGLSurface, EGLSurfaceType);
#if PLATFORM(X11)
GLContextEGL(EGLContext, EGLSurface, Pixmap);
#endif
virtual ~GLContextEGL();
virtual bool makeContextCurrent();
virtual void swapBuffers();
......@@ -52,7 +58,9 @@ public:
private:
static std::unique_ptr<GLContextEGL> createPbufferContext(EGLContext sharingContext);
#if PLATFORM(X11)
static std::unique_ptr<GLContextEGL> createPixmapContext(EGLContext sharingContext);
#endif
static void addActiveContext(GLContextEGL*);
static void cleanupSharedEGLDisplay(void);
......@@ -60,8 +68,11 @@ private:
EGLContext m_context;
EGLSurface m_surface;
EGLSurfaceType m_type;
#if PLATFORM(X11)
Pixmap m_pixmap;
#endif
#if USE(CAIRO)
cairo_device_t* m_cairoDevice;
cairo_device_t* m_cairoDevice { nullptr };
#endif
};
......
......@@ -529,14 +529,12 @@ void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
// Determine the text colors and selection colors.
TextPaintStyle textPaintStyle = computeTextPaintStyle(renderer().frame(), lineStyle, paintInfo);
bool paintSelectedTextOnly;
bool paintSelectedTextSeparately;
const ShadowData* selectionShadow;
TextPaintStyle selectionPaintStyle = computeTextSelectionPaintStyle(textPaintStyle, renderer(), lineStyle, paintInfo, paintSelectedTextOnly, paintSelectedTextSeparately, selectionShadow);
bool paintSelectedTextOnly = false;
bool paintSelectedTextSeparately = false;
const ShadowData* selectionShadow = nullptr;
// Text with custom underlines does not have selection background painted, so selection paint style is not appropriate for it.
if (useCustomUnderlines)
selectionPaintStyle = textPaintStyle;
TextPaintStyle selectionPaintStyle = haveSelection && !useCustomUnderlines ? computeTextSelectionPaintStyle(textPaintStyle, renderer(), lineStyle, paintInfo, paintSelectedTextOnly, paintSelectedTextSeparately, selectionShadow) : textPaintStyle;
// Set our font.
const FontCascade& font = fontToUse(lineStyle, renderer());
......
......@@ -774,7 +774,8 @@ void RenderLayerBacking::updateGeometry()
RenderLayer::ClipRectsContext clipRectsContext(compAncestor, TemporaryClipRects, IgnoreOverlayScrollbarSize, shouldRespectOverflowClip);
LayoutRect parentClipRect = m_owningLayer.backgroundClipRect(clipRectsContext).rect(); // FIXME: Incorrect for CSS regions.
ASSERT(!parentClipRect.isInfinite());
m_ancestorClippingLayer->setPosition(FloatPoint(parentClipRect.location() - graphicsLayerParentLocation));
FloatPoint enclosingClippingLayerPosition = floorPointToDevicePixels(LayoutPoint(parentClipRect.location() - graphicsLayerParentLocation), deviceScaleFactor);
m_ancestorClippingLayer->setPosition(enclosingClippingLayerPosition);
m_ancestorClippingLayer->setSize(parentClipRect.size());
// backgroundRect is relative to compAncestor, so subtract deltaX/deltaY to get back to local coords.
......
......@@ -79,8 +79,11 @@ void paintFlow(const RenderBlockFlow& flow, const Layout& layout, PaintInfo& pai
paintRect.moveBy(-paintOffset);
auto resolver = runResolver(flow, layout);
float strokeOverflow = ceilf(flow.style().textStrokeWidth());
for (const auto& run : resolver.rangeForRect(paintRect)) {
if (!run.rect().intersects(paintRect))
FloatRect rect = run.rect();
rect.inflate(strokeOverflow);
if (!rect.intersects(paintRect))
continue;
TextRun textRun(run.text());
textRun.setTabSize(!style.collapseWhiteSpace(), style.tabSize());
......@@ -127,8 +130,10 @@ bool hitTestFlow(const RenderBlockFlow& flow, const Layout& layout, const HitTes
void collectFlowOverflow(RenderBlockFlow& flow, const Layout& layout)
{
auto resolver = lineResolver(flow, layout);
float strokeOverflow = ceilf(flow.style().textStrokeWidth());
for (auto it = resolver.begin(), end = resolver.end(); it != end; ++it) {
auto rect = *it;
rect.inflate(strokeOverflow);
flow.addLayoutOverflow(rect);
flow.addVisualOverflow(rect);
}
......
......@@ -206,10 +206,9 @@ void NetworkResourceLoader::cleanup()
NetworkProcess::singleton().networkResourceLoadScheduler().removeLoader(this);
if (m_handle) {
if (m_handle && !m_didConvertHandleToDownload)
m_handle->setClient(nullptr);
m_handle = nullptr;
}
m_handle = nullptr;
// This will cause NetworkResourceLoader to be destroyed and therefore we do it last.
m_connection->didCleanupResourceLoader(*this);
......
......@@ -671,7 +671,9 @@ void webkit_web_context_set_additional_plugins_directory(WebKitWebContext* conte
g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
g_return_if_fail(directory);
#if ENABLE(NETSCAPE_PLUGIN_API)
context->priv->context->setAdditionalPluginsDirectory(WebCore::filenameToString(directory));
#endif
}
static void destroyPluginList(GList* plugins)
......@@ -681,10 +683,12 @@ static void destroyPluginList(GList* plugins)
static void webkitWebContextGetPluginThread(GTask* task, gpointer object, gpointer /* taskData */, GCancellable*)
{
Vector<PluginModuleInfo> plugins = WEBKIT_WEB_CONTEXT(object)->priv->context->pluginInfoStore().plugins();
GList* returnValue = 0;
#if ENABLE(NETSCAPE_PLUGIN_API)
Vector<PluginModuleInfo> plugins = WEBKIT_WEB_CONTEXT(object)->priv->context->pluginInfoStore().plugins();
for (size_t i = 0; i < plugins.size(); ++i)
returnValue = g_list_prepend(returnValue, webkitPluginCreate(plugins[i]));
#endif
g_task_return_pointer(task, returnValue, reinterpret_cast<GDestroyNotify>(destroyPluginList));
}
......
......@@ -65,6 +65,7 @@ void ProcessLauncher::launchProcess()
case WebProcess:
executablePath = executablePathOfWebProcess();
break;
#if ENABLE(NETSCAPE_PLUGIN_API)
case PluginProcess:
executablePath = executablePathOfPluginProcess();
#if ENABLE(PLUGIN_PROCESS_GTK2)
......@@ -74,6 +75,7 @@ void ProcessLauncher::launchProcess()
pluginPath = m_launchOptions.extraInitializationData.get("plugin-path");
realPluginPath = fileSystemRepresentation(pluginPath);
break;
#endif
#if ENABLE(NETWORK_PROCESS)
case NetworkProcess:
executablePath = executablePathOfNetworkProcess();
......
=================
WebKitGTK+ 2.8.3
=================
What's new in WebKitGTK+ 2.8.3?
- Fixed a regression introduced in 2.8.2 that broke downloads when using the network
process.
- Fix the build with Netscape plugins disabled.
- Fix XPixamps leaked by GLContext when using EGL on X11.
=================
WebKitGTK+ 2.8.2
=================
......
......@@ -2,14 +2,14 @@ include(GNUInstallDirs)
set(PROJECT_VERSION_MAJOR 2)
set(PROJECT_VERSION_MINOR 8)
set(PROJECT_VERSION_MICRO 2)
set(PROJECT_VERSION_MICRO 3)
set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_MICRO})
set(WEBKITGTK_API_VERSION 4.0)
# Libtool library version, not to be confused with API version.
# See http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT2 43 5 6)
CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(JAVASCRIPTCORE 19 9 1)
CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT2 43 6 6)
CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(JAVASCRIPTCORE 19 10 1)
set(ENABLE_CREDENTIAL_STORAGE ON CACHE BOOL "Whether or not to enable support for credential storage using libsecret.")
set(ENABLE_GTKDOC OFF CACHE BOOL "Whether or not to use generate gtkdoc.")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment