Commit 7dec8b37 authored by Alberto Garcia's avatar Alberto Garcia
Browse files

Imported Upstream version 2.10.3+dfsg1

parent 7ed87b76
......@@ -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.2</p></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.10.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.10.2</p></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.10.3</p></div>
</div>
<hr>
</div>
......
=================
WebKitGTK+ 2.10.3
=================
What's new in WebKitGTK+ 2.10.3?
- Fix graphics artifacts when entering/leaving Accelerated Compositing mode.
- Honour 'forwards' fill-mode in Multiple-keyframe and delayed instantaneous
animations.
- Fix runtime warning when the inspector is closed.
- Fix the build with GTK+2 plugin process disabled.
- Gracefully handle errors when sending/receiving IPC messages data on connection
close.
- Fix several crashes and rendering issues.
=================
WebKitGTK+ 2.10.2
=================
......
......@@ -32,6 +32,14 @@
namespace JSC {
JSValueRef failNextNewCodeBlock(JSContextRef context)
{
ExecState* exec= toJS(context);
JSLockHolder holder(exec);
return toRef(exec, failNextNewCodeBlock(exec));
}
JSValueRef numberOfDFGCompiles(JSContextRef context, JSValueRef theFunctionValueRef)
{
ExecState* exec= toJS(context);
......
......@@ -31,6 +31,7 @@
namespace JSC {
JS_EXPORT_PRIVATE JSValueRef failNextNewCodeBlock(JSContextRef);
JS_EXPORT_PRIVATE JSValueRef numberOfDFGCompiles(JSContextRef, JSValueRef theFunction);
JS_EXPORT_PRIVATE JSValueRef setNeverInline(JSContextRef, JSValueRef theFunction);
......
......@@ -1743,10 +1743,10 @@ void linkPolymorphicCall(
codeBlock = nullptr;
else {
codeBlock = jsCast<FunctionExecutable*>(variant.executable())->codeBlockForCall();
// If we cannot handle a callee, assume that it's better for this whole thing to be a
// virtual call.
if (exec->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()) || callLinkInfo.callType() == CallLinkInfo::CallVarargs || callLinkInfo.callType() == CallLinkInfo::ConstructVarargs) {
// If we cannot handle a callee, either because we don't have a CodeBlock or because arity mismatch,
// assume that it's better for this whole thing to be a virtual call.
if (!codeBlock || exec->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()) || callLinkInfo.callType() == CallLinkInfo::CallVarargs || callLinkInfo.callType() == CallLinkInfo::ConstructVarargs) {
linkVirtualFor(exec, callLinkInfo);
return;
}
......
......@@ -473,6 +473,7 @@ static EncodedJSValue JSC_HOST_CALL functionOptimizeNextInvocation(ExecState*);
static EncodedJSValue JSC_HOST_CALL functionNumberOfDFGCompiles(ExecState*);
static EncodedJSValue JSC_HOST_CALL functionReoptimizationRetryCount(ExecState*);
static EncodedJSValue JSC_HOST_CALL functionTransferArrayBuffer(ExecState*);
static EncodedJSValue JSC_HOST_CALL functionFailNextNewCodeBlock(ExecState*);
static NO_RETURN_WITH_VALUE EncodedJSValue JSC_HOST_CALL functionQuit(ExecState*);
static EncodedJSValue JSC_HOST_CALL functionFalse1(ExecState*);
static EncodedJSValue JSC_HOST_CALL functionFalse2(ExecState*);
......@@ -622,6 +623,7 @@ protected:
addFunction(vm, "optimizeNextInvocation", functionOptimizeNextInvocation, 1);
addFunction(vm, "reoptimizationRetryCount", functionReoptimizationRetryCount, 1);
addFunction(vm, "transferArrayBuffer", functionTransferArrayBuffer, 1);
addFunction(vm, "failNextNewCodeBlock", functionFailNextNewCodeBlock, 1);
#if ENABLE(SAMPLING_FLAGS)
addFunction(vm, "setSamplingFlags", functionSetSamplingFlags, 1);
addFunction(vm, "clearSamplingFlags", functionClearSamplingFlags, 1);
......@@ -1068,6 +1070,12 @@ EncodedJSValue JSC_HOST_CALL functionTransferArrayBuffer(ExecState* exec)
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL functionFailNextNewCodeBlock(ExecState* exec)
{
exec->vm().setFailNextNewCodeBlock();
return JSValue::encode(jsUndefined());
}
EncodedJSValue JSC_HOST_CALL functionQuit(ExecState*)
{
jscExit(EXIT_SUCCESS);
......
......@@ -311,7 +311,10 @@ JSObject* ScriptExecutable::prepareForExecutionImpl(
{
VM& vm = exec->vm();
DeferGC deferGC(vm.heap);
if (vm.getAndClearFailNextNewCodeBlock())
return createError(exec->callerFrame(), ASCIILiteral("Forced Failure"));
JSObject* exception = 0;
RefPtr<CodeBlock> codeBlock = newCodeBlockFor(kind, function, scope, exception);
if (!codeBlock) {
......
......@@ -95,6 +95,13 @@ JSValue optimizeNextInvocation(JSValue theFunctionValue)
return jsUndefined();
}
JSValue failNextNewCodeBlock(ExecState* exec)
{
exec->vm().setFailNextNewCodeBlock();
return jsUndefined();
}
JSValue numberOfDFGCompiles(ExecState* exec)
{
if (exec->argumentCount() < 1)
......
......@@ -40,6 +40,7 @@ JS_EXPORT_PRIVATE JSValue numberOfDFGCompiles(JSValue function);
JS_EXPORT_PRIVATE JSValue setNeverInline(JSValue function);
JS_EXPORT_PRIVATE JSValue optimizeNextInvocation(JSValue function);
JS_EXPORT_PRIVATE JSValue failNextNewCodeBlock(ExecState*);
JS_EXPORT_PRIVATE JSValue numberOfDFGCompiles(ExecState*);
JS_EXPORT_PRIVATE JSValue setNeverInline(ExecState*);
JS_EXPORT_PRIVATE JSValue optimizeNextInvocation(ExecState*);
......
......@@ -408,6 +408,14 @@ public:
JS_EXPORT_PRIVATE JSValue throwException(ExecState*, JSValue);
JS_EXPORT_PRIVATE JSObject* throwException(ExecState*, JSObject*);
void setFailNextNewCodeBlock() { m_failNextNewCodeBlock = true; }
bool getAndClearFailNextNewCodeBlock()
{
bool result = m_failNextNewCodeBlock;
m_failNextNewCodeBlock = false;
return result;
}
void* stackPointerAtVMEntry() const { return m_stackPointerAtVMEntry; }
void setStackPointerAtVMEntry(void*);
......@@ -601,6 +609,7 @@ private:
void* m_lastStackTop;
Exception* m_exception { nullptr };
Exception* m_lastException { nullptr };
bool m_failNextNewCodeBlock { false };
bool m_inDefineOwnProperty;
std::unique_ptr<CodeCache> m_codeCache;
LegacyProfiler* m_enabledProfiler;
......
......@@ -32,6 +32,7 @@
#include "AudioContext.h"
#include "AudioNodeInput.h"
#include "AudioNodeOutput.h"
#include "ExceptionCode.h"
#include "Reverb.h"
#include <wtf/MainThread.h>
......@@ -115,13 +116,18 @@ void ConvolverNode::uninitialize()
AudioNode::uninitialize();
}
void ConvolverNode::setBuffer(AudioBuffer* buffer)
void ConvolverNode::setBuffer(AudioBuffer* buffer, ExceptionCode& ec)
{
ASSERT(isMainThread());
if (!buffer)
return;
if (buffer->sampleRate() != context()->sampleRate()) {
ec = NOT_SUPPORTED_ERR;
return;
}
unsigned numberOfChannels = buffer->numberOfChannels();
size_t bufferLength = buffer->length();
......
......@@ -51,7 +51,7 @@ public:
virtual void uninitialize() override;
// Impulse responses
void setBuffer(AudioBuffer*);
void setBuffer(AudioBuffer*, ExceptionCode&);
AudioBuffer* buffer();
bool normalize() const { return m_normalize; }
......
......@@ -27,6 +27,6 @@
Conditional=WEB_AUDIO,
JSGenerateToJSObject
] interface ConvolverNode : AudioNode {
attribute AudioBuffer buffer;
[SetterRaisesException] attribute AudioBuffer buffer;
attribute boolean normalize;
};
......@@ -101,17 +101,15 @@ HTMLTableElement* AccessibilityTable::tableElement() const
if (is<HTMLTableElement>(table.element()))
return downcast<HTMLTableElement>(table.element());
table.forceSectionsRecalc();
// If the table has a display:table-row-group, then the RenderTable does not have a pointer to it's HTMLTableElement.
// We can instead find it by asking the firstSection for its parent.
RenderTableSection* firstBody = table.firstBody();
if (!firstBody || !firstBody->element())
return nullptr;
Element* actualTable = firstBody->element()->parentElement();
if (!is<HTMLTableElement>(actualTable))
return nullptr;
return downcast<HTMLTableElement>(actualTable);
return ancestorsOfType<HTMLTableElement>(*(firstBody->element())).first();
}
bool AccessibilityTable::isDataTable() const
......
......@@ -107,15 +107,6 @@ void CSSKeyframesRule::setName(const String& name)
}
void CSSKeyframesRule::appendRule(const String& ruleText)
{
if (CSSStyleSheet* parent = parentStyleSheet()) {
if (Document* ownerDocument = parent->ownerDocument())
ownerDocument->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("CSSKeyframesRule 'appendRule' function is deprecated. Use 'insertRule' instead."));
}
insertRule(ruleText);
}
void CSSKeyframesRule::insertRule(const String& ruleText)
{
ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size());
......@@ -132,6 +123,15 @@ void CSSKeyframesRule::insertRule(const String& ruleText)
m_childRuleCSSOMWrappers.grow(length());
}
void CSSKeyframesRule::insertRule(const String& ruleText)
{
if (CSSStyleSheet* parent = parentStyleSheet()) {
if (Document* ownerDocument = parent->ownerDocument())
ownerDocument->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("CSSKeyframesRule 'insertRule' function is deprecated. Use 'appendRule' instead."));
}
appendRule(ruleText);
}
void CSSKeyframesRule::deleteRule(const String& s)
{
ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size());
......
......@@ -452,7 +452,7 @@ Document::Document(Frame* frame, const URL& url, unsigned documentClasses, unsig
, m_closeAfterStyleRecalc(false)
, m_gotoAnchorNeededAfterStylesheetsLoad(false)
, m_frameElementsShouldIgnoreScrolling(false)
, m_updateFocusAppearanceRestoresSelection(false)
, m_updateFocusAppearanceRestoresSelection(SelectionRestorationMode::SetDefault)
, m_ignoreDestructiveWriteCount(0)
, m_markers(std::make_unique<DocumentMarkerController>())
, m_updateFocusAppearanceTimer(*this, &Document::updateFocusAppearanceTimerFired)
......@@ -5063,9 +5063,9 @@ void Document::statePopped(PassRefPtr<SerializedScriptValue> stateObject)
m_pendingStateObject = stateObject;
}
void Document::updateFocusAppearanceSoon(bool restorePreviousSelection)
void Document::updateFocusAppearanceSoon(SelectionRestorationMode mode)
{
m_updateFocusAppearanceRestoresSelection = restorePreviousSelection;
m_updateFocusAppearanceRestoresSelection = mode;
if (!m_updateFocusAppearanceTimer.isActive())
m_updateFocusAppearanceTimer.startOneShot(0);
}
......
......@@ -271,6 +271,16 @@ enum class DocumentCompatibilityMode : unsigned char {
enum DimensionsCheck { WidthDimensionsCheck = 1 << 0, HeightDimensionsCheck = 1 << 1, AllDimensionsCheck = 1 << 2 };
enum class SelectionRestorationMode {
Restore,
SetDefault,
};
enum class SelectionRevealMode {
Reveal,
DoNotReveal
};
enum class HttpEquivPolicy {
Enabled,
DisabledBySettings,
......@@ -951,7 +961,7 @@ public:
bool hasNodesWithPlaceholderStyle() const { return m_hasNodesWithPlaceholderStyle; }
void setHasNodesWithPlaceholderStyle() { m_hasNodesWithPlaceholderStyle = true; }
void updateFocusAppearanceSoon(bool restorePreviousSelection);
void updateFocusAppearanceSoon(SelectionRestorationMode);
void cancelFocusAppearanceUpdate();
// Extension for manipulating canvas drawing contexts for use in CSS
......@@ -1474,7 +1484,7 @@ private:
bool m_isDNSPrefetchEnabled;
bool m_haveExplicitlyDisabledDNSPrefetch;
bool m_frameElementsShouldIgnoreScrolling;
bool m_updateFocusAppearanceRestoresSelection;
SelectionRestorationMode m_updateFocusAppearanceRestoresSelection;
// http://www.whatwg.org/specs/web-apps/current-work/#ignore-destructive-writes-counter
unsigned m_ignoreDestructiveWriteCount;
......
......@@ -973,7 +973,7 @@ LayoutRect Element::absoluteEventBounds(bool& boundsIncludeAllDescendantElements
// Get the bounding rectangle from the SVG model.
SVGElement& svgElement = downcast<SVGElement>(*this);
FloatRect localRect;
if (svgElement.getBoundingBox(localRect))
if (svgElement.getBoundingBox(localRect, SVGLocatable::DisallowStyleUpdate))
result = LayoutRect(renderer()->localToAbsoluteQuad(localRect, UseTransforms, &includesFixedPositionElements).boundingBox());
} else {
if (is<RenderBox>(renderer())) {
......@@ -2142,7 +2142,7 @@ void Element::focus(bool restorePreviousSelection, FocusDirection direction)
if (isFormControl)
view->setProhibitsScrolling(true);
#endif
updateFocusAppearance(restorePreviousSelection);
updateFocusAppearance(restorePreviousSelection ? SelectionRestorationMode::Restore : SelectionRestorationMode::SetDefault);
#if PLATFORM(IOS)
if (isFormControl)
view->setProhibitsScrolling(false);
......@@ -2157,11 +2157,11 @@ void Element::updateFocusAppearanceAfterAttachIfNeeded()
if (!data->needsFocusAppearanceUpdateSoonAfterAttach())
return;
if (isFocusable() && document().focusedElement() == this)
document().updateFocusAppearanceSoon(false /* don't restore selection */);
document().updateFocusAppearanceSoon(SelectionRestorationMode::SetDefault);
data->setNeedsFocusAppearanceUpdateSoonAfterAttach(false);
}
void Element::updateFocusAppearance(bool /*restorePreviousSelection*/)
void Element::updateFocusAppearance(SelectionRestorationMode, SelectionRevealMode revealMode)
{
if (isRootEditableElement()) {
Frame* frame = document().frame();
......@@ -2177,9 +2177,10 @@ void Element::updateFocusAppearance(bool /*restorePreviousSelection*/)
if (frame->selection().shouldChangeSelection(newSelection)) {
frame->selection().setSelection(newSelection, FrameSelection::defaultSetSelectionOptions(), Element::defaultFocusTextStateChangeIntent());
frame->selection().revealSelection();
if (revealMode == SelectionRevealMode::Reveal)
frame->selection().revealSelection();
}
} else if (renderer() && !renderer()->isWidget())
} else if (renderer() && !renderer()->isWidget() && revealMode == SelectionRevealMode::Reveal)
renderer()->scrollRectToVisible(renderer()->anchorRect());
}
......
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