merge mozilla-inbound to mozilla-central a=merge

This commit is contained in:
Carsten "Tomcat" Book 2016-10-24 16:55:47 +02:00
commit e3e8571c53
43 changed files with 503 additions and 378 deletions

View File

@ -3,16 +3,10 @@ tags = devtools
head = head_dbg.js
tail =
firefox-appdir = browser
skip-if = toolkit == 'gonk' && debug # Bug 1206586
support-files=
testactors.js
[test_encryption.js]
# Failures on B2G emulator debug, B2G emulator-x86-kk
# See bug 1234972 and bug 1199472
skip-if = toolkit == 'gonk' && (debug || android_version > '15')
[test_oob_cert_auth.js]
# Failures on B2G emulator debug, B2G emulator-x86-kk and Android opt
# See bug 1141544, bug 1163052, bug 1166032 and bug 1241831
skip-if = (toolkit == 'gonk' && (debug || android_version > '15')) || (toolkit == 'android' && !debug)
skip-if = (toolkit == 'android' && !debug) # Bug 1141544: Re-enable when buildbot tests are gone

View File

@ -15,6 +15,7 @@
#include "mozilla/FloatingPoint.h" // For IsFinite
#include "mozilla/LookAndFeel.h" // For LookAndFeel::GetInt
#include "mozilla/KeyframeUtils.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/StyleAnimationValue.h"
#include "Layers.h" // For Layer
#include "nsComputedDOMStyle.h" // nsComputedDOMStyle::GetStyleContextForElement
@ -26,6 +27,23 @@
#include "nsIScriptError.h"
namespace mozilla {
bool
PropertyValuePair::operator==(const PropertyValuePair& aOther) const
{
if (mProperty != aOther.mProperty || mValue != aOther.mValue) {
return false;
}
if (mServoDeclarationBlock == aOther.mServoDeclarationBlock) {
return true;
}
if (!mServoDeclarationBlock || !aOther.mServoDeclarationBlock) {
return false;
}
return Servo_DeclarationBlock_Equals(mServoDeclarationBlock,
aOther.mServoDeclarationBlock);
}
namespace dom {
NS_IMPL_CYCLE_COLLECTION_INHERITED(KeyframeEffectReadOnly,

View File

@ -20,8 +20,8 @@
#include "mozilla/EffectCompositor.h"
#include "mozilla/KeyframeEffectParams.h"
#include "mozilla/LayerAnimationInfo.h" // LayerAnimations::kRecords
#include "mozilla/ServoBindingHelpers.h" // RawServoDeclarationBlock and
// associated RefPtrTraits
#include "mozilla/ServoBindingTypes.h" // RawServoDeclarationBlock and
// associated RefPtrTraits
#include "mozilla/StyleAnimationValue.h"
#include "mozilla/dom/AnimationEffectReadOnly.h"
#include "mozilla/dom/Element.h"
@ -69,14 +69,7 @@ struct PropertyValuePair
// fail to parse the value since we use it to store the original string.
RefPtr<RawServoDeclarationBlock> mServoDeclarationBlock;
bool operator==(const PropertyValuePair& aOther) const {
return mProperty == aOther.mProperty &&
mValue == aOther.mValue &&
!mServoDeclarationBlock == !aOther.mServoDeclarationBlock &&
(!mServoDeclarationBlock ||
Servo_DeclarationBlock_Equals(mServoDeclarationBlock,
aOther.mServoDeclarationBlock));
}
bool operator==(const PropertyValuePair&) const;
};
/**

View File

@ -9,6 +9,7 @@
#include "mozilla/ErrorResult.h"
#include "mozilla/Move.h"
#include "mozilla/RangedArray.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/StyleAnimationValue.h"
#include "mozilla/TimingParams.h"
#include "mozilla/dom/BaseKeyframeTypesBinding.h" // For FastBaseKeyframe etc.

View File

@ -17,7 +17,7 @@
#include "nsIAtom.h"
#include "nsUnicharUtils.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/ServoBindingHelpers.h"
#include "mozilla/ServoBindingTypes.h"
#include "mozilla/DeclarationBlockInlines.h"
#include "nsContentUtils.h"
#include "nsReadableUtils.h"

View File

@ -21,6 +21,7 @@
#include "mozilla/Attributes.h"
#include "mozilla/AppProcessChecker.h"
#include "mozilla/AutoRestore.h"
#include "mozilla/Casting.h"
#include "mozilla/EndianUtils.h"
#include "mozilla/LazyIdleThread.h"
#include "mozilla/Maybe.h"
@ -18960,12 +18961,7 @@ uint64_t
DatabaseOperationBase::ReinterpretDoubleAsUInt64(double aDouble)
{
// This is a duplicate of the js engine's byte munging in StructuredClone.cpp
union {
double d;
uint64_t u;
} pun;
pun.d = aDouble;
return pun.u;
return BitwiseCast<uint64_t>(aDouble);
}
// static

View File

@ -12,6 +12,7 @@
#include "js/Date.h"
#include "js/Value.h"
#include "jsfriendapi.h"
#include "mozilla/Casting.h"
#include "mozilla/EndianUtils.h"
#include "mozilla/FloatingPoint.h"
#include "mozIStorageStatement.h"
@ -594,11 +595,6 @@ Key::DecodeString(const unsigned char*& aPos, const unsigned char* aEnd,
aPos = iter + 1;
}
union Float64Union {
double d;
uint64_t u;
};
void
Key::EncodeNumber(double aFloat, uint8_t aType)
{
@ -612,13 +608,11 @@ Key::EncodeNumber(double aFloat, uint8_t aType)
*(buffer++) = aType;
Float64Union pun;
pun.d = aFloat;
uint64_t bits = BitwiseCast<uint64_t>(aFloat);
// Note: The subtraction from 0 below is necessary to fix
// MSVC build warning C4146 (negating an unsigned value).
uint64_t number = pun.u & PR_UINT64(0x8000000000000000) ?
(0 - pun.u) :
(pun.u | PR_UINT64(0x8000000000000000));
const uint64_t signbit = FloatingPoint<double>::kSignBit;
uint64_t number = bits & signbit ? (0 - bits) : (bits | signbit);
mozilla::BigEndian::writeUint64(buffer, number);
}
@ -638,14 +632,12 @@ Key::DecodeNumber(const unsigned char*& aPos, const unsigned char* aEnd)
aPos += sizeof(number);
Float64Union pun;
// Note: The subtraction from 0 below is necessary to fix
// MSVC build warning C4146 (negating an unsigned value).
pun.u = number & PR_UINT64(0x8000000000000000) ?
(number & ~PR_UINT64(0x8000000000000000)) :
(0 - number);
const uint64_t signbit = FloatingPoint<double>::kSignBit;
uint64_t bits = number & signbit ? (number & ~signbit) : (0 - number);
return pun.d;
return BitwiseCast<double>(bits);
}
void

View File

@ -14,16 +14,19 @@ function testSteps()
this.window ? window.location.pathname : "test_quotaExceeded_recovery";
const objectStoreName = "foo";
// We want 8 MB database on Android and 32 MB database on other platforms.
const groupLimitMB = mozinfo.os == "android" ? 8 : 32;
const android = mozinfo.os == "android";
// We want 512 KB database on Android and 4 MB database on other platforms.
const groupLimitKB = android ? 512 : 4096;
// The group limit is calculated as 20% of the global temporary storage limit.
const tempStorageLimitKB = groupLimitMB * 5 * 1024;
const tempStorageLimitKB = groupLimitKB * 5;
// Store in 1 MB chunks.
const dataSize = 1024 * 1024;
// We want 64 KB chunks on Android and 512 KB chunks on other platforms.
const dataSizeKB = android ? 64 : 512;
const dataSize = dataSizeKB * 1024;
const maxIter = 10;
const maxIter = 5;
for (let blobs of [false, true]) {
setTemporaryStorageLimit(tempStorageLimitKB);

View File

@ -35,7 +35,9 @@ SetDocumentTitleTransaction::Init(nsIHTMLEditor* aEditor,
{
NS_ASSERTION(aEditor && aValue, "null args");
if (!aEditor || !aValue) { return NS_ERROR_NULL_POINTER; }
if (!aEditor || !aValue) {
return NS_ERROR_NULL_POINTER;
}
mEditor = aEditor;
mValue = *aValue;
@ -67,46 +69,59 @@ nsresult
SetDocumentTitleTransaction::SetDomTitle(const nsAString& aTitle)
{
nsCOMPtr<nsIEditor> editor = do_QueryInterface(mEditor);
NS_ENSURE_TRUE(editor, NS_ERROR_FAILURE);
if (NS_WARN_IF(!editor)) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIDOMDocument> domDoc;
nsresult res = editor->GetDocument(getter_AddRefs(domDoc));
NS_ENSURE_TRUE(domDoc, NS_ERROR_FAILURE);
nsresult rv = editor->GetDocument(getter_AddRefs(domDoc));
if (NS_WARN_IF(!domDoc)) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIDOMNodeList> titleList;
res = domDoc->GetElementsByTagName(NS_LITERAL_STRING("title"), getter_AddRefs(titleList));
NS_ENSURE_SUCCESS(res, res);
rv = domDoc->GetElementsByTagName(NS_LITERAL_STRING("title"),
getter_AddRefs(titleList));
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
// First assume we will NOT really do anything
// (transaction will not be pushed on stack)
mIsTransient = true;
nsCOMPtr<nsIDOMNode>titleNode;
if(titleList)
{
res = titleList->Item(0, getter_AddRefs(titleNode));
NS_ENSURE_SUCCESS(res, res);
if (titleNode)
{
nsCOMPtr<nsIDOMNode> titleNode;
if(titleList) {
rv = titleList->Item(0, getter_AddRefs(titleNode));
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
if (titleNode) {
// Delete existing child textnode of title node
// (Note: all contents under a TITLE node are always in a single text node)
nsCOMPtr<nsIDOMNode> child;
res = titleNode->GetFirstChild(getter_AddRefs(child));
if(NS_FAILED(res)) return res;
if(child)
{
rv = titleNode->GetFirstChild(getter_AddRefs(child));
if (NS_FAILED(rv)) {
return rv;
}
if(child) {
// Save current text as the undo value
nsCOMPtr<nsIDOMCharacterData> textNode = do_QueryInterface(child);
if(textNode)
{
if(textNode) {
textNode->GetData(mUndoValue);
// If title text is identical to what already exists,
// quit now (mIsTransient is now TRUE)
if (mUndoValue == aTitle)
if (mUndoValue == aTitle) {
return NS_OK;
}
}
rv = editor->DeleteNode(child);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
res = editor->DeleteNode(child);
if(NS_FAILED(res)) return res;
}
}
}
@ -116,59 +131,81 @@ SetDocumentTitleTransaction::SetDomTitle(const nsAString& aTitle)
// Get the <HEAD> node, create a <TITLE> and insert it under the HEAD
nsCOMPtr<nsIDocument> document = do_QueryInterface(domDoc);
NS_ENSURE_STATE(document);
if (NS_WARN_IF(!document)) {
return NS_ERROR_UNEXPECTED;
}
dom::Element* head = document->GetHeadElement();
NS_ENSURE_STATE(head);
RefPtr<dom::Element> headElement = document->GetHeadElement();
if (NS_WARN_IF(!headElement)) {
return NS_ERROR_UNEXPECTED;
}
bool newTitleNode = false;
bool newTitleNode = false;
uint32_t newTitleIndex = 0;
if (!titleNode)
{
if (!titleNode) {
// Didn't find one above: Create a new one
nsCOMPtr<nsIDOMElement>titleElement;
res = domDoc->CreateElement(NS_LITERAL_STRING("title"), getter_AddRefs(titleElement));
NS_ENSURE_SUCCESS(res, res);
NS_ENSURE_TRUE(titleElement, NS_ERROR_FAILURE);
rv = domDoc->CreateElement(NS_LITERAL_STRING("title"),
getter_AddRefs(titleElement));
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
if (NS_WARN_IF(!titleElement)) {
return NS_ERROR_FAILURE;
}
titleNode = do_QueryInterface(titleElement);
newTitleNode = true;
// Get index so we append new title node after all existing HEAD children.
newTitleIndex = head->GetChildCount();
newTitleIndex = headElement->GetChildCount();
}
// Append a text node under the TITLE
// only if the title text isn't empty
if (titleNode && !aTitle.IsEmpty())
{
// Append a text node under the TITLE only if the title text isn't empty.
if (titleNode && !aTitle.IsEmpty()) {
nsCOMPtr<nsIDOMText> textNode;
res = domDoc->CreateTextNode(aTitle, getter_AddRefs(textNode));
NS_ENSURE_SUCCESS(res, res);
nsCOMPtr<nsIDOMNode> newNode = do_QueryInterface(textNode);
NS_ENSURE_TRUE(newNode, NS_ERROR_FAILURE);
rv = domDoc->CreateTextNode(aTitle, getter_AddRefs(textNode));
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
if (newTitleNode)
{
nsCOMPtr<nsIDOMNode> newNode = do_QueryInterface(textNode);
if (NS_WARN_IF(!newNode)) {
return NS_ERROR_FAILURE;
}
if (newTitleNode) {
// Not undoable: We will insert newTitleNode below
nsCOMPtr<nsIDOMNode> resultNode;
res = titleNode->AppendChild(newNode, getter_AddRefs(resultNode));
}
else
{
rv = titleNode->AppendChild(newNode, getter_AddRefs(resultNode));
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
} else {
// This is an undoable transaction
res = editor->InsertNode(newNode, titleNode, 0);
rv = editor->InsertNode(newNode, titleNode, 0);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
}
NS_ENSURE_SUCCESS(res, res);
// Calling AppendChild() or InsertNode() could cause removing the head
// element. So, let's mark it dirty.
headElement = nullptr;
}
if (newTitleNode)
{
if (newTitleNode) {
if (!headElement) {
headElement = document->GetHeadElement();
if (NS_WARN_IF(!headElement)) {
// XXX Can we return NS_OK when there is no head element?
return NS_ERROR_UNEXPECTED;
}
}
// Undoable transaction to insert title+text together
res = editor->InsertNode(titleNode, head->AsDOMNode(), newTitleIndex);
rv = editor->InsertNode(titleNode, headElement->AsDOMNode(), newTitleIndex);
}
return res;
return rv;
}
NS_IMETHODIMP
@ -182,7 +219,9 @@ SetDocumentTitleTransaction::GetTxnDescription(nsAString& aString)
NS_IMETHODIMP
SetDocumentTitleTransaction::GetIsTransient(bool* aIsTransient)
{
NS_ENSURE_TRUE(aIsTransient, NS_ERROR_NULL_POINTER);
if (NS_WARN_IF(!aIsTransient)) {
return NS_ERROR_NULL_POINTER;
}
*aIsTransient = mIsTransient;
return NS_OK;
}

View File

@ -42,5 +42,6 @@ subsuite = clipboard
skip-if = buildapp == 'mulet'
[test_htmleditor_keyevent_handling.html]
[test_selection_move_commands.xul]
[test_set_document_title_transaction.html]
[test_texteditor_keyevent_handling.html]
skip-if = (debug && os=='win') || (os == 'linux') # Bug 1116205, leaks on windows debug, fails delete key on linux

View File

@ -0,0 +1,79 @@
<!DOCTYPE html>
<html>
<head>
<title>Test for SetDocumentTitleTransaction</title>
<script type="text/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css"
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
</head>
<body onload="runTests()">
<div id="display">
<iframe src="data:text/html,<!DOCTYPE html><html><head><title>first title</title></head><body></body></html>"></iframe>
</div>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
<script class="testbody" type="application/javascript">
function runTests() {
var iframe = document.getElementsByTagName("iframe")[0];
function isDocumentTitleEquals(aDescription, aExpectedTitle) {
is(iframe.contentDocument.title, aExpectedTitle, aDescription + ": document.title should be " + aExpectedTitle);
is(iframe.contentDocument.getElementsByTagName("title")[0].textContent, aExpectedTitle, aDescription + ": The text in the title element should be " + aExpectedTitle);
}
isDocumentTitleEquals("Checking isDocumentTitleEquals()", "first title");
const kTests = [
{ description: "designMode=\"on\"",
init: function () {
iframe.contentDocument.designMode = "on";
},
cleanUp: function () {
iframe.contentDocument.designMode = "off";
}
},
{ description: "html element has contenteditable attribute",
init: function () {
iframe.contentDocument.documentElement.setAttribute("contenteditable", "true");
},
cleanUp: function () {
iframe.contentDocument.documentElement.removeAttribute("contenteditable");
}
},
];
for (var i = 0; i < kTests.length; i++) {
const kTest = kTests[i];
kTest.init();
var editor = SpecialPowers.wrap(iframe.contentWindow).
QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor).
getInterface(SpecialPowers.Ci.nsIWebNavigation).
QueryInterface(SpecialPowers.Ci.nsIDocShell).editor;
ok(editor, kTest.description + ": The docshell should have editor");
var htmlEditor = editor.QueryInterface(SpecialPowers.Ci.nsIHTMLEditor);
ok(htmlEditor, kTest.description + ": The editor should have nsIHTMLEditor interface");
// Replace existing title.
htmlEditor.setDocumentTitle("Modified title");
isDocumentTitleEquals(kTest.description, "Modified title");
// When the document doesn't have <title> element, title element should be created automatically.
iframe.contentDocument.head.removeChild(iframe.contentDocument.getElementsByTagName("title")[0]);
is(iframe.contentDocument.getElementsByTagName("title").length, 0, kTest.description + ": There should be no title element");
htmlEditor.setDocumentTitle("new title");
is(iframe.contentDocument.getElementsByTagName("title").length, 1, kTest.description + ": There should be a title element");
isDocumentTitleEquals(kTest.description, "new title");
kTest.cleanUp();
}
SimpleTest.finish();
}
</script>
</body>
</html>

View File

@ -1059,7 +1059,10 @@ CompositorBridgeChild::AllocShmem(size_t aSize,
void
CompositorBridgeChild::DeallocShmem(ipc::Shmem& aShmem)
{
PCompositorBridgeChild::DeallocShmem(aShmem);
if (!mCanSend) {
return;
}
PCompositorBridgeChild::DeallocShmem(aShmem);
}
widget::PCompositorWidgetChild*

View File

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/ServoRestyleManager.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/dom/ChildIterator.h"
#include "nsContentUtils.h"

View File

@ -692,7 +692,7 @@ nsBidiPresUtils::Resolve(nsBlockFrame* aBlockFrame)
for (nsBlockFrame* block = aBlockFrame; block;
block = static_cast<nsBlockFrame*>(block->GetNextContinuation())) {
block->RemoveStateBits(NS_BLOCK_NEEDS_BIDI_RESOLUTION);
nsBlockInFlowLineIterator lineIter(block, block->BeginLine());
nsBlockInFlowLineIterator lineIter(block, block->LinesBegin());
bpd.mPrevFrame = nullptr;
TraverseFrames(aBlockFrame, &lineIter, block->PrincipalChildList().FirstChild(), &bpd);
// XXX what about overflow lines?

View File

@ -6217,8 +6217,8 @@ nsLayoutUtils::GetFirstLinePosition(WritingMode aWM,
return false;
}
for (nsBlockFrame::ConstLineIterator line = block->BeginLine(),
line_end = block->EndLine();
for (nsBlockFrame::ConstLineIterator line = block->LinesBegin(),
line_end = block->LinesEnd();
line != line_end; ++line) {
if (line->IsBlock()) {
nsIFrame *kid = line->mFirstChild;
@ -6256,8 +6256,8 @@ nsLayoutUtils::GetLastLineBaseline(WritingMode aWM,
// No baseline. (We intentionally don't descend into scroll frames.)
return false;
for (nsBlockFrame::ConstReverseLineIterator line = block->RBeginLine(),
line_end = block->REndLine();
for (nsBlockFrame::ConstReverseLineIterator line = block->LinesRBegin(),
line_end = block->LinesREnd();
line != line_end; ++line) {
if (line->IsBlock()) {
nsIFrame *kid = line->mFirstChild;
@ -6294,8 +6294,8 @@ CalculateBlockContentBEnd(WritingMode aWM, nsBlockFrame* aFrame)
nscoord contentBEnd = 0;
for (nsBlockFrame::LineIterator line = aFrame->BeginLine(),
line_end = aFrame->EndLine();
for (nsBlockFrame::LineIterator line = aFrame->LinesBegin(),
line_end = aFrame->LinesEnd();
line != line_end; ++line) {
if (line->IsBlock()) {
nsIFrame* child = line->mFirstChild;

View File

@ -140,7 +140,7 @@ BlockReflowInput::BlockReflowInput(const ReflowInput& aReflowInput,
mBCoord = mContentArea.BStart(wm) = mBorderPadding.BStart(wm);
mPrevChild = nullptr;
mCurrentLine = aFrame->EndLine();
mCurrentLine = aFrame->LinesEnd();
mMinLineHeight = aReflowInput.CalcLineHeight();
}
@ -416,7 +416,7 @@ BlockReflowInput::ReconstructMarginBefore(nsLineList::iterator aLine)
mPrevBEndMargin.Zero();
nsBlockFrame *block = mBlock;
nsLineList::iterator firstLine = block->BeginLine();
nsLineList::iterator firstLine = block->LinesBegin();
for (;;) {
--aLine;
if (aLine->IsBlock()) {
@ -569,7 +569,7 @@ BlockReflowInput::AddFloat(nsLineLayout* aLineLayout,
nscoord aAvailableISize)
{
NS_PRECONDITION(aLineLayout, "must have line layout");
NS_PRECONDITION(mBlock->EndLine() != mCurrentLine, "null ptr");
NS_PRECONDITION(mBlock->LinesEnd() != mCurrentLine, "null ptr");
NS_PRECONDITION(aFloat->GetStateBits() & NS_FRAME_OUT_OF_FLOW,
"aFloat must be an out-of-flow frame");

View File

@ -183,8 +183,8 @@ ReflowInput::ReflowInput(
: SizeComputationInput(aFrame, aParentReflowInput.mRenderingContext)
, mBlockDelta(0)
, mOrthogonalLimit(NS_UNCONSTRAINEDSIZE)
, mReflowDepth(aParentReflowInput.mReflowDepth + 1)
, mFlags(aParentReflowInput.mFlags)
, mReflowDepth(aParentReflowInput.mReflowDepth + 1)
{
MOZ_ASSERT(aPresContext, "no pres context");
MOZ_ASSERT(aFrame, "no frame");

View File

@ -177,47 +177,47 @@ public:
struct ReflowInputFlags {
ReflowInputFlags() { memset(this, 0, sizeof(*this)); }
uint16_t mSpecialBSizeReflow:1; // used by tables to communicate special reflow (in process) to handle
uint32_t mSpecialBSizeReflow:1; // used by tables to communicate special reflow (in process) to handle
// percent bsize frames inside cells which may not have computed bsizes
uint16_t mNextInFlowUntouched:1; // nothing in the frame's next-in-flow (or its descendants)
uint32_t mNextInFlowUntouched:1; // nothing in the frame's next-in-flow (or its descendants)
// is changing
uint16_t mIsTopOfPage:1; // Is the current context at the top of a
uint32_t mIsTopOfPage:1; // Is the current context at the top of a
// page? When true, we force something
// that's too tall for a page/column to
// fit anyway to avoid infinite loops.
uint16_t mAssumingHScrollbar:1; // parent frame is an nsIScrollableFrame and it
uint32_t mAssumingHScrollbar:1; // parent frame is an nsIScrollableFrame and it
// is assuming a horizontal scrollbar
uint16_t mAssumingVScrollbar:1; // parent frame is an nsIScrollableFrame and it
uint32_t mAssumingVScrollbar:1; // parent frame is an nsIScrollableFrame and it
// is assuming a vertical scrollbar
uint16_t mIsIResize:1; // Is frame (a) not dirty and (b) a
uint32_t mIsIResize:1; // Is frame (a) not dirty and (b) a
// different inline-size than before?
uint16_t mIsBResize:1; // Is frame (a) not dirty and (b) a
uint32_t mIsBResize:1; // Is frame (a) not dirty and (b) a
// different block-size than before or
// (potentially) in a context where
// percent block-sizes have a different
// basis?
uint16_t mTableIsSplittable:1; // tables are splittable, this should happen only inside a page
uint32_t mTableIsSplittable:1; // tables are splittable, this should happen only inside a page
// and never insider a column frame
uint16_t mHeightDependsOnAncestorCell:1; // Does frame height depend on
uint32_t mHeightDependsOnAncestorCell:1; // Does frame height depend on
// an ancestor table-cell?
uint16_t mIsColumnBalancing:1; // nsColumnSetFrame is balancing columns
uint16_t mIsFlexContainerMeasuringHeight:1; // nsFlexContainerFrame is
uint32_t mIsColumnBalancing:1; // nsColumnSetFrame is balancing columns
uint32_t mIsFlexContainerMeasuringHeight:1; // nsFlexContainerFrame is
// reflowing this child to
// measure its intrinsic height.
uint16_t mDummyParentReflowInput:1; // a "fake" reflow state made
uint32_t mDummyParentReflowInput:1; // a "fake" reflow state made
// in order to be the parent
// of a real one
uint16_t mMustReflowPlaceholders:1; // Should this frame reflow its place-
uint32_t mMustReflowPlaceholders:1; // Should this frame reflow its place-
// holder children? If the available
// height of this frame didn't change,
// but its in a paginated environment
// (e.g. columns), it should always
// reflow its placeholder children.
uint16_t mShrinkWrap:1; // stores the COMPUTE_SIZE_SHRINK_WRAP ctor flag
uint16_t mUseAutoBSize:1; // stores the COMPUTE_SIZE_USE_AUTO_BSIZE ctor flag
uint16_t mStaticPosIsCBOrigin:1; // the STATIC_POS_IS_CB_ORIGIN ctor flag
uint32_t mShrinkWrap:1; // stores the COMPUTE_SIZE_SHRINK_WRAP ctor flag
uint32_t mUseAutoBSize:1; // stores the COMPUTE_SIZE_USE_AUTO_BSIZE ctor flag
uint32_t mStaticPosIsCBOrigin:1; // the STATIC_POS_IS_CB_ORIGIN ctor flag
};
#ifdef DEBUG
@ -601,10 +601,11 @@ public:
// requested here.
nsIFrame** mDiscoveredClearance;
ReflowInputFlags mFlags;
// This value keeps track of how deeply nested a given reflow state
// is from the top of the frame tree.
int16_t mReflowDepth;
ReflowInputFlags mFlags;
// Logical and physical accessors for the resize flags. All users should go
// via these accessors, so that in due course we can change the storage from

View File

@ -73,8 +73,8 @@ typedef nsAbsoluteContainingBlock::AbsPosReflowFlags AbsPosReflowFlags;
static void MarkAllDescendantLinesDirty(nsBlockFrame* aBlock)
{
nsLineList::iterator line = aBlock->BeginLine();
nsLineList::iterator endLine = aBlock->EndLine();
nsLineList::iterator line = aBlock->LinesBegin();
nsLineList::iterator endLine = aBlock->LinesEnd();
while (line != endLine) {
if (line->IsBlock()) {
nsIFrame* f = line->mFirstChild;
@ -117,8 +117,8 @@ static bool BlockHasAnyFloats(nsIFrame* aFrame)
if (block->GetChildList(nsIFrame::kFloatList).FirstChild())
return true;
nsLineList::iterator line = block->BeginLine();
nsLineList::iterator endLine = block->EndLine();
nsLineList::iterator line = block->LinesBegin();
nsLineList::iterator endLine = block->LinesEnd();
while (line != endLine) {
if (line->IsBlock() && BlockHasAnyFloats(line->mFirstChild))
return true;
@ -397,7 +397,7 @@ nsBlockFrame::List(FILE* out, const char* aPrefix, uint32_t aFlags) const
// Output the lines
if (!mLines.empty()) {
ConstLineIterator line = BeginLine(), line_end = EndLine();
ConstLineIterator line = LinesBegin(), line_end = LinesEnd();
for ( ; line != line_end; ++line) {
line->List(out, pfx.get(), aFlags);
}
@ -504,7 +504,7 @@ nsBlockFrame::GetCaretBaseline() const
nsMargin bp = GetUsedBorderAndPadding();
if (!mLines.empty()) {
ConstLineIterator line = BeginLine();
ConstLineIterator line = LinesBegin();
const nsLineBox* firstLine = line;
if (firstLine->GetChildCount()) {
return bp.top + firstLine->mFirstChild->GetCaretBaseline();
@ -704,7 +704,7 @@ nsBlockFrame::GetMinISize(nsRenderingContext *aRenderingContext)
InlineMinISizeData data;
for (nsBlockFrame* curFrame = this; curFrame;
curFrame = static_cast<nsBlockFrame*>(curFrame->GetNextContinuation())) {
for (LineIterator line = curFrame->BeginLine(), line_end = curFrame->EndLine();
for (LineIterator line = curFrame->LinesBegin(), line_end = curFrame->LinesEnd();
line != line_end; ++line)
{
#ifdef DEBUG
@ -723,7 +723,7 @@ nsBlockFrame::GetMinISize(nsRenderingContext *aRenderingContext)
data.ForceBreak();
} else {
if (!curFrame->GetPrevContinuation() &&
line == curFrame->BeginLine()) {
line == curFrame->LinesBegin()) {
// Only add text-indent if it has no percentages; using a
// percentage basis of 0 unconditionally would give strange
// behavior for calc(10%-3px).
@ -792,7 +792,7 @@ nsBlockFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
InlinePrefISizeData data;
for (nsBlockFrame* curFrame = this; curFrame;
curFrame = static_cast<nsBlockFrame*>(curFrame->GetNextContinuation())) {
for (LineIterator line = curFrame->BeginLine(), line_end = curFrame->EndLine();
for (LineIterator line = curFrame->LinesBegin(), line_end = curFrame->LinesEnd();
line != line_end; ++line)
{
#ifdef DEBUG
@ -813,7 +813,7 @@ nsBlockFrame::GetPrefISize(nsRenderingContext *aRenderingContext)
data.ForceBreak();
} else {
if (!curFrame->GetPrevContinuation() &&
line == curFrame->BeginLine()) {
line == curFrame->LinesBegin()) {
// Only add text-indent if it has no percentages; using a
// percentage basis of 0 unconditionally would give strange
// behavior for calc(10%-3px).
@ -878,7 +878,7 @@ nsBlockFrame::GetPrefWidthTightBounds(nsRenderingContext* aRenderingContext,
InlinePrefISizeData data;
for (nsBlockFrame* curFrame = this; curFrame;
curFrame = static_cast<nsBlockFrame*>(curFrame->GetNextContinuation())) {
for (LineIterator line = curFrame->BeginLine(), line_end = curFrame->EndLine();
for (LineIterator line = curFrame->LinesBegin(), line_end = curFrame->LinesEnd();
line != line_end; ++line)
{
nscoord childX, childXMost;
@ -891,7 +891,7 @@ nsBlockFrame::GetPrefWidthTightBounds(nsRenderingContext* aRenderingContext,
*aXMost = std::max(*aXMost, childXMost);
} else {
if (!curFrame->GetPrevContinuation() &&
line == curFrame->BeginLine()) {
line == curFrame->LinesBegin()) {
// Only add text-indent if it has no percentages; using a
// percentage basis of 0 unconditionally would give strange
// behavior for calc(10%-3px).
@ -1313,7 +1313,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
nsSize containerSize = aMetrics.PhysicalSize();
nscoord deltaX = containerSize.width - state.ContainerSize().width;
if (deltaX != 0) {
for (LineIterator line = BeginLine(), end = EndLine();
for (LineIterator line = LinesBegin(), end = LinesEnd();
line != end; line++) {
UpdateLineContainerSize(line, containerSize);
}
@ -1484,8 +1484,8 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
bool
nsBlockFrame::CheckForCollapsedBEndMarginFromClearanceLine()
{
LineIterator begin = BeginLine();
LineIterator line = EndLine();
LineIterator begin = LinesBegin();
LineIterator line = LinesEnd();
while (true) {
if (begin == line) {
@ -1719,7 +1719,7 @@ nsBlockFrame::ComputeOverflowAreas(const nsRect& aBounds,
// the things that makes incremental reflow O(N^2).
nsOverflowAreas areas(aBounds, aBounds);
if (!ShouldApplyOverflowClipping(this, aDisplay)) {
for (LineIterator line = BeginLine(), line_end = EndLine();
for (LineIterator line = LinesBegin(), line_end = LinesEnd();
line != line_end;
++line) {
areas.UnionWith(line->GetOverflowAreas());
@ -1757,7 +1757,7 @@ nsBlockFrame::UnionChildOverflow(nsOverflowAreas& aOverflowAreas)
// get cached and re-used otherwise. Lines aren't exposed as normal
// frame children, so calling UnionChildOverflow alone will end up
// using the old cached values.
for (LineIterator line = BeginLine(), line_end = EndLine();
for (LineIterator line = LinesBegin(), line_end = LinesEnd();
line != line_end;
++line) {
nsRect bounds = line->GetPhysicalBounds();
@ -1807,7 +1807,7 @@ void
nsBlockFrame::LazyMarkLinesDirty()
{
if (GetStateBits() & NS_BLOCK_LOOK_FOR_DIRTY_FRAMES) {
for (LineIterator line = BeginLine(), line_end = EndLine();
for (LineIterator line = LinesBegin(), line_end = LinesEnd();
line != line_end; ++line) {
int32_t n = line->GetChildCount();
for (nsIFrame* lineFrame = line->mFirstChild;
@ -1914,7 +1914,7 @@ nsBlockFrame::PrepareResizeReflow(BlockReflowInput& aState)
}
#endif
for (LineIterator line = BeginLine(), line_end = EndLine();
for (LineIterator line = LinesBegin(), line_end = LinesEnd();
line != line_end;
++line)
{
@ -1942,7 +1942,7 @@ nsBlockFrame::PrepareResizeReflow(BlockReflowInput& aState)
IndentBy(stdout, gNoiseIndent + 1);
printf("skipped: line=%p next=%p %s %s%s%s breakTypeBefore/After=%s/%s xmost=%d\n",
static_cast<void*>(line.get()),
static_cast<void*>((line.next() != EndLine() ? line.next().get() : nullptr)),
static_cast<void*>((line.next() != LinesEnd() ? line.next().get() : nullptr)),
line->IsBlock() ? "block" : "inline",
line->HasBreakAfter() ? "has-break-after " : "",
line->HasFloats() ? "has-floats " : "",
@ -1956,7 +1956,7 @@ nsBlockFrame::PrepareResizeReflow(BlockReflowInput& aState)
}
else {
// Mark everything dirty
for (LineIterator line = BeginLine(), line_end = EndLine();
for (LineIterator line = LinesBegin(), line_end = LinesEnd();
line != line_end;
++line)
{
@ -2124,8 +2124,8 @@ nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState)
if (aState.mReflowInput.AvailableBSize() != NS_UNCONSTRAINEDSIZE
&& GetNextInFlow() && aState.mReflowInput.AvailableBSize() >
GetLogicalSize().BSize(aState.mReflowInput.GetWritingMode())) {
LineIterator lastLine = EndLine();
if (lastLine != BeginLine()) {
LineIterator lastLine = LinesEnd();
if (lastLine != LinesBegin()) {
--lastLine;
lastLine->MarkDirty();
}
@ -2145,7 +2145,7 @@ nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState)
// We save up information about BR-clearance here
StyleClear inlineFloatBreakType = aState.mFloatBreakType;
LineIterator line = BeginLine(), line_end = EndLine();
LineIterator line = LinesBegin(), line_end = LinesEnd();
// Reflow the lines that are already ours
for ( ; line != line_end; ++line, aState.AdvanceToNextLine()) {
@ -2363,7 +2363,7 @@ nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState)
// we don't need to check 4), but if the line is not empty now and we're sure
// it wasn't empty before, any adjacency and clearance changes are irrelevant
// to the result of nextLine->ShouldApplyBStartMargin.
if (line.next() != EndLine()) {
if (line.next() != LinesEnd()) {
bool maybeWasEmpty = oldB == line.next()->BStart();
bool isEmpty = line->CachedIsEmpty();
if (maybeReflowingForFirstTime /*1*/ ||
@ -2509,8 +2509,8 @@ nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState)
// line of my next-in-flow-chain. (But first, check that I
// have any lines -- if I don't, just bail out of this
// optimization.)
LineIterator lineIter = this->EndLine();
if (lineIter != this->BeginLine()) {
LineIterator lineIter = this->LinesEnd();
if (lineIter != this->LinesBegin()) {
lineIter--; // I have lines; step back from dummy iterator to last line.
nsBlockInFlowLineIterator bifLineIter(this, lineIter);
@ -2581,7 +2581,7 @@ nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState)
mFrames.AppendFrames(nullptr, pulledFrames);
// Add line to our line list, and set its last child as our new prev-child
line = mLines.before_insert(EndLine(), pulledLine);
line = mLines.before_insert(LinesEnd(), pulledLine);
aState.mPrevChild = mFrames.LastChild();
// Reparent floats whose placeholders are in the line.
@ -2599,7 +2599,7 @@ nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState)
// (we have to loop here because reflowing the line may cause a new
// line to be created; see SplitLine's callers for examples of
// when this happens).
while (line != EndLine()) {
while (line != LinesEnd()) {
ReflowLine(aState, line, &keepGoing);
if (aState.mReflowInput.WillReflowAgainForClearance()) {
@ -2788,7 +2788,7 @@ nsBlockFrame::PullFrame(BlockReflowInput& aState,
LineIterator aLine)
{
// First check our remaining lines.
if (EndLine() != aLine.next()) {
if (LinesEnd() != aLine.next()) {
return PullFrameFrom(aLine, this, aLine.next());
}
@ -3058,7 +3058,7 @@ nsBlockFrame::CachedIsEmpty()
return false;
}
for (LineIterator line = BeginLine(), line_end = EndLine();
for (LineIterator line = LinesBegin(), line_end = LinesEnd();
line != line_end;
++line)
{
@ -3076,7 +3076,7 @@ nsBlockFrame::IsEmpty()
return false;
}
for (LineIterator line = BeginLine(), line_end = EndLine();
for (LineIterator line = LinesBegin(), line_end = LinesEnd();
line != line_end;
++line)
{
@ -3108,7 +3108,7 @@ nsBlockFrame::ShouldApplyBStartMargin(BlockReflowInput& aState,
}
// Determine if this line is "essentially" the first line
LineIterator line = BeginLine();
LineIterator line = LinesBegin();
if (aState.mFlags.mHasLineAdjacentToTop) {
line = aState.mLineAdjacentToTop;
}
@ -3561,7 +3561,7 @@ nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
if (aLine->SetCarriedOutBEndMargin(collapsedBEndMargin)) {
LineIterator nextLine = aLine;
++nextLine;
if (nextLine != EndLine()) {
if (nextLine != LinesEnd()) {
nextLine->MarkPreviousMarginDirty();
}
}
@ -3627,8 +3627,8 @@ nsBlockFrame::ReflowBlockFrame(BlockReflowInput& aState,
nsLayoutUtils::GetAsBlock(nextFrame->GetParent());
NS_ASSERTION(nifBlock,
"A block's child's next in flow's parent must be a block!");
for (LineIterator line = nifBlock->BeginLine(),
line_end = nifBlock->EndLine(); line != line_end; ++line) {
for (LineIterator line = nifBlock->LinesBegin(),
line_end = nifBlock->LinesEnd(); line != line_end; ++line) {
if (line->Contains(nextFrame)) {
line->MarkDirty();
break;
@ -3903,7 +3903,7 @@ nsBlockFrame::DoReflowInlineFrames(BlockReflowInput& aState,
// (because of DeleteNextInFlowChild). If so, delete them now
// in case we are finished.
++aLine;
while ((aLine != EndLine()) && (0 == aLine->GetChildCount())) {
while ((aLine != LinesEnd()) && (0 == aLine->GetChildCount())) {
// XXX Is this still necessary now that DeleteNextInFlowChild
// uses DoRemoveFrame?
nsLineBox *toremove = aLine;
@ -4383,7 +4383,7 @@ bool
nsBlockFrame::IsLastLine(BlockReflowInput& aState,
LineIterator aLine)
{
while (++aLine != EndLine()) {
while (++aLine != LinesEnd()) {
// There is another line
if (0 != aLine->GetChildCount()) {
// If the next line is a block line then this line is the last in a
@ -4397,8 +4397,8 @@ nsBlockFrame::IsLastLine(BlockReflowInput& aState,
// Try our next-in-flows lines to answer the question
nsBlockFrame* nextInFlow = (nsBlockFrame*) GetNextInFlow();
while (nullptr != nextInFlow) {
for (LineIterator line = nextInFlow->BeginLine(),
line_end = nextInFlow->EndLine();
for (LineIterator line = nextInFlow->LinesBegin(),
line_end = nextInFlow->LinesEnd();
line != line_end;
++line)
{
@ -4635,9 +4635,9 @@ nsBlockFrame::PushLines(BlockReflowInput& aState,
nsLineList::iterator overBegin(aLineBefore.next());
// PushTruncatedPlaceholderLine sometimes pushes the first line. Ugh.
bool firstLine = overBegin == BeginLine();
bool firstLine = overBegin == LinesBegin();
if (overBegin != EndLine()) {
if (overBegin != LinesEnd()) {
// Remove floats in the lines from mFloats
nsFrameList floats;
CollectFloats(overBegin->mFirstChild, floats, true);
@ -4678,7 +4678,7 @@ nsBlockFrame::PushLines(BlockReflowInput& aState,
overflowLines->mFrames.InsertFrames(nullptr, nullptr, pushedFrames);
overflowLines->mLines.splice(overflowLines->mLines.begin(), mLines,
overBegin, EndLine());
overBegin, LinesEnd());
NS_ASSERTION(!overflowLines->mLines.empty(), "should not be empty");
// this takes ownership but it won't delete it immediately so we
// can keep using it.
@ -5352,7 +5352,7 @@ nsBlockFrame::RemoveFloatFromFloatCache(nsIFrame* aFloat)
{
// Find which line contains the float, so we can update
// the float cache.
LineIterator line = BeginLine(), line_end = EndLine();
LineIterator line = LinesBegin(), line_end = LinesEnd();
for ( ; line != line_end; ++line) {
if (line->IsInline() && line->RemoveFloat(aFloat)) {
break;
@ -5455,7 +5455,7 @@ nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
: mFrame(aFrame), mLine(aLine), mLineList(&aFrame->mLines)
{
// This will assert if aLine isn't in mLines of aFrame:
DebugOnly<bool> check = aLine == mFrame->BeginLine();
DebugOnly<bool> check = aLine == mFrame->LinesBegin();
}
nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
@ -5470,7 +5470,7 @@ nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
bool* aFoundValidLine)
: mFrame(aFrame), mLineList(&aFrame->mLines)
{
mLine = aFrame->BeginLine();
mLine = aFrame->LinesBegin();
*aFoundValidLine = FindValidLine();
}
@ -5507,15 +5507,15 @@ nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
if (!child)
return;
LineIterator line_end = aFrame->EndLine();
LineIterator line_end = aFrame->LinesEnd();
// Try to use the cursor if it exists, otherwise fall back to the first line
if (nsLineBox* const cursor = aFrame->GetLineCursor()) {
mLine = line_end;
// Perform a simultaneous forward and reverse search starting from the
// line cursor.
nsBlockFrame::LineIterator line = aFrame->BeginLineFrom(cursor);
nsBlockFrame::ReverseLineIterator rline = aFrame->RBeginLineFrom(cursor);
nsBlockFrame::ReverseLineIterator rline_end = aFrame->REndLine();
nsBlockFrame::LineIterator line = aFrame->LinesBeginFrom(cursor);
nsBlockFrame::ReverseLineIterator rline = aFrame->LinesRBeginFrom(cursor);
nsBlockFrame::ReverseLineIterator rline_end = aFrame->LinesREnd();
// rline is positioned on the line containing 'cursor', so it's not
// rline_end. So we can safely increment it (i.e. move it to one line
// earlier) to start searching there.
@ -5544,7 +5544,7 @@ nsBlockInFlowLineIterator::nsBlockInFlowLineIterator(nsBlockFrame* aFrame,
return;
}
} else {
for (mLine = aFrame->BeginLine(); mLine != line_end; ++mLine) {
for (mLine = aFrame->LinesBegin(); mLine != line_end; ++mLine) {
if (mLine->Contains(child)) {
*aFoundValidLine = true;
return;
@ -6246,8 +6246,8 @@ nsBlockFrame::FindTrailingClear()
// find the break type of the last line
for (nsIFrame* b = this; b; b = b->GetPrevInFlow()) {
nsBlockFrame* block = static_cast<nsBlockFrame*>(b);
LineIterator endLine = block->EndLine();
if (endLine != block->BeginLine()) {
LineIterator endLine = block->LinesEnd();
if (endLine != block->LinesBegin()) {
--endLine;
return endLine->GetBreakTypeAfter();
}
@ -6350,7 +6350,7 @@ nsBlockFrame::RecoverFloats(nsFloatManager& aFloatManager, WritingMode aWM,
}
// Recurse into our normal children
for (nsBlockFrame::LineIterator line = BeginLine(); line != EndLine(); ++line) {
for (nsBlockFrame::LineIterator line = LinesBegin(); line != LinesEnd(); ++line) {
if (line->IsBlock()) {
RecoverFloatsFor(line->mFirstChild, aFloatManager, aWM, aContainerSize);
}
@ -6560,7 +6560,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
// frame in our child list, it's also true for |this|.
nsLineBox* cursor = aBuilder->ShouldDescendIntoFrame(this) ?
nullptr : GetFirstLineContaining(aDirtyRect.y);
LineIterator line_end = EndLine();
LineIterator line_end = LinesEnd();
if (cursor) {
for (LineIterator line = mLines.begin(cursor);
@ -6582,7 +6582,7 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
int32_t lineCount = 0;
nscoord lastY = INT32_MIN;
nscoord lastYMost = INT32_MIN;
for (LineIterator line = BeginLine();
for (LineIterator line = LinesBegin();
line != line_end;
++line) {
nsRect lineArea = line->GetVisualOverflowArea();
@ -6745,13 +6745,13 @@ nsBlockFrame::ChildIsDirty(nsIFrame* aChild)
// The bullet lives in the first line, unless the first line has
// height 0 and there is a second line, in which case it lives
// in the second line.
LineIterator bulletLine = BeginLine();
if (bulletLine != EndLine() && bulletLine->BSize() == 0 &&
LineIterator bulletLine = LinesBegin();
if (bulletLine != LinesEnd() && bulletLine->BSize() == 0 &&
bulletLine != mLines.back()) {
bulletLine = bulletLine.next();
}
if (bulletLine != EndLine()) {
if (bulletLine != LinesEnd()) {
MarkLineDirty(bulletLine, &mLines);
}
// otherwise we have an empty line list, and ReflowDirtyLines
@ -7136,7 +7136,7 @@ nsBlockFrame::CheckFloats(BlockReflowInput& aState)
// Check that the float list is what we would have built
AutoTArray<nsIFrame*, 8> lineFloats;
for (LineIterator line = BeginLine(), line_end = EndLine();
for (LineIterator line = LinesBegin(), line_end = LinesEnd();
line != line_end; ++line) {
if (line->HasFloats()) {
nsFloatCache* fc = line->GetFirstFloat();
@ -7379,7 +7379,7 @@ nsBlockFrame::VerifyLines(bool aFinalCheckOK)
// set properly.
int32_t count = 0;
LineIterator line, line_end;
for (line = BeginLine(), line_end = EndLine();
for (line = LinesBegin(), line_end = LinesEnd();
line != line_end;
++line) {
if (line == cursor) {
@ -7404,7 +7404,7 @@ nsBlockFrame::VerifyLines(bool aFinalCheckOK)
NS_ASSERTION(count == frameCount, "bad line list");
// Next: test that each line has right number of frames on it
for (line = BeginLine(), line_end = EndLine();
for (line = LinesBegin(), line_end = LinesEnd();
line != line_end;
) {
count = line->GetChildCount();
@ -7492,8 +7492,8 @@ nsBlockFrame::VerifyOverflowSituation()
}
nsLineBox* cursor = flow->GetLineCursor();
if (cursor) {
LineIterator line = flow->BeginLine();
LineIterator line_end = flow->EndLine();
LineIterator line = flow->LinesBegin();
LineIterator line_end = flow->LinesEnd();
for (; line != line_end && line != cursor; ++line)
;
if (line == line_end && overflowLines) {

View File

@ -88,16 +88,16 @@ public:
typedef nsLineList::reverse_iterator ReverseLineIterator;
typedef nsLineList::const_reverse_iterator ConstReverseLineIterator;
LineIterator BeginLine() { return mLines.begin(); }
LineIterator EndLine() { return mLines.end(); }
ConstLineIterator BeginLine() const { return mLines.begin(); }
ConstLineIterator EndLine() const { return mLines.end(); }
ReverseLineIterator RBeginLine() { return mLines.rbegin(); }
ReverseLineIterator REndLine() { return mLines.rend(); }
ConstReverseLineIterator RBeginLine() const { return mLines.rbegin(); }
ConstReverseLineIterator REndLine() const { return mLines.rend(); }
LineIterator BeginLineFrom(nsLineBox* aList) { return mLines.begin(aList); }
ReverseLineIterator RBeginLineFrom(nsLineBox* aList) { return mLines.rbegin(aList); }
LineIterator LinesBegin() { return mLines.begin(); }
LineIterator LinesEnd() { return mLines.end(); }
ConstLineIterator LinesBegin() const { return mLines.begin(); }
ConstLineIterator LinesEnd() const { return mLines.end(); }
ReverseLineIterator LinesRBegin() { return mLines.rbegin(); }
ReverseLineIterator LinesREnd() { return mLines.rend(); }
ConstReverseLineIterator LinesRBegin() const { return mLines.rbegin(); }
ConstReverseLineIterator LinesREnd() const { return mLines.rend(); }
LineIterator LinesBeginFrom(nsLineBox* aList) { return mLines.begin(aList); }
ReverseLineIterator LinesRBeginFrom(nsLineBox* aList) { return mLines.rbegin(aList); }
friend nsBlockFrame* NS_NewBlockFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
@ -798,7 +798,7 @@ protected:
/**
* Push the line after aLineBefore to the overflow line list.
* @param aLineBefore a line in 'mLines' (or BeginLine() when
* @param aLineBefore a line in 'mLines' (or LinesBegin() when
* pushing the first line)
*/
void PushLines(BlockReflowInput& aState,

View File

@ -114,8 +114,8 @@ nsBlockReflowContext::ComputeCollapsedBStartMargin(const ReflowInput& aRI,
line_end = lines->end();
}
} else {
line = block->BeginLine();
line_end = block->EndLine();
line = block->LinesBegin();
line_end = block->LinesEnd();
}
for (; anyLines && line != line_end; ++line) {
if (!aClearanceFrame && line->HasClearance()) {

View File

@ -3983,7 +3983,7 @@ static FrameTarget GetSelectionClosestFrameForLine(
{
nsIFrame *frame = aLine->mFirstChild;
// Account for end of lines (any iterator from the block is valid)
if (aLine == aParent->EndLine())
if (aLine == aParent->LinesEnd())
return DrillDownToSelectionFrame(aParent, true, aFlags);
nsIFrame *closestFromIStart = nullptr, *closestFromIEnd = nullptr;
nscoord closestIStart = aLine->IStart(), closestIEnd = aLine->IEnd();
@ -4044,8 +4044,8 @@ static FrameTarget GetSelectionClosestFrameForBlock(nsIFrame* aFrame,
return FrameTarget::Null();
// This code searches for the correct line
nsBlockFrame::LineIterator firstLine = bf->BeginLine();
nsBlockFrame::LineIterator end = bf->EndLine();
nsBlockFrame::LineIterator firstLine = bf->LinesBegin();
nsBlockFrame::LineIterator end = bf->LinesEnd();
if (firstLine == end) {
nsIContent *blockContent = aFrame->GetContent();
if (blockContent) {

View File

@ -5093,8 +5093,8 @@ LazyGetLineBaselineOffset(nsIFrame* aChildFrame, nsBlockFrame* aBlockFrame)
nsIFrame::LineBaselineOffset(), &offsetFound);
if (!offsetFound) {
for (nsBlockFrame::LineIterator line = aBlockFrame->BeginLine(),
line_end = aBlockFrame->EndLine();
for (nsBlockFrame::LineIterator line = aBlockFrame->LinesBegin(),
line_end = aBlockFrame->LinesEnd();
line != line_end; line++) {
if (line->IsInline()) {
int32_t n = line->GetChildCount();

View File

@ -1,48 +0,0 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_ServoBindingHelpers_h
#define mozilla_ServoBindingHelpers_h
#include "mozilla/RefPtr.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/UniquePtr.h"
namespace mozilla {
#define DEFINE_REFPTR_TRAITS(name_, type_) \
template<> \
struct RefPtrTraits<type_> \
{ \
static void AddRef(type_* aPtr) \
{ \
Servo_##name_##_AddRef(aPtr); \
} \
static void Release(type_* aPtr) \
{ \
Servo_##name_##_Release(aPtr); \
} \
}
DEFINE_REFPTR_TRAITS(StyleSheet, RawServoStyleSheet);
DEFINE_REFPTR_TRAITS(ComputedValues, ServoComputedValues);
DEFINE_REFPTR_TRAITS(DeclarationBlock, RawServoDeclarationBlock);
#undef DEFINE_REFPTR_TRAITS
template<>
class DefaultDelete<RawServoStyleSet>
{
public:
void operator()(RawServoStyleSet* aPtr) const
{
Servo_StyleSet_Drop(aPtr);
}
};
} // namespace mozilla
#endif // mozilla_ServoBindingHelpers_h

View File

@ -0,0 +1,141 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_ServoBindingTypes_h
#define mozilla_ServoBindingTypes_h
#include "mozilla/RefPtr.h"
#include "mozilla/UniquePtr.h"
struct ServoComputedValues;
struct RawServoStyleSheet;
struct RawServoStyleSet;
struct RawServoDeclarationBlock;
namespace mozilla {
namespace dom {
class Element;
class StyleChildrenIterator;
} // namespace dom
} // namespace mozilla
class nsIDocument;
class nsINode;
using mozilla::dom::StyleChildrenIterator;
typedef nsINode RawGeckoNode;
typedef mozilla::dom::Element RawGeckoElement;
typedef nsIDocument RawGeckoDocument;
// We have these helper types so that we can directly generate
// things like &T or Borrowed<T> on the Rust side in the function, providing
// additional safety benefits.
//
// FFI has a problem with templated types, so we just use raw pointers here.
//
// The "Borrowed" types generate &T or Borrowed<T> in the nullable case.
//
// The "Owned" types generate Owned<T> or OwnedOrNull<T>. Some of these
// are Servo-managed and can be converted to Box<ServoType> on the
// Servo side.
//
// The "Arc" types are Servo-managed Arc<ServoType>s, which are passed
// over FFI as Strong<T> (which is nullable).
// Note that T != ServoType, rather T is ArcInner<ServoType>
#define DECL_BORROWED_REF_TYPE_FOR(type_) typedef type_ const* type_##Borrowed;
#define DECL_NULLABLE_BORROWED_REF_TYPE_FOR(type_) typedef type_ const* type_##BorrowedOrNull;
#define DECL_BORROWED_MUT_REF_TYPE_FOR(type_) typedef type_* type_##BorrowedMut;
#define DECL_NULLABLE_BORROWED_MUT_REF_TYPE_FOR(type_) typedef type_* type_##BorrowedMutOrNull;
#define DECL_ARC_REF_TYPE_FOR(type_) \
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(type_) \
DECL_BORROWED_REF_TYPE_FOR(type_) \
struct MOZ_MUST_USE_TYPE type_##Strong \
{ \
type_* mPtr; \
already_AddRefed<type_> Consume(); \
};
#define DECL_OWNED_REF_TYPE_FOR(type_) \
typedef type_* type_##Owned; \
DECL_BORROWED_REF_TYPE_FOR(type_) \
DECL_BORROWED_MUT_REF_TYPE_FOR(type_)
#define DECL_NULLABLE_OWNED_REF_TYPE_FOR(type_) \
typedef type_* type_##OwnedOrNull; \
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(type_) \
DECL_NULLABLE_BORROWED_MUT_REF_TYPE_FOR(type_)
DECL_ARC_REF_TYPE_FOR(ServoComputedValues)
DECL_ARC_REF_TYPE_FOR(RawServoStyleSheet)
DECL_ARC_REF_TYPE_FOR(RawServoDeclarationBlock)
// This is a reference to a reference of RawServoDeclarationBlock, which
// corresponds to Option<&Arc<RawServoDeclarationBlock>> in Servo side.
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawServoDeclarationBlockStrong)
DECL_OWNED_REF_TYPE_FOR(RawServoStyleSet)
DECL_NULLABLE_OWNED_REF_TYPE_FOR(StyleChildrenIterator)
DECL_OWNED_REF_TYPE_FOR(StyleChildrenIterator)
// We don't use BorrowedMut because the nodes may alias
// Servo itself doesn't directly read or mutate these;
// it only asks Gecko to do so. In case we wish to in
// the future, we should ensure that things being mutated
// are protected from noalias violations by a cell type
DECL_BORROWED_REF_TYPE_FOR(RawGeckoNode)
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawGeckoNode)
DECL_BORROWED_REF_TYPE_FOR(RawGeckoElement)
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawGeckoElement)
DECL_BORROWED_REF_TYPE_FOR(RawGeckoDocument)
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawGeckoDocument)
DECL_BORROWED_MUT_REF_TYPE_FOR(StyleChildrenIterator)
#undef DECL_ARC_REF_TYPE_FOR
#undef DECL_OWNED_REF_TYPE_FOR
#undef DECL_NULLABLE_OWNED_REF_TYPE_FOR
#undef DECL_BORROWED_REF_TYPE_FOR
#undef DECL_NULLABLE_BORROWED_REF_TYPE_FOR
#undef DECL_BORROWED_MUT_REF_TYPE_FOR
#undef DECL_NULLABLE_BORROWED_MUT_REF_TYPE_FOR
#define DEFINE_REFPTR_TRAITS(name_, type_) \
extern "C" { \
void Servo_##name_##_AddRef(type_##Borrowed ptr); \
void Servo_##name_##_Release(type_##Borrowed ptr); \
} \
namespace mozilla { \
template<> struct RefPtrTraits<type_> { \
static void AddRef(type_* aPtr) { \
Servo_##name_##_AddRef(aPtr); \
} \
static void Release(type_* aPtr) { \
Servo_##name_##_Release(aPtr); \
} \
}; \
}
DEFINE_REFPTR_TRAITS(StyleSheet, RawServoStyleSheet)
DEFINE_REFPTR_TRAITS(ComputedValues, ServoComputedValues)
DEFINE_REFPTR_TRAITS(DeclarationBlock, RawServoDeclarationBlock)
#undef DEFINE_REFPTR_TRAITS
extern "C" void Servo_StyleSet_Drop(RawServoStyleSetOwned ptr);
namespace mozilla {
template<>
class DefaultDelete<RawServoStyleSet>
{
public:
void operator()(RawServoStyleSet* aPtr) const
{
Servo_StyleSet_Drop(aPtr);
}
};
}
#endif // mozilla_ServoBindingTypes_h

View File

@ -7,18 +7,14 @@
#ifndef mozilla_ServoBindings_h
#define mozilla_ServoBindings_h
#include <stdint.h>
#include "mozilla/ServoTypes.h"
#include "mozilla/ServoBindingTypes.h"
#include "mozilla/ServoElementSnapshot.h"
#include "mozilla/css/SheetParsingMode.h"
#include "mozilla/dom/Element.h"
#include "nsIDocument.h"
#include "nsINode.h"
#include "nsChangeHint.h"
#include "nsColor.h"
#include "nsProxyRelease.h"
#include "nsStyleCoord.h"
#include "nsStyleStruct.h"
#include "stdint.h"
/*
* API for Servo to access Gecko data structures. This file must compile as valid
@ -38,99 +34,13 @@ namespace mozilla {
}
using mozilla::FontFamilyList;
using mozilla::FontFamilyType;
using mozilla::dom::Element;
using mozilla::ServoElementSnapshot;
struct ServoComputedValues;
struct RawServoStyleSheet;
struct RawServoStyleSet;
class nsHTMLCSSStyleSheet;
struct nsStyleList;
struct nsStyleImage;
struct nsStyleGradientStop;
class nsStyleGradient;
class nsStyleCoord;
struct nsStyleDisplay;
struct RawServoDeclarationBlock;
namespace mozilla {
namespace dom {
class StyleChildrenIterator;
}
}
using mozilla::dom::StyleChildrenIterator;
// We have these helper types so that we can directly generate
// things like &T or Borrowed<T> on the Rust side in the function, providing
// additional safety benefits.
//
// FFI has a problem with templated types, so we just use raw pointers here.
//
// The "Borrowed" types generate &T or Borrowed<T> in the nullable case.
//
// The "Owned" types generate Owned<T> or OwnedOrNull<T>. Some of these
// are Servo-managed and can be converted to Box<ServoType> on the
// Servo side.
//
// The "Arc" types are Servo-managed Arc<ServoType>s, which are passed
// over FFI as Strong<T> (which is nullable).
// Note that T != ServoType, rather T is ArcInner<ServoType>
#define DECL_BORROWED_REF_TYPE_FOR(type_) typedef type_ const* type_##Borrowed;
#define DECL_NULLABLE_BORROWED_REF_TYPE_FOR(type_) typedef type_ const* type_##BorrowedOrNull;
#define DECL_BORROWED_MUT_REF_TYPE_FOR(type_) typedef type_* type_##BorrowedMut;
#define DECL_NULLABLE_BORROWED_MUT_REF_TYPE_FOR(type_) typedef type_* type_##BorrowedMutOrNull;
#define DECL_ARC_REF_TYPE_FOR(type_) \
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(type_) \
DECL_BORROWED_REF_TYPE_FOR(type_) \
struct MOZ_MUST_USE_TYPE type_##Strong \
{ \
type_* mPtr; \
already_AddRefed<type_> Consume(); \
};
#define DECL_OWNED_REF_TYPE_FOR(type_) \
typedef type_* type_##Owned; \
DECL_BORROWED_REF_TYPE_FOR(type_) \
DECL_BORROWED_MUT_REF_TYPE_FOR(type_)
#define DECL_NULLABLE_OWNED_REF_TYPE_FOR(type_) \
typedef type_* type_##OwnedOrNull; \
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(type_) \
DECL_NULLABLE_BORROWED_MUT_REF_TYPE_FOR(type_)
DECL_ARC_REF_TYPE_FOR(ServoComputedValues)
DECL_ARC_REF_TYPE_FOR(RawServoStyleSheet)
DECL_ARC_REF_TYPE_FOR(RawServoDeclarationBlock)
// This is a reference to a reference of RawServoDeclarationBlock, which
// corresponds to Option<&Arc<RawServoDeclarationBlock>> in Servo side.
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawServoDeclarationBlockStrong)
DECL_OWNED_REF_TYPE_FOR(RawServoStyleSet)
DECL_NULLABLE_OWNED_REF_TYPE_FOR(StyleChildrenIterator)
DECL_OWNED_REF_TYPE_FOR(StyleChildrenIterator)
// We don't use BorrowedMut because the nodes may alias
// Servo itself doesn't directly read or mutate these;
// it only asks Gecko to do so. In case we wish to in
// the future, we should ensure that things being mutated
// are protected from noalias violations by a cell type
DECL_BORROWED_REF_TYPE_FOR(RawGeckoNode)
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawGeckoNode)
DECL_BORROWED_REF_TYPE_FOR(RawGeckoElement)
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawGeckoElement)
DECL_BORROWED_REF_TYPE_FOR(RawGeckoDocument)
DECL_NULLABLE_BORROWED_REF_TYPE_FOR(RawGeckoDocument)
DECL_BORROWED_MUT_REF_TYPE_FOR(StyleChildrenIterator)
#undef DECL_ARC_REF_TYPE_FOR
#undef DECL_OWNED_REF_TYPE_FOR
#undef DECL_NULLABLE_OWNED_REF_TYPE_FOR
#undef DECL_BORROWED_REF_TYPE_FOR
#undef DECL_NULLABLE_BORROWED_REF_TYPE_FOR
#undef DECL_BORROWED_MUT_REF_TYPE_FOR
#undef DECL_NULLABLE_BORROWED_MUT_REF_TYPE_FOR
#define NS_DECL_THREADSAFE_FFI_REFCOUNTING(class_, name_) \
void Gecko_AddRef##name_##ArbitraryThread(class_* aPtr); \
@ -348,7 +258,6 @@ NS_DECL_THREADSAFE_FFI_REFCOUNTING(nsStyleQuoteValues, QuoteValues);
// Style-struct management.
#define STYLE_STRUCT(name, checkdata_cb) \
struct nsStyle##name; \
void Gecko_Construct_nsStyle##name(nsStyle##name* ptr); \
void Gecko_CopyConstruct_nsStyle##name(nsStyle##name* ptr, \
const nsStyle##name* other); \

View File

@ -9,8 +9,7 @@
#include "mozilla/EnumeratedArray.h"
#include "mozilla/EventStates.h"
#include "mozilla/RefPtr.h"
#include "mozilla/ServoBindingHelpers.h"
#include "mozilla/ServoBindingTypes.h"
#include "mozilla/ServoElementSnapshot.h"
#include "mozilla/StyleSheetInlines.h"
#include "mozilla/SheetType.h"

View File

@ -9,7 +9,7 @@
#include "mozilla/dom/SRIMetadata.h"
#include "mozilla/RefPtr.h"
#include "mozilla/ServoBindingHelpers.h"
#include "mozilla/ServoBindingTypes.h"
#include "mozilla/StyleSheet.h"
#include "mozilla/StyleSheetInfo.h"
#include "nsStringFwd.h"

View File

@ -6,7 +6,7 @@
#ifndef mozilla_StyleContextSource_h
#define mozilla_StyleContextSource_h
#include "mozilla/ServoBindingHelpers.h"
#include "mozilla/ServoBindingTypes.h"
#include "nsRuleNode.h"
namespace mozilla {

View File

@ -93,9 +93,9 @@ EXPORTS.mozilla += [
'LayerAnimationInfo.h',
'RuleNodeCacheConditions.h',
'RuleProcessorCache.h',
'ServoBindingHelpers.h',
'ServoBindingList.h',
'ServoBindings.h',
'ServoBindingTypes.h',
'ServoDeclarationBlock.h',
'ServoElementSnapshot.h',
'ServoStyleSet.h',

View File

@ -36,6 +36,10 @@
#include "nsLayoutUtils.h"
#include "nsCoord.h"
// Ensure the binding function declarations in nsStyleContext.h matches
// those in ServoBindings.h.
#include "mozilla/ServoBindings.h"
using namespace mozilla;
//----------------------------------------------------------------------

View File

@ -21,6 +21,15 @@ namespace mozilla {
enum class CSSPseudoElementType : uint8_t;
} // namespace mozilla
extern "C" {
#define STYLE_STRUCT(name_, checkdata_cb_) \
struct nsStyle##name_; \
const nsStyle##name_* Servo_GetStyle##name_( \
ServoComputedValuesBorrowedOrNull computed_values);
#include "nsStyleStructList.h"
#undef STYLE_STRUCT
}
/**
* An nsStyleContext represents the computed style data for an element.
* The computed style data are stored in a set of structs (see

View File

@ -52,11 +52,6 @@ class ImageTracker;
} // namespace dom
} // namespace mozilla
typedef nsINode RawGeckoNode;
typedef mozilla::dom::Element RawGeckoElement;
typedef nsIDocument RawGeckoDocument;
struct ServoNodeData;
// Includes nsStyleStructID.
#include "nsStyleStructFwd.h"

View File

@ -4740,10 +4740,10 @@ SVGTextFrame::AdjustChunksForLineBreaks()
nsBlockFrame* block = nsLayoutUtils::GetAsBlock(PrincipalChildList().FirstChild());
NS_ASSERTION(block, "expected block frame");
nsBlockFrame::LineIterator line = block->BeginLine();
nsBlockFrame::LineIterator line = block->LinesBegin();
CharIterator it(this, CharIterator::eOriginal);
while (!it.AtEnd() && line != block->EndLine()) {
while (!it.AtEnd() && line != block->LinesEnd()) {
if (it.TextFrame() == line->mFirstChild) {
mPositions[it.TextElementCharIndex()].mStartOfChunk = true;
line++;

View File

@ -122,7 +122,7 @@ skip-if = buildapp == 'b2g' || os == "linux" || appname == 'fennec' # Bug 108571
skip-if = buildapp == 'b2g' || appname == 'fennec'
[test_key_actions.py]
[test_mouse_action.py]
skip-if = buildapp == 'b2g' || (os == "win" && !debug && os_version == "6.1") || appname == 'fennec'# Bug 1273758
skip-if = appname == 'fennec'
[test_teardown_context_preserved.py]
skip-if = buildapp == 'b2g'
[test_file_upload.py]

View File

@ -1,7 +1,5 @@
[child-src-cross-origin-load.sub.html]
type: testharness
disabled:
if e10s: https://bugzilla.mozilla.org/show_bug.cgi?id=1209756
[Expecting logs: ["PASS IFrame #1 generated a load event.","PASS IFrame #2 generated a load event.","PASS IFrame #3 generated a load event."\]]
expected: FAIL

View File

@ -1,8 +1,7 @@
[utf-16be.html]
type: testharness
expected: TIMEOUT
disabled:
if os == "mac": https://bugzilla.mozilla.org/show_bug.cgi?id=1034063
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1034063
[hyperlink auditing <a ping>]
expected: TIMEOUT

View File

@ -1,7 +1,6 @@
[utf-16le.html]
type: testharness
disabled:
if os == "mac": https://bugzilla.mozilla.org/show_bug.cgi?id=1034063
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1034063
expected: TIMEOUT
[hyperlink auditing <a ping>]
expected: TIMEOUT

View File

@ -1,8 +1,7 @@
[utf-8.html]
type: testharness
expected: TIMEOUT
disabled:
if os == "mac": https://bugzilla.mozilla.org/show_bug.cgi?id=1034063
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1034063
[hyperlink auditing <a ping>]
expected: TIMEOUT

View File

@ -1,8 +1,7 @@
[windows-1251.html]
type: testharness
expected: TIMEOUT
disabled:
if os == "mac": https://bugzilla.mozilla.org/show_bug.cgi?id=1034063
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1034063
[getComputedStyle <body background>]
expected: FAIL

View File

@ -1,8 +1,7 @@
[windows-1252.html]
type: testharness
expected: TIMEOUT
disabled:
if os == "mac": https://bugzilla.mozilla.org/show_bug.cgi?id=1034063
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1034063
[hyperlink auditing <a ping>]
expected: TIMEOUT

View File

@ -518,8 +518,8 @@ public:
attr.config = config;
// Measure all processes/threads. The specified CPU doesn't matter.
mFd = perf_event_open(&attr, /* pid = */ -1, /* cpu = */ 0,
/* group_fd = */ -1, /* flags = */ 0);
mFd = perf_event_open(&attr, /* aPid = */ -1, /* aCpu = */ 0,
/* aGroupFd = */ -1, /* aFlags = */ 0);
if (mFd < 0) {
Abort("perf_event_open() failed\n"
"- Did you run as root (e.g. with |sudo|) or set\n"

View File

@ -803,6 +803,8 @@ NS_InitMinimalXPCOM()
AbstractThread::InitStatics();
SharedThreadPool::InitStatics();
mozilla::HangMonitor::Startup();
mozilla::BackgroundHangMonitor::Startup();
return NS_OK;
}