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

New upstream version 2.29.90

parent db21682a

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -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">JavaScriptCore GLib Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for JavaScriptCore 2.29.4</p></div>
<div><p class="releaseinfo">for JavaScriptCore 2.29.90</p></div>
</div>
<hr>
</div>
......
......@@ -175,7 +175,7 @@ have included when compiling your code.</p>
<hr>
<div class="refsect2">
<a name="JSC-MICRO-VERSION:CAPS"></a><h3>JSC_MICRO_VERSION</h3>
<pre class="programlisting">#define JSC_MICRO_VERSION (4)
<pre class="programlisting">#define JSC_MICRO_VERSION (90)
</pre>
</div>
</div>
......
......@@ -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">WebKitGTK Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKitGTK 2.29.4</p></div>
<div><p class="releaseinfo">for WebKitGTK 2.29.90</p></div>
</div>
<hr>
</div>
......
......@@ -241,14 +241,14 @@ called from any thread.</p>
webkit_user_style_sheet_new (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source</code></em>,
<em class="parameter"><code><a class="link" href="webkit2gtk-4.0-WebKitUserContent.html#WebKitUserContentInjectedFrames" title="enum WebKitUserContentInjectedFrames"><span class="type">WebKitUserContentInjectedFrames</span></a> injected_frames</code></em>,
<em class="parameter"><code><a class="link" href="webkit2gtk-4.0-WebKitUserContent.html#WebKitUserStyleLevel" title="enum WebKitUserStyleLevel"><span class="type">WebKitUserStyleLevel</span></a> level</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *whitelist</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *blacklist</code></em>);</pre>
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *allow_list</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *block_list</code></em>);</pre>
<p>Creates a new user style sheet. Style sheets can be applied to some URIs
only by passing non-null values for <em class="parameter"><code>whitelist</code></em>
or <em class="parameter"><code>blacklist</code></em>
only by passing non-null values for <em class="parameter"><code>allow_list</code></em>
or <em class="parameter"><code>block_list</code></em>
. Passing a
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> whitelist implies that all URIs are on the whitelist. The style
sheet is applied if an URI matches the whitelist and not the blacklist.
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> allow_list implies that all URIs are on the allow_list. The style
sheet is applied if an URI matches the allow_list and not the block_list.
URI patterns must be of the form <code class="literal">[protocol]://[host]/[path]</code>, where the
*host* and *path* components can contain the wildcard character (<code class="literal">*</code>) to
represent zero or more other characters.</p>
......@@ -277,13 +277,13 @@ represent zero or more other characters.</p>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>whitelist</p></td>
<td class="parameter_description"><p>A whitelist of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_name"><p>allow_list</p></td>
<td class="parameter_description"><p>An allow_list of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>blacklist</p></td>
<td class="parameter_description"><p>A blacklist of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_name"><p>block_list</p></td>
<td class="parameter_description"><p>A block_list of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
......@@ -303,8 +303,8 @@ webkit_user_style_sheet_new_for_world (<em class="parameter"><code>const <a href
<em class="parameter"><code><a class="link" href="webkit2gtk-4.0-WebKitUserContent.html#WebKitUserContentInjectedFrames" title="enum WebKitUserContentInjectedFrames"><span class="type">WebKitUserContentInjectedFrames</span></a> injected_frames</code></em>,
<em class="parameter"><code><a class="link" href="webkit2gtk-4.0-WebKitUserContent.html#WebKitUserStyleLevel" title="enum WebKitUserStyleLevel"><span class="type">WebKitUserStyleLevel</span></a> level</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *world_name</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *whitelist</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *blacklist</code></em>);</pre>
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *allow_list</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *block_list</code></em>);</pre>
<p>Creates a new user style sheet for script world with name <em class="parameter"><code>world_name</code></em>
.
See <a class="link" href="webkit2gtk-4.0-WebKitUserContent.html#webkit-user-style-sheet-new" title="webkit_user_style_sheet_new ()"><code class="function">webkit_user_style_sheet_new()</code></a> for a full description.</p>
......@@ -338,13 +338,13 @@ See <a class="link" href="webkit2gtk-4.0-WebKitUserContent.html#webkit-user-styl
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>whitelist</p></td>
<td class="parameter_description"><p>A whitelist of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_name"><p>allow_list</p></td>
<td class="parameter_description"><p>An allow_list of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>blacklist</p></td>
<td class="parameter_description"><p>A blacklist of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_name"><p>block_list</p></td>
<td class="parameter_description"><p>A block_list of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
......@@ -419,14 +419,14 @@ from any thread.</p>
webkit_user_script_new (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source</code></em>,
<em class="parameter"><code><a class="link" href="webkit2gtk-4.0-WebKitUserContent.html#WebKitUserContentInjectedFrames" title="enum WebKitUserContentInjectedFrames"><span class="type">WebKitUserContentInjectedFrames</span></a> injected_frames</code></em>,
<em class="parameter"><code><a class="link" href="webkit2gtk-4.0-WebKitUserContent.html#WebKitUserScriptInjectionTime" title="enum WebKitUserScriptInjectionTime"><span class="type">WebKitUserScriptInjectionTime</span></a> injection_time</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *whitelist</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *blacklist</code></em>);</pre>
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *allow_list</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *block_list</code></em>);</pre>
<p>Creates a new user script. Scripts can be applied to some URIs
only by passing non-null values for <em class="parameter"><code>whitelist</code></em>
or <em class="parameter"><code>blacklist</code></em>
only by passing non-null values for <em class="parameter"><code>allow_list</code></em>
or <em class="parameter"><code>block_list</code></em>
. Passing a
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> whitelist implies that all URIs are on the whitelist. The script
is applied if an URI matches the whitelist and not the blacklist.
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> allow_list implies that all URIs are on the allow_list. The script
is applied if an URI matches the allow_list and not the block_list.
URI patterns must be of the form <code class="literal">[protocol]://[host]/[path]</code>, where the
*host* and *path* components can contain the wildcard character (<code class="literal">*</code>) to
represent zero or more other characters.</p>
......@@ -455,13 +455,13 @@ represent zero or more other characters.</p>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>whitelist</p></td>
<td class="parameter_description"><p>A whitelist of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_name"><p>allow_list</p></td>
<td class="parameter_description"><p>An allow_list of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>blacklist</p></td>
<td class="parameter_description"><p>A blacklist of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_name"><p>block_list</p></td>
<td class="parameter_description"><p>A block_list of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
......@@ -481,8 +481,8 @@ webkit_user_script_new_for_world (<em class="parameter"><code>const <a href="../
<em class="parameter"><code><a class="link" href="webkit2gtk-4.0-WebKitUserContent.html#WebKitUserContentInjectedFrames" title="enum WebKitUserContentInjectedFrames"><span class="type">WebKitUserContentInjectedFrames</span></a> injected_frames</code></em>,
<em class="parameter"><code><a class="link" href="webkit2gtk-4.0-WebKitUserContent.html#WebKitUserScriptInjectionTime" title="enum WebKitUserScriptInjectionTime"><span class="type">WebKitUserScriptInjectionTime</span></a> injection_time</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *world_name</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *whitelist</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *blacklist</code></em>);</pre>
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *allow_list</code></em>,
<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> * const *block_list</code></em>);</pre>
<p>Creates a new user script for script world with name <em class="parameter"><code>world_name</code></em>
.
See <a class="link" href="webkit2gtk-4.0-WebKitUserContent.html#webkit-user-script-new" title="webkit_user_script_new ()"><code class="function">webkit_user_script_new()</code></a> for a full description.</p>
......@@ -516,13 +516,13 @@ See <a class="link" href="webkit2gtk-4.0-WebKitUserContent.html#webkit-user-scri
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>whitelist</p></td>
<td class="parameter_description"><p>A whitelist of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_name"><p>allow_list</p></td>
<td class="parameter_description"><p>An allow_list of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>blacklist</p></td>
<td class="parameter_description"><p>A blacklist of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_name"><p>block_list</p></td>
<td class="parameter_description"><p>A block_list of URI patterns or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
......
......@@ -213,7 +213,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 (4)
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (90)
</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.29.4</p></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.29.90</p></div>
</div>
<hr>
</div>
......
=================
WebKitGTK 2.29.90
=================
What's new in WebKitGTK 2.29.90?
- Fix font variation settings when font smoothing setting is also present.
- Fix HTML drag and drop operations.
- Fix argument order for clone syscall seccomp filter on s390x.
- Fix a crash when selecting text.
- Fix several crashes and rendering issues.
================
WebKitGTK 2.29.4
================
......
......@@ -51,8 +51,12 @@ static Lock wrapperCacheMutex;
static HashMap<JSContextGroupRef, JSCVirtualMachine*>& wrapperMap()
{
static NeverDestroyed<HashMap<JSContextGroupRef, JSCVirtualMachine*>> map;
return map;
static LazyNeverDestroyed<HashMap<JSContextGroupRef, JSCVirtualMachine*>> shared;
static std::once_flag onceKey;
std::call_once(onceKey, [&] {
shared.construct();
});
return shared;
}
static void addWrapper(JSContextGroupRef group, JSCVirtualMachine* vm)
......
......@@ -109,6 +109,7 @@ b3/B3AtomicValue.cpp
b3/B3Bank.cpp
b3/B3BasicBlock.cpp
b3/B3BlockInsertionSet.cpp
b3/B3BottomTupleValue.cpp
b3/B3BreakCriticalEdges.cpp
b3/B3CCallValue.cpp
b3/B3CaseCollection.cpp
......
......@@ -362,9 +362,22 @@ public:
m_assembler.neg(dest, src);
}
void or32(RegisterID src, RegisterID dest)
void or8(TrustedImm32 imm, AbsoluteAddress address)
{
m_assembler.orr(dest, dest, src);
ARMThumbImmediate armImm = ARMThumbImmediate::makeEncodedImm(imm.m_value);
if (armImm.isValid()) {
move(TrustedImmPtr(address.m_ptr), addressTempRegister);
load8(addressTempRegister, dataTempRegister);
m_assembler.orr(dataTempRegister, dataTempRegister, armImm);
store8(dataTempRegister, addressTempRegister);
} else {
move(TrustedImmPtr(address.m_ptr), addressTempRegister);
load8(addressTempRegister, dataTempRegister);
move(imm, addressTempRegister);
m_assembler.orr(dataTempRegister, dataTempRegister, addressTempRegister);
move(TrustedImmPtr(address.m_ptr), addressTempRegister);
store8(dataTempRegister, addressTempRegister);
}
}
void or16(TrustedImm32 imm, AbsoluteAddress dest)
......@@ -384,7 +397,12 @@ public:
store16(dataTempRegister, addressTempRegister);
}
}
void or32(RegisterID src, RegisterID dest)
{
m_assembler.orr(dest, dest, src);
}
void or32(RegisterID src, AbsoluteAddress dest)
{
move(TrustedImmPtr(dest.m_ptr), addressTempRegister);
......@@ -897,13 +915,13 @@ public:
store8(src, setupArmAddress(address));
}
void store8(RegisterID src, void* address)
void store8(RegisterID src, const void *address)
{
move(TrustedImmPtr(address), addressTempRegister);
store8(src, ArmAddress(addressTempRegister, 0));
}
void store8(TrustedImm32 imm, void* address)
void store8(TrustedImm32 imm, const void *address)
{
TrustedImm32 imm8(static_cast<int8_t>(imm.m_value));
move(imm8, dataTempRegister);
......@@ -917,6 +935,11 @@ public:
store8(dataTempRegister, address);
}
void store8(RegisterID src, RegisterID addrreg)
{
store8(src, ArmAddress(addrreg, 0));
}
void store16(RegisterID src, ImplicitAddress address)
{
store16(src, setupArmAddress(address));
......
......@@ -25,9 +25,9 @@
#pragma once
#include "ExecutableAllocator.h"
#include "JSCPtrTag.h"
#include <wtf/DataLog.h>
#include <wtf/MetaAllocatorHandle.h>
#include <wtf/PrintStream.h>
#include <wtf/RefPtr.h>
#include <wtf/text/CString.h>
......@@ -54,6 +54,7 @@
namespace JSC {
typedef WTF::MetaAllocatorHandle ExecutableMemoryHandle;
template<PtrTag> class MacroAssemblerCodePtr;
enum OpcodeID : unsigned;
......
......@@ -475,6 +475,25 @@ public:
m_assembler.subu(dest, MIPSRegisters::zero, src);
}
void or8(TrustedImm32 imm, AbsoluteAddress dest)
{
if (!imm.m_value && !m_fixedWidth)
return;
if (m_fixedWidth) {
load8(dest.m_ptr, immTempRegister);
or32(imm, immTempRegister);
store8(immTempRegister, dest.m_ptr);
} else {
uintptr_t adr = reinterpret_cast<uintptr_t>(dest.m_ptr);
m_assembler.lui(addrTempRegister, (adr + 0x8000) >> 16);
m_assembler.lbu(immTempRegister, addrTempRegister, adr & 0xffff);
or32(imm, immTempRegister);
m_assembler.sb(immTempRegister, addrTempRegister, adr & 0xffff);
}
}
void or16(TrustedImm32 imm, AbsoluteAddress dest)
{
if (!imm.m_value && !m_fixedWidth)
......@@ -1312,7 +1331,7 @@ public:
}
}
void store8(RegisterID src, void* address)
void store8(RegisterID src, const void* address)
{
if (m_fixedWidth) {
/*
......
......@@ -2280,6 +2280,16 @@ void testOrImmMem()
invoke<void>(or16);
CHECK_EQ(memoryLocation, 0x12341234 | 42);
memoryLocation = 0x12341234;
auto or8 = compile([&] (CCallHelpers& jit) {
emitFunctionPrologue(jit);
jit.or8(CCallHelpers::TrustedImm32(42), CCallHelpers::AbsoluteAddress(&memoryLocation));
emitFunctionEpilogue(jit);
jit.ret();
});
invoke<void>(or8);
CHECK_EQ(memoryLocation, 0x12341234 | 42);
memoryLocation = 0x12341234;
auto or16InvalidLogicalImmInARM64 = compile([&] (CCallHelpers& jit) {
emitFunctionPrologue(jit);
......
/*
* Copyright (C) 2006 Zack Rusin <zack@kde.org>
* Copyright (C) 2014-2017 Igalia S.L.
* Copyright (C) 2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -25,52 +24,19 @@
*/
#include "config.h"
#include "EventHandler.h"
#include "B3BottomTupleValue.h"
#include "FocusController.h"
#include "Frame.h"
#include "FrameView.h"
#include "KeyboardEvent.h"
#include "MouseEventWithHitTestResults.h"
#include "NotImplemented.h"
#include "Page.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformWheelEvent.h"
#include "RenderWidget.h"
#if ENABLE(B3_JIT)
#if ENABLE(DRAG_SUPPORT)
#include "DataTransfer.h"
#endif
namespace JSC { namespace B3 {
#if PLATFORM(GTK)
#include "Scrollbar.h"
#endif
BottomTupleValue::~BottomTupleValue() = default;
namespace WebCore {
// GTK+ must scroll horizontally if the mouse pointer is on top of the
// horizontal scrollbar while scrolling with the wheel; we need to
// add the deltas and ticks here so that this behavior is consistent
// for styled scrollbars.
bool EventHandler::shouldSwapScrollDirection(const HitTestResult& result, const PlatformWheelEvent& event) const
void BottomTupleValue::dumpMeta(CommaPrinter& comma, PrintStream& out) const
{
#if PLATFORM(GTK)
FrameView* view = m_frame.view();
Scrollbar* scrollbar = view ? view->scrollbarAtPoint(event.position()) : nullptr;
if (!scrollbar)
scrollbar = result.scrollbar();
if (!scrollbar)
return false;
// The directions are already swapped when shift key is pressed, but when scrolling
// over scrollbars we always want to follow the scrollbar direction.
return scrollbar->orientation() == HorizontalScrollbar ? !event.shiftKey() : event.shiftKey();
#else
UNUSED_PARAM(result);
UNUSED_PARAM(event);
notImplemented();
return false;
#endif
out.print(comma, "<<", m_index);
}
}
} } // namespace JSC::B3
#endif // ENABLE(B3_JIT)
/*
* Copyright (C) 2007 Alexey Proskuryakov (ap@nypop.com)
* Copyright (C) 2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -20,35 +20,40 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include "ExceptionOr.h"
#include "XPathNSResolver.h"
#include <JavaScriptCore/JSCInlines.h>
#include <JavaScriptCore/JSCJSValue.h>
#include <JavaScriptCore/Strong.h>
#include <JavaScriptCore/StrongInlines.h>
#if ENABLE(B3_JIT)
namespace WebCore {
#include "B3Value.h"
class JSDOMWindow;
namespace JSC { namespace B3 {
class JSCustomXPathNSResolver final : public XPathNSResolver {
class JS_EXPORT_PRIVATE BottomTupleValue final : public Value {
public:
static ExceptionOr<Ref<JSCustomXPathNSResolver>> create(JSC::JSGlobalObject&, JSC::JSValue);
virtual ~JSCustomXPathNSResolver();
static bool accepts(Kind kind) { return kind == BottomTuple; }
~BottomTupleValue() final;
B3_SPECIALIZE_VALUE_FOR_NO_CHILDREN
private:
JSCustomXPathNSResolver(JSC::VM&, JSC::JSObject*, JSDOMWindow*);
void dumpMeta(CommaPrinter&, PrintStream&) const final;
String lookupNamespaceURI(const String& prefix) final;
static Opcode opcodeFromConstructor(Origin, Type) { return BottomTuple; }
// JSCustomXPathNSResolvers are always temporary so using a Strong reference is safe here.
JSC::Strong<JSC::JSObject> m_customResolver;
JSC::Strong<JSDOMWindow> m_globalObject;
BottomTupleValue(Origin origin, Type type)
: Value(CheckedOpcode, BottomTuple, type, Zero, origin)
{
ASSERT(type.isTuple());
}
friend class Procedure;
friend class Value;
};
} // namespace WebCore
} } // namespace JSC::B3
#endif // ENABLE(B3_JIT)
......@@ -47,6 +47,8 @@ Value* InsertionSet::insertIntConstant(size_t index, Value* likeValue, int64_t v
Value* InsertionSet::insertBottom(size_t index, Origin origin, Type type)
{
if (type.isTuple())
return insertValue(index, m_procedure.addBottom(origin, type));
Value*& bottom = m_bottomForType[type];
if (!bottom)
bottom = insertValue(index, m_procedure.addBottom(origin, type));
......
......@@ -142,7 +142,8 @@ public:
break;
}
case Get:
case Patchpoint: {
case Patchpoint:
case BottomTuple: {
if (value->type().isTuple())
ensureTupleTmps(value, m_tupleValueToTmps);
break;
......@@ -436,7 +437,8 @@ private:
switch (tupleValue->opcode()) {
case Phi:
case Patchpoint: {
case Patchpoint:
case BottomTuple: {
return m_tupleValueToTmps.find(tupleValue)->value;
}
case Get:
......@@ -2975,6 +2977,27 @@ private:
return;
}
case BottomTuple: {
forEachImmOrTmp(m_value, [&] (Arg tmp, Type type, unsigned) {
switch (type.kind()) {
case Void:
case Tuple:
RELEASE_ASSERT_NOT_REACHED();
break;
case Int32:
case Int64:
ASSERT(Arg::isValidImmForm(0));
append(Move, imm(static_cast<int64_t>(0)), tmp.tmp());
break;
case Float:
case Double:
append(MoveZeroToDouble, tmp.tmp());
break;
}
});