Merge mozilla-central to mozilla-inbound

This commit is contained in:
Dorel Luca 2019-02-17 12:50:55 +02:00
Родитель e42ae134c3 066b0d7e7d
Коммит 33e05d0370
17 изменённых файлов: 293 добавлений и 199 удалений

Просмотреть файл

@ -78,6 +78,7 @@ dom/media/webspeech/recognition/energy_endpointer.cc
dom/media/webspeech/recognition/energy_endpointer.h
dom/media/webspeech/recognition/energy_endpointer_params.cc
dom/media/webspeech/recognition/energy_endpointer_params.h
dom/webauthn/cbor-cpp/.*
dom/webauthn/winwebauthn/webauthn.h
editor/libeditor/tests/browserscope/lib/richtext/.*
editor/libeditor/tests/browserscope/lib/richtext2/.*

Просмотреть файл

@ -9,8 +9,8 @@
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions and
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

Просмотреть файл

@ -9,8 +9,8 @@
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions and
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@ -18,9 +18,14 @@
using namespace cbor;
encoder::encoder(output &out) { _out = &out; }
encoder::~encoder() {}
encoder::encoder(output &out) {
_out = &out;
}
encoder::~encoder() {
}
void encoder::write_type_value(int major_type, unsigned int value) {
major_type <<= 5;
@ -72,7 +77,9 @@ void encoder::write_type_value(int major_type, unsigned long long value) {
}
}
void encoder::write_int(unsigned int value) { write_type_value(0, value); }
void encoder::write_int(unsigned int value) {
write_type_value(0, value);
}
void encoder::write_int(unsigned long long value) {
write_type_value(0, value);
@ -109,11 +116,18 @@ void encoder::write_string(const std::string str) {
_out->put_bytes((const unsigned char *) str.c_str(), (int) str.size());
}
void encoder::write_array(int size) { write_type_value(4, (unsigned int)size); }
void encoder::write_map(int size) { write_type_value(5, (unsigned int)size); }
void encoder::write_array(int size) {
write_type_value(4, (unsigned int) size);
}
void encoder::write_tag(const unsigned int tag) { write_type_value(6, tag); }
void encoder::write_map(int size) {
write_type_value(5, (unsigned int) size);
}
void encoder::write_tag(const unsigned int tag) {
write_type_value(6, tag);
}
void encoder::write_special(int special) {
write_type_value(7, (unsigned int) special);
@ -127,6 +141,10 @@ void encoder::write_bool(bool value) {
}
}
void encoder::write_null() { _out->put_byte((unsigned char)0xf6); }
void encoder::write_null() {
_out->put_byte((unsigned char) 0xf6);
}
void encoder::write_undefined() { _out->put_byte((unsigned char)0xf7); }
void encoder::write_undefined() {
_out->put_byte((unsigned char) 0xf7);
}

Просмотреть файл

@ -9,11 +9,12 @@
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions and
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef __CborEncoder_H_
#define __CborEncoder_H_
@ -24,7 +25,6 @@ namespace cbor {
class encoder {
private:
output *_out;
public:
explicit encoder(output &out);
@ -63,6 +63,6 @@ class encoder {
void write_type_value(int major_type, unsigned long long value);
};
} // namespace cbor
}
#endif //__CborEncoder_H_

Просмотреть файл

@ -9,11 +9,12 @@
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions and
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef __CborOutput_H_
#define __CborOutput_H_
@ -28,6 +29,6 @@ class output {
virtual void put_bytes(const unsigned char *data, int size) = 0;
};
} // namespace cbor
}
#endif //__CborOutput_H_

Просмотреть файл

