Commit ffceed35 authored by Alberto Garcia's avatar Alberto Garcia
Browse files

Imported Upstream version 2.10.4+dfsg1

parent 7dec8b37
......@@ -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.10.3</p></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.10.4</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 (3)
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (4)
</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.10.3</p></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.10.4</p></div>
</div>
<hr>
</div>
......
=================
WebKitGTK+ 2.10.4
=================
What's new in WebKitGTK+ 2.10.4?
- Fixed dashed and dotted border painting.
- Properly cancel navigation policy checks.
- Several crashes fixed when running editor commands.
- Fix several crashes due to assertions in Debug builds.
- Fix the build on Mac OSX and bring back the Quartz target.
- Fix the build on glibc-based BSD systems.
=================
WebKitGTK+ 2.10.3
=================
......
......@@ -136,7 +136,7 @@ JS_EXPORT void JSGarbageCollect(JSContextRef ctx);
/* Enable the Objective-C API for platforms with a modern runtime. */
#if !defined(JSC_OBJC_API_ENABLED)
#define JSC_OBJC_API_ENABLED (defined(__clang__) && defined(__APPLE__) && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 && !defined(__i386__)) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)))
#define JSC_OBJC_API_ENABLED (defined(__clang__) && defined(__APPLE__) && !defined(BUILDING_GTK__) && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 && !defined(__i386__)) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)))
#endif
#endif /* JSBase_h */
......@@ -1974,7 +1974,7 @@ asm (
".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
HIDE_SYMBOL(getHostCallReturnValue) "\n"
SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
"mov %rbp, %rdi\n"
"lea -8(%rsp), %rdi\n"
"jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
);
......@@ -1985,8 +1985,9 @@ asm (
HIDE_SYMBOL(getHostCallReturnValue) "\n"
SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
"push %ebp\n"
"mov %esp, %eax\n"
"leal -4(%esp), %esp\n"
"push %ebp\n"
"push %eax\n"
"call " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
"leal 8(%esp), %esp\n"
"pop %ebp\n"
......@@ -2002,7 +2003,7 @@ HIDE_SYMBOL(getHostCallReturnValue) "\n"
".thumb" "\n"
".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n"
SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
"mov r0, r7" "\n"
"sub r0, sp, #8" "\n"
"b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
);
......@@ -2013,7 +2014,7 @@ asm (
HIDE_SYMBOL(getHostCallReturnValue) "\n"
INLINE_ARM_FUNCTION(getHostCallReturnValue)
SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
"mov r0, r11" "\n"
"sub r0, sp, #8" "\n"
"b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
);
......@@ -2024,7 +2025,7 @@ asm (
".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
HIDE_SYMBOL(getHostCallReturnValue) "\n"
SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
"mov x0, x29" "\n"
"sub x0, sp, #16" "\n"
"b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
);
......@@ -2046,7 +2047,7 @@ asm (
HIDE_SYMBOL(getHostCallReturnValue) "\n"
SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
LOAD_FUNCTION_TO_T9(getHostCallReturnValueWithExecState)
"move $a0, $fp" "\n"
"subi $a0, $sp, 8" "\n"
"b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"
);
......@@ -2059,7 +2060,8 @@ asm (
".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
HIDE_SYMBOL(getHostCallReturnValue) "\n"
SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
"mov r14, r4" "\n"
"mov r15, r4" "\n"
"add -8, r4" "\n"
"mov.l 2f, " SH4_SCRATCH_REGISTER "\n"
"braf " SH4_SCRATCH_REGISTER "\n"
"nop" "\n"
......@@ -2071,7 +2073,8 @@ SYMBOL_STRING(getHostCallReturnValue) ":" "\n"
extern "C" {
__declspec(naked) EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValue()
{
__asm mov [esp + 4], ebp;
__asm lea eax, [esp - 4]
__asm mov [esp + 4], eax;
__asm jmp getHostCallReturnValueWithExecState
}
}
......
......@@ -615,7 +615,7 @@
#endif
#endif
#if OS(DARWIN) || OS(FREEBSD) || OS(NETBSD)
#if (OS(DARWIN) || OS(FREEBSD) || OS(NETBSD)) && !defined(__GLIBC__)
#define HAVE_STAT_BIRTHTIME 1
#endif
......@@ -634,8 +634,10 @@
#define HAVE_PTHREAD_SETNAME_NP 1
#define HAVE_READLINE 1
#define HAVE_SYS_TIMEB_H 1
#define USE_ACCELERATE 1
#if !PLATFORM(GTK)
#define USE_ACCELERATE 1
#endif
#if !PLATFORM(IOS)
#define HAVE_HOSTED_CORE_ANIMATION 1
#endif
......
......@@ -34,7 +34,7 @@
#include <wtf/RefCounted.h>
#include <wtf/Threading.h>
#if OS(DARWIN)
#if OS(DARWIN) && !PLATFORM(GTK)
#include <dispatch/dispatch.h>
#endif
......@@ -73,14 +73,14 @@ public:
WTF_EXPORT_PRIVATE static void concurrentApply(size_t iterations, const std::function<void (size_t index)>&);
#if OS(DARWIN)
dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; }
#elif PLATFORM(GTK)
#if PLATFORM(GTK)
void registerSocketEventHandler(int, std::function<void ()>, std::function<void ()>);
void unregisterSocketEventHandler(int);
#elif PLATFORM(EFL)
void registerSocketEventHandler(int, std::function<void ()>);
void unregisterSocketEventHandler(int);
#elif OS(DARWIN)
dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; }
#endif
private:
......@@ -102,16 +102,16 @@ private:
static DWORD WINAPI unregisterWaitAndDestroyItemCallback(void* context);
#endif
#if OS(DARWIN)
static void executeFunction(void*);
dispatch_queue_t m_dispatchQueue;
#elif PLATFORM(GTK)
#if PLATFORM(GTK)
ThreadIdentifier m_workQueueThread;
GRefPtr<GMainContext> m_eventContext;
GRefPtr<GMainLoop> m_eventLoop;
GMainLoopSource m_socketEventSource;
#elif PLATFORM(EFL)
RefPtr<DispatchQueue> m_dispatchQueue;
#elif OS(DARWIN)
static void executeFunction(void*);
dispatch_queue_t m_dispatchQueue;
#elif OS(WINDOWS)
volatile LONG m_isWorkThreadRegistered;
......
......@@ -392,12 +392,17 @@ if (USE_TEXTURE_MAPPER)
)
list(APPEND WebCore_SOURCES
platform/graphics/texmap/BitmapTexture.cpp
platform/graphics/texmap/BitmapTextureGL.cpp
platform/graphics/texmap/BitmapTexturePool.cpp
platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
platform/graphics/texmap/TextureMapperGL.cpp
platform/graphics/texmap/TextureMapperShaderProgram.cpp
)
if (USE_TEXTURE_MAPPER_GL)
list(APPEND WebCore_SOURCES
platform/graphics/texmap/BitmapTextureGL.cpp
platform/graphics/texmap/TextureMapperGL.cpp
platform/graphics/texmap/TextureMapperShaderProgram.cpp
)
endif ()
endif ()
if (ENABLE_THREADED_COMPOSITOR)
......
......@@ -1703,12 +1703,6 @@ String AccessibilityNodeObject::textUnderElement(AccessibilityTextUnderElementMo
if (is<Text>(node))
return downcast<Text>(*node).wholeText();
// The render tree should be stable before going ahead. Otherwise, further uses of the
// TextIterator will force a layout update, potentially altering the accessibility tree
// and leading to crashes in the loop that computes the result text from the children.
ASSERT(!document()->renderView()->layoutState());
ASSERT(!document()->childNeedsStyleRecalc());
StringBuilder builder;
for (AccessibilityObject* child = firstChild(); child; child = child->nextSibling()) {
if (mode.ignoredChildNode && child->node() == mode.ignoredChildNode)
......
......@@ -632,10 +632,12 @@ String AccessibilityRenderObject::textUnderElement(AccessibilityTextUnderElement
if (m_renderer->isBR())
return ASCIILiteral("\n");
bool isRenderText = is<RenderText>(*m_renderer);
#if ENABLE(MATHML)
// Math operators create RenderText nodes on the fly that are not tied into the DOM in a reasonable way,
// so rangeOfContents does not work for them (nor does regular text selection).
if (is<RenderText>(*m_renderer) && m_renderer->isAnonymous() && ancestorsOfType<RenderMathMLOperator>(*m_renderer).first())
if (isRenderText && m_renderer->isAnonymous() && ancestorsOfType<RenderMathMLOperator>(*m_renderer).first())
return downcast<RenderText>(*m_renderer).text();
if (is<RenderMathMLOperator>(*m_renderer) && !m_renderer->isAnonymous())
return downcast<RenderMathMLOperator>(*m_renderer).element().textContent();
......@@ -647,7 +649,8 @@ String AccessibilityRenderObject::textUnderElement(AccessibilityTextUnderElement
// We use a text iterator for text objects AND for those cases where we are
// explicitly asking for the full text under a given element.
if (is<RenderText>(*m_renderer) || mode.childrenInclusion == AccessibilityTextUnderElementMode::TextUnderElementModeIncludeAllChildren) {
bool shouldIncludeAllChildren = mode.childrenInclusion == AccessibilityTextUnderElementMode::TextUnderElementModeIncludeAllChildren;
if (isRenderText || shouldIncludeAllChildren) {
// If possible, use a text iterator to get the text, so that whitespace
// is handled consistently.
Document* nodeDocument = nullptr;
......@@ -686,6 +689,12 @@ String AccessibilityRenderObject::textUnderElement(AccessibilityTextUnderElement
// catch stale WebCoreAXObject (see <rdar://problem/3960196>)
if (frame->document() != nodeDocument)
return String();
// The tree should be stable before looking through the children of a non-Render Text object.
// Otherwise, further uses of TextIterator will force a layout update, potentially altering
// the accessibility tree and causing crashes in the loop that computes the result text.
ASSERT((isRenderText || !shouldIncludeAllChildren) || (!nodeDocument->renderView()->layoutState() && !nodeDocument->childNeedsStyleRecalc()));
return plainText(textRange.get(), textIteratorBehaviorForTextRange());
}
}
......
......@@ -414,27 +414,29 @@ String StyleProperties::getLayeredShorthandValue(const StylePropertyShorthand& s
|| (j < size - 1 && shorthand.properties()[j + 1] == CSSPropertyWebkitMaskRepeatY && value)) {
RefPtr<CSSValue> yValue;
RefPtr<CSSValue> nextValue = values[j + 1];
if (is<CSSValueList>(*nextValue))
yValue = downcast<CSSValueList>(*nextValue).itemWithoutBoundsCheck(i);
else
yValue = nextValue;
if (!is<CSSPrimitiveValue>(*value) || !is<CSSPrimitiveValue>(*yValue))
continue;
CSSValueID xId = downcast<CSSPrimitiveValue>(*value).getValueID();
CSSValueID yId = downcast<CSSPrimitiveValue>(*yValue).getValueID();
if (xId != yId) {
if (xId == CSSValueRepeat && yId == CSSValueNoRepeat) {
useRepeatXShorthand = true;
++j;
} else if (xId == CSSValueNoRepeat && yId == CSSValueRepeat) {
useRepeatYShorthand = true;
if (nextValue) {
if (is<CSSValueList>(*nextValue))
yValue = downcast<CSSValueList>(*nextValue).itemWithoutBoundsCheck(i);
else
yValue = nextValue;
if (!is<CSSPrimitiveValue>(*value) || !is<CSSPrimitiveValue>(*yValue))
continue;
CSSValueID xId = downcast<CSSPrimitiveValue>(*value).getValueID();
CSSValueID yId = downcast<CSSPrimitiveValue>(*yValue).getValueID();
if (xId != yId) {
if (xId == CSSValueRepeat && yId == CSSValueNoRepeat) {
useRepeatXShorthand = true;
++j;
} else if (xId == CSSValueNoRepeat && yId == CSSValueRepeat) {
useRepeatYShorthand = true;
continue;
}
} else {
useSingleWordShorthand = true;
++j;
}
} else {
useSingleWordShorthand = true;
++j;
}
}
}
......
......@@ -876,6 +876,8 @@ Ref<RenderStyle> StyleResolver::styleForKeyframe(const RenderStyle* elementStyle
cascade.applyDeferredProperties(*this);
adjustRenderStyle(*state.style(), *state.parentStyle(), nullptr);
// Start loading resources referenced by this style.
loadPendingResources();
......
......@@ -6222,7 +6222,12 @@ Document::RegionFixedPair Document::absoluteRegionForEventTargets(const EventTar
rootRelativeBounds = element->absoluteEventHandlerBounds(insideFixedPosition);
} else if (is<Element>(keyValuePair.key)) {
Element* element = downcast<Element>(keyValuePair.key);
rootRelativeBounds = element->absoluteEventHandlerBounds(insideFixedPosition);
if (is<HTMLBodyElement>(element)) {
// For the body, just use the document bounds.
// The body may not cover this whole area, but it's OK for this region to be an overestimate.
rootRelativeBounds = absoluteEventHandlerBounds(insideFixedPosition);
} else
rootRelativeBounds = element->absoluteEventHandlerBounds(insideFixedPosition);
}
if (!rootRelativeBounds.isEmpty())
......
......@@ -391,7 +391,6 @@ public:
// A Document node returns itself.
Document& document() const
{
ASSERT(this);
return treeScope().documentScope();
}
......
......@@ -1450,6 +1450,102 @@ void Position::showTreeForThis() const
#endif
bool Position::equals(const Position& other) const
{
if (!m_anchorNode)
return !m_anchorNode == !other.m_anchorNode;
if (!other.m_anchorNode)
return false;
switch (anchorType()) {
case PositionIsBeforeChildren:
ASSERT(!m_anchorNode->isTextNode());
switch (other.anchorType()) {
case PositionIsBeforeChildren:
ASSERT(!other.m_anchorNode->isTextNode());
return m_anchorNode == other.m_anchorNode;
case PositionIsAfterChildren:
ASSERT(!other.m_anchorNode->isTextNode());
return m_anchorNode == other.m_anchorNode && !m_anchorNode->hasChildNodes();
case PositionIsOffsetInAnchor:
return m_anchorNode == other.m_anchorNode && !other.m_offset;
case PositionIsBeforeAnchor:
return m_anchorNode->firstChild() == other.m_anchorNode;
case PositionIsAfterAnchor:
return false;
}
break;
case PositionIsAfterChildren:
ASSERT(!m_anchorNode->isTextNode());
switch (other.anchorType()) {
case PositionIsBeforeChildren:
ASSERT(!other.m_anchorNode->isTextNode());
return m_anchorNode == other.m_anchorNode && !m_anchorNode->hasChildNodes();
case PositionIsAfterChildren:
ASSERT(!other.m_anchorNode->isTextNode());
return m_anchorNode == other.m_anchorNode;
case PositionIsOffsetInAnchor:
return m_anchorNode == other.m_anchorNode && m_anchorNode->countChildNodes() == static_cast<unsigned>(m_offset);
case PositionIsBeforeAnchor:
return false;
case PositionIsAfterAnchor:
return m_anchorNode->lastChild() == other.m_anchorNode;
}
break;
case PositionIsOffsetInAnchor:
switch (other.anchorType()) {
case PositionIsBeforeChildren:
ASSERT(!other.m_anchorNode->isTextNode());
return m_anchorNode == other.m_anchorNode && !m_offset;
case PositionIsAfterChildren:
ASSERT(!other.m_anchorNode->isTextNode());
return m_anchorNode == other.m_anchorNode && m_offset == static_cast<int>(other.m_anchorNode->countChildNodes());
case PositionIsOffsetInAnchor:
return m_anchorNode == other.m_anchorNode && m_offset == other.m_offset;
case PositionIsBeforeAnchor:
return m_anchorNode->traverseToChildAt(m_offset) == other.m_anchorNode;
case PositionIsAfterAnchor:
return m_offset && m_anchorNode->traverseToChildAt(m_offset - 1) == other.m_anchorNode;
}
break;
case PositionIsBeforeAnchor:
switch (other.anchorType()) {
case PositionIsBeforeChildren:
ASSERT(!other.m_anchorNode->isTextNode());
return m_anchorNode == other.m_anchorNode->firstChild();
case PositionIsAfterChildren:
ASSERT(!other.m_anchorNode->isTextNode());
return false;
case PositionIsOffsetInAnchor:
return m_anchorNode == other.m_anchorNode->traverseToChildAt(other.m_offset);
case PositionIsBeforeAnchor:
return m_anchorNode == other.m_anchorNode;
case PositionIsAfterAnchor:
return m_anchorNode->previousSibling() == other.m_anchorNode;
}
break;
case PositionIsAfterAnchor:
switch (other.anchorType()) {
case PositionIsBeforeChildren:
ASSERT(!other.m_anchorNode->isTextNode());
return false;
case PositionIsAfterChildren:
ASSERT(!other.m_anchorNode->isTextNode());
return m_anchorNode == other.m_anchorNode->lastChild();
case PositionIsOffsetInAnchor:
return other.m_offset && m_anchorNode == other.m_anchorNode->traverseToChildAt(other.m_offset - 1);
case PositionIsBeforeAnchor:
return m_anchorNode->nextSibling() == other.m_anchorNode;
case PositionIsAfterAnchor:
return m_anchorNode == other.m_anchorNode;
}
break;
}
ASSERT_NOT_REACHED();
return false;
}
} // namespace WebCore
#if ENABLE(TREE_DEBUGGING)
......
......@@ -207,7 +207,10 @@ public:
void showAnchorTypeAndOffset() const;
void showTreeForThis() const;
#endif
// This is a tentative enhancement of operator== to account for different position types.
// FIXME: Combine this function with operator==
bool equals(const Position&) const;
private:
WEBCORE_EXPORT int offsetForPositionAfterAnchor() const;
......
......@@ -233,8 +233,8 @@ void ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded(const
m_endOfLastParagraph = end;
}
// If end is in the middle of a text node, split.
if (!endStyle->collapseWhiteSpace() && end.offsetInContainerNode() && end.offsetInContainerNode() < end.containerNode()->maxCharacterOffset()) {
// If end is in the middle of a text node and the text node is editable, split.
if (endStyle->userModify() != READ_ONLY && !endStyle->collapseWhiteSpace() && end.offsetInContainerNode() && end.offsetInContainerNode() < end.containerNode()->maxCharacterOffset()) {
RefPtr<Text> endContainer = end.containerText();
splitTextNode(endContainer, end.offsetInContainerNode());
if (isStartAndEndOnSameNode)
......
......@@ -352,7 +352,9 @@ void CompositeEditCommand::insertNodeAfter(PassRefPtr<Node> insertChild, PassRef
ASSERT(insertChild);
ASSERT(refChild);
ContainerNode* parent = refChild->parentNode();
ASSERT(parent);
if (!parent)
return;
ASSERT(!parent->isShadowRoot());
if (parent->lastChild() == refChild)
appendNode(insertChild, parent);
......@@ -1120,7 +1122,7 @@ void CompositeEditCommand::cloneParagraphUnderNewElement(const Position& start,
void CompositeEditCommand::cleanupAfterDeletion(VisiblePosition destination)
{
VisiblePosition caretAfterDelete = endingSelection().visibleStart();
if (caretAfterDelete != destination && isStartOfParagraph(caretAfterDelete) && isEndOfParagraph(caretAfterDelete)) {
if (!caretAfterDelete.equals(destination) && isStartOfParagraph(caretAfterDelete) && isEndOfParagraph(caretAfterDelete)) {
// Note: We want the rightmost candidate.
Position position = caretAfterDelete.deepEquivalent().downstream();
Node* node = position.deprecatedNode();
......@@ -1161,6 +1163,9 @@ void CompositeEditCommand::cleanupAfterDeletion(VisiblePosition destination)
void CompositeEditCommand::moveParagraphWithClones(const VisiblePosition& startOfParagraphToMove, const VisiblePosition& endOfParagraphToMove, Element* blockElement, Node* outerNode)
{
if (startOfParagraphToMove.isNull() || endOfParagraphToMove.isNull())
return;
ASSERT(outerNode);
ASSERT(blockElement);
......
......@@ -185,6 +185,11 @@ void DeleteSelectionCommand::initializePositionData()
Position start, end;
initializeStartEnd(start, end);
if (!isEditablePosition(start, ContentIsEditable))
start = firstEditablePositionAfterPositionInRoot(start, highestEditableRoot(start));
if (!isEditablePosition(end, ContentIsEditable))
end = lastEditablePositionBeforePositionInRoot(end, highestEditableRoot(start));
m_upstreamStart = start.upstream();
m_downstreamStart = start.downstream();
m_upstreamEnd = end.upstream();
......
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