@ -9,8 +9,8 @@
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions and
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@ -21,23 +21,32 @@
using namespace cbor;
void output_dynamic::init(unsigned int initalCapacity) {
this->_capacity = initalCapacity;
this->_buffer = new unsigned char[initalCapacity];
this->_offset = 0;
}
output_dynamic::output_dynamic() { init(256); }
output_dynamic::output_dynamic() {
init(256);
}
output_dynamic::output_dynamic(unsigned int inital_capacity) {
init(inital_capacity);
}
output_dynamic::~output_dynamic() { delete _buffer; }
output_dynamic::~output_dynamic() {
delete _buffer;
}
unsigned char *output_dynamic::data() { return _buffer; }
unsigned char *output_dynamic::data() {
return _buffer;
}
unsigned int output_dynamic::size() { return _offset; }
unsigned int output_dynamic::size() {
return _offset;
}
void output_dynamic::put_byte(unsigned char value) {
if(_offset < _capacity) {

Просмотреть файл

@ -9,14 +9,15 @@
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing permissions and
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#ifndef __CborDynamicOutput_H_
#define __CborDynamicOutput_H_
#include "output.h"
namespace cbor {
@ -25,7 +26,6 @@ class output_dynamic : public output {
unsigned char *_buffer;
unsigned int _capacity;
unsigned int _offset;
public:
output_dynamic();
@ -44,6 +44,8 @@ class output_dynamic : public output {
private:
void init(unsigned int initalCapacity);
};
} // namespace cbor
}
#endif //__CborDynamicOutput_H_

Просмотреть файл

@ -30,13 +30,6 @@ const prefs = [
// Pinch-zooming currently requires meta viewport support (this requirement
// will eventually be removed).
["dom.meta-viewport.enabled", true],
// Pinch-zooming currently requires container scrolling (this requirement
// will eventually be removed).
["layout.scroll.root-frame-containers", 1],
// Retained displaylists don't work well with container scrolling, so
// they too need to be disabled for now.
["layout.display-list.retain", false],
["layout.display-list.retain.chrome", false],
// We use the Visual Viewport API to tell the visual viewport offset.
["dom.visualviewport.enabled", true],
];

Просмотреть файл

@ -32,10 +32,6 @@ var prefs = [
// Pinch-zooming currently requires meta viewport support (this requirement
// will eventually be removed).
["dom.meta-viewport.enabled", true],
// Retained displaylists don't work well with container scrolling, so
// they too need to be disabled for now.
["layout.display-list.retain", false],
["layout.display-list.retain.chrome", false],
];
// Increase the tap timeouts so the double-tap is still detected in case of

Просмотреть файл

@ -1376,6 +1376,20 @@ void nsBlockFrame::Reflow(nsPresContext* aPresContext, ReflowOutput& aMetrics,
} else {
absoluteContainer->MarkSizeDependentFramesDirty();
}
if (haveInterrupt) {
// We're not going to reflow absolute frames; make sure to account for
// their existing overflow areas, which is usually a side effect of this
// reflow.
//
// TODO(emilio): nsAbsoluteContainingBlock::Reflow already checks for
// interrupt, can we just rely on it and unconditionally take the else
// branch below? That's a bit more subtle / risky, since I don't see
// what would reflow them in that case if they depended on our size.
for (nsIFrame* kid = absoluteContainer->GetChildList().FirstChild(); kid;
kid = kid->GetNextSibling()) {
ConsiderChildOverflow(aMetrics.mOverflowAreas, kid);
}
}
} else {
LogicalSize containingBlockSize =
CalculateContainingBlockSizeForAbsolutes(parentWM, *reflowInput,

Просмотреть файл

@ -3893,10 +3893,9 @@ bool ScrollFrameHelper::DecideScrollableLayer(
aBuilder->RecomputeCurrentAnimatedGeometryRoot();
}
if (gfxPrefs::LayoutUseContainersForRootFrames() &&
mWillBuildScrollableLayer && mIsRoot) {
mIsScrollableLayerInRootContainer = true;
}
mIsScrollableLayerInRootContainer =
gfxPrefs::LayoutUseContainersForRootFrames() &&
mWillBuildScrollableLayer && mIsRoot;
return mWillBuildScrollableLayer;
}

Просмотреть файл

@ -132,6 +132,7 @@ skip-if = toolkit == 'android' || headless # Headless:Bug 1405871
[test_plugin_position.xhtml]
skip-if = e10s
[test_scroll_behavior.html]
[test_scrollframe_abspos_interrupt.html]
[test_selection_expanding.html]
support-files = selection_expanding_xbl.xml
[test_selection_preventDefault.html]

Просмотреть файл

@ -0,0 +1,60 @@
<!doctype html>
<title>Test for bug 1526609</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<style>
body {
margin: 0;
}
.scroller {
overflow-y: auto;
position: relative;
width: 500px;
height: 300px;
}
.kid {
position: absolute;
width: 100%;
background: linear-gradient(to bottom, red, green);
line-height: 100px;
}
</style>
<div class="scroller" id="scroller">
<div class="kid"></div>
</div>
<script>
{
let text = " foo bar ";
for (let i = 0; i < 16; ++i)
text = text + text;
document.querySelector(".kid").innerText = text;
}
SimpleTest.waitForExplicitFinish();
const scroller = document.querySelector("#scroller");
is(scroller.scrollTop, 0, "Initial scroll position");
ok(scroller.scrollTopMax > 0, "Should be able to scroll down");
scroller.scrollTop = scroller.scrollTopMax;
is(scroller.scrollTop, scroller.scrollTopMax, "Should've scrolled");
const origWidth = scroller.offsetWidth;
const utils = SpecialPowers.DOMWindowUtils;
// Take control of the refresh driver
utils.advanceTimeAndRefresh(0);
// Force the next reflow to get interrupted
utils.forceReflowInterrupt();
scroller.style.width = "300px";
utils.advanceTimeAndRefresh(0);
isnot(scroller.scrollTop, 0, "Shouldn't have lost scroll position");
isnot(scroller.offsetWidth, origWidth, "Should've had to reflow");
utils.restoreNormalRefresh();
SimpleTest.finish();
</script>

Просмотреть файл

@ -13,4 +13,4 @@
it should not be visible in the initial viewport position(0,0).
-->
<div style="position:fixed; top:0; right: 0; width:100px; height: 100px; background-color: green"></div>
<div style="width: 200%; height: 100%;"></div>
<div style="width: 200%; height: 200%;"></div>

Просмотреть файл

@ -117,3 +117,4 @@ jobs:
- win64-node
- win64-rust
- win64-cbindgen
- win64-nasm

Просмотреть файл

@ -442,8 +442,6 @@ tree > treechildren {
tree {
-moz-box-orient: vertical;
min-width: 0px;
min-height: 0px;
width: 10px;
height: 10px;
}

Просмотреть файл

@ -21,6 +21,7 @@ dom/media/webspeech/recognition/energy_endpointer.cc
dom/media/webspeech/recognition/energy_endpointer.h
dom/media/webspeech/recognition/energy_endpointer_params.cc
dom/media/webspeech/recognition/energy_endpointer_params.h
dom/webauthn/cbor-cpp/
editor/libeditor/tests/browserscope/lib/richtext/
editor/libeditor/tests/browserscope/lib/richtext2/
extensions/spellcheck/hunspell/src/