Merge m-c to f-t

This commit is contained in:
Phil Ringnalda 2014-02-15 18:36:10 -08:00
commit 147388c3e8
131 changed files with 779 additions and 380 deletions

View File

@ -9,7 +9,7 @@
#include "nsAccessibilityService.h"
#include "DocAccessible.h"
#include "nsINodeList.h"
#include "mozilla/dom/Element.h"
using namespace mozilla::a11y;
@ -39,9 +39,9 @@ struct WalkState
////////////////////////////////////////////////////////////////////////////////
TreeWalker::
TreeWalker(Accessible* aContext, nsIContent* aContent, bool aWalkCache) :
TreeWalker(Accessible* aContext, nsIContent* aContent, uint32_t aFlags) :
mDoc(aContext->Document()), mContext(aContext),
mWalkCache(aWalkCache), mState(nullptr)
mFlags(aFlags), mState(nullptr)
{
NS_ASSERTION(aContent, "No node for the accessible tree walker!");
@ -86,7 +86,8 @@ TreeWalker::NextChildInternal(bool aNoWalkUp)
mState->childIdx++;
bool isSubtreeHidden = false;
Accessible* accessible = mWalkCache ? mDoc->GetAccessible(childNode) :
Accessible* accessible = mFlags & eWalkCache ?
mDoc->GetAccessible(childNode) :
GetAccService()->GetOrCreateAccessible(childNode, mContext,
&isSubtreeHidden);
@ -95,9 +96,7 @@ TreeWalker::NextChildInternal(bool aNoWalkUp)
// Walk down into subtree to find accessibles.
if (!isSubtreeHidden) {
if (!PushState(childNode))
break;
PushState(childNode);
accessible = NextChildInternal(true);
if (accessible)
return accessible;
@ -105,9 +104,42 @@ TreeWalker::NextChildInternal(bool aNoWalkUp)
}
// No more children, get back to the parent.
nsIContent* anchorNode = mState->content;
PopState();
if (aNoWalkUp)
return nullptr;
return aNoWalkUp ? nullptr : NextChildInternal(false);
if (mState)
return NextChildInternal(false);
// If we traversed the whole subtree of the anchor node. Move to next node
// relative anchor node within the context subtree if possible.
if (mFlags != eWalkContextTree)
return nullptr;
while (anchorNode != mContext->GetNode()) {
nsINode* parentNode = anchorNode->GetFlattenedTreeParent();
if (!parentNode || !parentNode->IsElement())
return nullptr;
PushState(parentNode->AsElement());
mState->childList = mState->content->GetChildren(mChildFilter);
length = 0;
if (mState->childList)
mState->childList->GetLength(&length);
while (mState->childIdx < length) {
nsIContent* childNode = mState->childList->Item(mState->childIdx);
mState->childIdx++;
if (childNode == anchorNode)
return NextChildInternal(false);
}
PopState();
anchorNode = parentNode->AsElement();
}
return nullptr;
}
void
@ -118,15 +150,10 @@ TreeWalker::PopState()
mState = prevToLastState;
}
bool
void
TreeWalker::PushState(nsIContent* aContent)
{
WalkState* nextToLastState = new WalkState(aContent);
if (!nextToLastState)
return false;
nextToLastState->prevState = mState;
mState = nextToLastState;
return true;
}

View File

@ -6,6 +6,7 @@
#ifndef mozilla_a11y_TreeWalker_h_
#define mozilla_a11y_TreeWalker_h_
#include "mozilla/Attributes.h"
#include <stdint.h>
class nsIContent;
@ -21,11 +22,26 @@ struct WalkState;
/**
* This class is used to walk the DOM tree to create accessible tree.
*/
class TreeWalker
class TreeWalker MOZ_FINAL
{
public:
TreeWalker(Accessible* aContext, nsIContent* aNode, bool aWalkCache = false);
virtual ~TreeWalker();
enum {
// used to walk the existing tree of the given node
eWalkCache = 1,
// used to walk the context tree starting from given node
eWalkContextTree = 2 | eWalkCache
};
/**
* Constructor
*
* @param aContext [in] container accessible for the given node, used to
* define accessible context
* @param aNode [in] the node the search will be prepared relative to
* @param aFlags [in] flags (see enum above)
*/
TreeWalker(Accessible* aContext, nsIContent* aNode, uint32_t aFlags = 0);
~TreeWalker();
/**
* Return the next child accessible.
@ -59,7 +75,7 @@ private:
* @note State stack is used to navigate up/down the DOM subtree during
* accessible children search.
*/
bool PushState(nsIContent *aNode);
void PushState(nsIContent* aNode);
/**
* Pop state from stack.
@ -69,7 +85,7 @@ private:
DocAccessible* mDoc;
Accessible* mContext;
int32_t mChildFilter;
bool mWalkCache;
uint32_t mFlags;
WalkState* mState;
};

View File

@ -3060,40 +3060,6 @@ Accessible::GetSiblingAtOffset(int32_t aOffset, nsresult* aError) const
return child;
}
Accessible*
Accessible::GetFirstAvailableAccessible(nsINode *aStartNode) const
{
Accessible* accessible = mDoc->GetAccessible(aStartNode);
if (accessible)
return accessible;
nsCOMPtr<nsIDocument> doc = aStartNode->OwnerDoc();
nsCOMPtr<nsINode> currentNode = aStartNode;
ErrorResult rv;
nsRefPtr<dom::TreeWalker> walker =
doc->CreateTreeWalker(*GetNode(),
nsIDOMNodeFilter::SHOW_ELEMENT | nsIDOMNodeFilter::SHOW_TEXT,
nullptr, rv);
NS_ENSURE_TRUE(walker, nullptr);
walker->SetCurrentNode(*currentNode, rv);
if (rv.Failed())
return nullptr;
while (true) {
currentNode = walker->NextNode(rv);
if (!currentNode || rv.Failed())
return nullptr;
Accessible* accessible = mDoc->GetAccessible(currentNode);
if (accessible)
return accessible;
}
return nullptr;
}
double
Accessible::AttrNumericValue(nsIAtom* aAttr) const
{

View File

@ -888,16 +888,6 @@ protected:
// helper method to verify frames
static nsresult GetFullKeyName(const nsAString& aModifierName, const nsAString& aKeyName, nsAString& aStringOut);
/**
* Return an accessible for the given DOM node, or if that node isn't
* accessible, return the accessible for the next DOM node which has one
* (based on forward depth first search).
*
* @param aStartNode [in] the DOM node to start from
* @return the resulting accessible
*/
Accessible* GetFirstAvailableAccessible(nsINode* aStartNode) const;
//////////////////////////////////////////////////////////////////////////////
// Action helpers

View File

@ -1783,7 +1783,7 @@ DocAccessible::UpdateTree(Accessible* aContainer, nsIContent* aChildNode,
updateFlags |= UpdateTreeInternal(child, aIsInsert, reorderEvent);
} else {
if (aIsInsert) {
TreeWalker walker(aContainer, aChildNode, true);
TreeWalker walker(aContainer, aChildNode, TreeWalker::eWalkCache);
while ((child = walker.NextChild()))
updateFlags |= UpdateTreeInternal(child, aIsInsert, reorderEvent);

View File

@ -302,7 +302,16 @@ HyperTextAccessible::DOMPointToOffset(nsINode* aNode, int32_t aNodeOffset,
// This <br> is the hacky "bogus node" used when there is no text in a control
return 0;
}
descendant = GetFirstAvailableAccessible(findNode);
descendant = mDoc->GetAccessible(findNode);
if (!descendant && findNode->IsContent()) {
Accessible* container = mDoc->GetContainerAccessible(findNode);
if (container) {
TreeWalker walker(container, findNode->AsContent(),
TreeWalker::eWalkContextTree);
descendant = walker.NextChild();
}
}
}
return TransformOffset(descendant, offset, aIsEndOffset);

View File

@ -58,7 +58,7 @@
testTextAtOffset(0, BOUNDARY_LINE_START, "line ", 0, 5,
"hypertext3", kOk, kOk, kOk);
// XXX: see bug 638684.
// XXX: see bug 634202.
testTextAtOffset(0, BOUNDARY_LINE_START, "line ", 0, 5,
"hypertext4", kTodo, kOk, kTodo);

View File

@ -109,6 +109,44 @@
}
}
function changeDOMSelection(aID, aNodeID1, aNodeOffset1,
aNodeID2, aNodeOffset2,
aStartOffset, aEndOffset)
{
this.hyperText = getAccessible(aID, [ nsIAccessibleText ]);
this.eventSeq = [
new invokerChecker(EVENT_TEXT_SELECTION_CHANGED, aID)
];
this.invoke = function changeDOMSelection_invoke()
{
var sel = window.getSelection();
var range = document.createRange();
range.setStart(getNode(aNodeID1), aNodeOffset1);
range.setEnd(getNode(aNodeID2), aNodeOffset2);
sel.addRange(range);
}
this.finalCheck = function changeDOMSelection_finalCheck()
{
is(this.hyperText.selectionCount, 1,
"setSelectionBounds: Wrong selection count for " + aID);
var startOffset = {}, endOffset = {};
this.hyperText.getSelectionBounds(0, startOffset, endOffset);
is(startOffset.value, aStartOffset,
"setSelectionBounds: Wrong start offset for " + aID);
is(endOffset.value, aEndOffset,
"setSelectionBounds: Wrong end offset for " + aID);
}
this.getID = function changeDOMSelection_getID()
{
return "DOM selection change for " + aID;
}
}
function onfocusEventSeq(aID)
{
var caretMovedChecker =
@ -141,6 +179,7 @@
gQueue.push(new synthFocus("textarea", onfocusEventSeq("textarea")));
gQueue.push(new changeSelection("textarea", 1, 3));
gQueue.push(new changeDOMSelection("c1", "c1_span1", 0, "c1_span2", 0, 2, 2));
gQueue.invoke(); // Will call SimpleTest.finish();
}
@ -169,6 +208,7 @@
<p id="paragraph">hello</p>
<input id="textbox" value="hello"/>
<textarea id="textarea">hello</textarea>
<div id="c1">hi<span id="c1_span1"></span><span id="c1_span2"></span>hi</div>
</body>
</html>

View File

@ -12,7 +12,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="f75b9dac351c0676f0fc696fa36330933985ed36"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="33fe27aa3c60ccf312f35da0edc1b1918780379f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>

View File

@ -11,7 +11,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="f75b9dac351c0676f0fc696fa36330933985ed36"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="33fe27aa3c60ccf312f35da0edc1b1918780379f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="3d5c964015967ca8c86abe6dbbebee3cb82b1609"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a314508e397c8f1814228d36259ea8708034444e"/>
@ -94,7 +94,7 @@
<project name="platform/external/webrtc" path="external/webrtc" revision="1a1433203ddf6395516e065ada1dcdfc8bd5c654"/>
<project name="platform/external/yaffs2" path="external/yaffs2" revision="d94a17182a88c2c2d865f50b728de8561d251efa"/>
<project name="platform/external/zlib" path="external/zlib" revision="06608b270da9ec8a3e618f201d7356aad83f9ffe"/>
<project name="platform_frameworks_av" path="frameworks/av" remote="b2g" revision="7c4fbe57bd8d2581ca729f044b5b8324710d5fe8"/>
<project name="platform_frameworks_av" path="frameworks/av" remote="b2g" revision="0d93be33c0ee226c7bf7be0d7d591981c57fa96f"/>
<project name="platform/frameworks/base" path="frameworks/base" revision="8fafbc6692a52d1f1417693f24f6349b4de5afbd"/>
<project name="platform/frameworks/native" path="frameworks/native" revision="c135c11c422c1570fdae2e19336f06f39e723c5a"/>
<project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="bc06a1779be6919a581a938e1c3118b3a4ab4c18"/>

View File

@ -12,7 +12,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="f75b9dac351c0676f0fc696fa36330933985ed36"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="33fe27aa3c60ccf312f35da0edc1b1918780379f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>

View File

@ -1,4 +1,4 @@
{
"revision": "f17cd16252b9d28b973c7b223064455c401e5ab3",
"revision": "43e4148c36fb28bdf56dc364330a01a87d253715",
"repo_path": "/integration/gaia-central"
}

View File

@ -11,7 +11,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="f75b9dac351c0676f0fc696fa36330933985ed36"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="33fe27aa3c60ccf312f35da0edc1b1918780379f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -10,7 +10,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="f75b9dac351c0676f0fc696fa36330933985ed36"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="33fe27aa3c60ccf312f35da0edc1b1918780379f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -12,7 +12,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="f75b9dac351c0676f0fc696fa36330933985ed36"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="33fe27aa3c60ccf312f35da0edc1b1918780379f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -11,7 +11,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="f75b9dac351c0676f0fc696fa36330933985ed36"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="33fe27aa3c60ccf312f35da0edc1b1918780379f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -11,7 +11,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="f75b9dac351c0676f0fc696fa36330933985ed36"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="33fe27aa3c60ccf312f35da0edc1b1918780379f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="3d5c964015967ca8c86abe6dbbebee3cb82b1609"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a314508e397c8f1814228d36259ea8708034444e"/>
@ -94,7 +94,7 @@
<project name="platform/external/webrtc" path="external/webrtc" revision="1a1433203ddf6395516e065ada1dcdfc8bd5c654"/>
<project name="platform/external/yaffs2" path="external/yaffs2" revision="d94a17182a88c2c2d865f50b728de8561d251efa"/>
<project name="platform/external/zlib" path="external/zlib" revision="06608b270da9ec8a3e618f201d7356aad83f9ffe"/>
<project name="platform_frameworks_av" path="frameworks/av" remote="b2g" revision="7c4fbe57bd8d2581ca729f044b5b8324710d5fe8"/>
<project name="platform_frameworks_av" path="frameworks/av" remote="b2g" revision="0d93be33c0ee226c7bf7be0d7d591981c57fa96f"/>
<project name="platform/frameworks/base" path="frameworks/base" revision="8fafbc6692a52d1f1417693f24f6349b4de5afbd"/>
<project name="platform/frameworks/native" path="frameworks/native" revision="c135c11c422c1570fdae2e19336f06f39e723c5a"/>
<project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="bc06a1779be6919a581a938e1c3118b3a4ab4c18"/>

View File

@ -11,7 +11,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="f75b9dac351c0676f0fc696fa36330933985ed36"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="33fe27aa3c60ccf312f35da0edc1b1918780379f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -10,6 +10,3 @@ ifdef MOZ_NATIVE_HUNSPELL
CXXFLAGS += $(MOZ_HUNSPELL_CFLAGS)
endif
LOCAL_INCLUDES += \
-I$(topsrcdir)/editor/libeditor/base \
$(NULL)

View File

@ -33,3 +33,7 @@ LOCAL_INCLUDES += [
'/extensions/spellcheck/src',
]
LOCAL_INCLUDES += [
'/editor/libeditor/base',
]

View File

@ -24,6 +24,8 @@ using ::testing::_;
using ::testing::NiceMock;
using ::testing::AtLeast;
using ::testing::AtMost;
using ::testing::MockFunction;
using ::testing::InSequence;
class Task;
@ -146,7 +148,7 @@ FrameMetrics TestFrameMetrics() {
* consumed them and triggered scrolling behavior.
*/
static
void ApzcPan(AsyncPanZoomController* apzc, TestAPZCTreeManager* aTreeManager, int& aTime, int aTouchStartY, int aTouchEndY, bool expectIgnoredPan = false) {
void ApzcPan(AsyncPanZoomController* apzc, TestAPZCTreeManager* aTreeManager, int& aTime, int aTouchStartY, int aTouchEndY, bool expectIgnoredPan = false, bool hasTouchListeners = false) {
const int TIME_BETWEEN_TOUCH_EVENT = 100;
const int OVERCOME_TOUCH_TOLERANCE = 100;
@ -158,12 +160,22 @@ void ApzcPan(AsyncPanZoomController* apzc, TestAPZCTreeManager* aTreeManager, in
// for panning to work correctly.
aTreeManager->BuildOverscrollHandoffChain(apzc);
nsEventStatus touchStartStatus;
if (hasTouchListeners) {
// APZC shouldn't consume the start event now, instead queueing it up
// waiting for content's response.
touchStartStatus = nsEventStatus_eIgnore;
} else {
// APZC should go into the touching state and therefore consume the event.
touchStartStatus = nsEventStatus_eConsumeNoDefault;
}
mti = MultiTouchInput(MultiTouchInput::MULTITOUCH_START, aTime, 0);
aTime += TIME_BETWEEN_TOUCH_EVENT;
// Make sure the move is large enough to not be handled as a tap
mti.mTouches.AppendElement(SingleTouchData(0, ScreenIntPoint(10, aTouchStartY+OVERCOME_TOUCH_TOLERANCE), ScreenSize(0, 0), 0, 0));
status = apzc->HandleInputEvent(mti);
EXPECT_EQ(status, nsEventStatus_eConsumeNoDefault);
status = apzc->ReceiveInputEvent(mti);
EXPECT_EQ(status, touchStartStatus);
// APZC should be in TOUCHING state
nsEventStatus touchMoveStatus;
@ -179,19 +191,19 @@ void ApzcPan(AsyncPanZoomController* apzc, TestAPZCTreeManager* aTreeManager, in
mti = MultiTouchInput(MultiTouchInput::MULTITOUCH_MOVE, aTime, 0);
aTime += TIME_BETWEEN_TOUCH_EVENT;
mti.mTouches.AppendElement(SingleTouchData(0, ScreenIntPoint(10, aTouchStartY), ScreenSize(0, 0), 0, 0));
status = apzc->HandleInputEvent(mti);
status = apzc->ReceiveInputEvent(mti);
EXPECT_EQ(status, touchMoveStatus);
mti = MultiTouchInput(MultiTouchInput::MULTITOUCH_MOVE, aTime, 0);
aTime += TIME_BETWEEN_TOUCH_EVENT;
mti.mTouches.AppendElement(SingleTouchData(0, ScreenIntPoint(10, aTouchEndY), ScreenSize(0, 0), 0, 0));
status = apzc->HandleInputEvent(mti);
status = apzc->ReceiveInputEvent(mti);
EXPECT_EQ(status, touchMoveStatus);
mti = MultiTouchInput(MultiTouchInput::MULTITOUCH_END, aTime, 0);
aTime += TIME_BETWEEN_TOUCH_EVENT;
mti.mTouches.AppendElement(SingleTouchData(0, ScreenIntPoint(10, aTouchEndY), ScreenSize(0, 0), 0, 0));
status = apzc->HandleInputEvent(mti);
status = apzc->ReceiveInputEvent(mti);
}
static
@ -558,6 +570,44 @@ TEST(AsyncPanZoomController, PanWithTouchActionPanY) {
DoPanTest(true, true, mozilla::layers::AllowedTouchBehavior::VERTICAL_PAN);
}
TEST(AsyncPanZoomController, PanWithPreventDefault) {
TimeStamp testStartTime = TimeStamp::Now();
AsyncPanZoomController::SetFrameTime(testStartTime);
nsRefPtr<MockContentController> mcc = new NiceMock<MockContentController>();
nsRefPtr<TestAPZCTreeManager> tm = new TestAPZCTreeManager();
nsRefPtr<TestAsyncPanZoomController> apzc = new TestAsyncPanZoomController(0, mcc, tm);
FrameMetrics frameMetrics(TestFrameMetrics());
frameMetrics.mMayHaveTouchListeners = true;
apzc->SetFrameMetrics(frameMetrics);
apzc->NotifyLayersUpdated(frameMetrics, true);
int time = 0;
int touchStart = 50;
int touchEnd = 10;
ScreenPoint pointOut;
ViewTransform viewTransformOut;
// Pan down
nsTArray<uint32_t> values;
values.AppendElement(mozilla::layers::AllowedTouchBehavior::VERTICAL_PAN);
apzc->SetTouchActionEnabled(true);
apzc->SetAllowedTouchBehavior(values);
ApzcPan(apzc, tm, time, touchStart, touchEnd, true, true);
// Send the signal that content has handled and preventDefaulted the touch
// events. This flushes the event queue.
apzc->ContentReceivedTouch(true);
apzc->SampleContentTransformForFrame(testStartTime, &viewTransformOut, pointOut);
EXPECT_EQ(pointOut, ScreenPoint());
EXPECT_EQ(viewTransformOut, ViewTransform());
apzc->Destroy();
}
TEST(AsyncPanZoomController, Fling) {
TimeStamp testStartTime = TimeStamp::Now();
AsyncPanZoomController::SetFrameTime(testStartTime);
@ -678,23 +728,113 @@ TEST(AsyncPanZoomController, LongPress) {
nsEventStatus status = ApzcDown(apzc, 10, 10, time);
EXPECT_EQ(nsEventStatus_eConsumeNoDefault, status);
MockFunction<void(std::string checkPointName)> check;
{
InSequence s;
EXPECT_CALL(check, Call("preHandleLongTap"));
EXPECT_CALL(*mcc, HandleLongTap(CSSIntPoint(10, 10), 0, apzc->GetGuid())).Times(1);
EXPECT_CALL(check, Call("postHandleLongTap"));
EXPECT_CALL(check, Call("preHandleLongTapUp"));
EXPECT_CALL(*mcc, HandleLongTapUp(CSSIntPoint(10, 10), 0, apzc->GetGuid())).Times(1);
EXPECT_CALL(check, Call("postHandleLongTapUp"));
}
mcc->CheckHasDelayedTask();
EXPECT_CALL(*mcc, HandleLongTap(CSSIntPoint(10, 10), 0, apzc->GetGuid())).Times(1);
// Manually invoke the longpress while the touch is currently down.
check.Call("preHandleLongTap");
mcc->RunDelayedTask();
check.Call("postHandleLongTap");
time += 1000;
status = ApzcUp(apzc, 10, 10, time);
EXPECT_EQ(nsEventStatus_eIgnore, status);
EXPECT_CALL(*mcc, HandleLongTapUp(CSSIntPoint(10, 10), 0, apzc->GetGuid())).Times(1);
// To get a LongTapUp event, we must kick APZC to flush its event queue. This
// would normally happen if we had a (Tab|RenderFrame)(Parent|Child)
// mechanism.
check.Call("preHandleLongTapUp");
apzc->ContentReceivedTouch(false);
check.Call("postHandleLongTapUp");
apzc->Destroy();
}
TEST(AsyncPanZoomController, LongPressPreventDefault) {
// We have to initialize both an integer time and TimeStamp time because
// TimeStamp doesn't have any ToXXX() functions for converting back to
// primitives.
TimeStamp testStartTime = TimeStamp::Now();
int time = 0;
AsyncPanZoomController::SetFrameTime(testStartTime);
nsRefPtr<MockContentControllerDelayed> mcc = new MockContentControllerDelayed();
nsRefPtr<TestAPZCTreeManager> tm = new TestAPZCTreeManager();
nsRefPtr<TestAsyncPanZoomController> apzc = new TestAsyncPanZoomController(
0, mcc, tm, AsyncPanZoomController::USE_GESTURE_DETECTOR);
apzc->SetFrameMetrics(TestFrameMetrics());
apzc->NotifyLayersUpdated(TestFrameMetrics(), true);
apzc->UpdateZoomConstraints(ZoomConstraints(false, CSSToScreenScale(1.0), CSSToScreenScale(1.0)));
EXPECT_CALL(*mcc, SendAsyncScrollDOMEvent(_,_,_)).Times(0);
EXPECT_CALL(*mcc, RequestContentRepaint(_)).Times(0);
int touchX = 10,
touchStartY = 10,
touchEndY = 50;
nsEventStatus status = ApzcDown(apzc, touchX, touchStartY, time);
EXPECT_EQ(nsEventStatus_eConsumeNoDefault, status);
MockFunction<void(std::string checkPointName)> check;
{
InSequence s;
EXPECT_CALL(check, Call("preHandleLongTap"));
EXPECT_CALL(*mcc, HandleLongTap(CSSIntPoint(touchX, touchStartY), 0, apzc->GetGuid())).Times(1);
EXPECT_CALL(check, Call("postHandleLongTap"));
}
mcc->CheckHasDelayedTask();
// Manually invoke the longpress while the touch is currently down.
check.Call("preHandleLongTap");
mcc->RunDelayedTask();
check.Call("postHandleLongTap");
// Clear the waiting-for-content timeout task, then send the signal that
// content has handled this long tap. This takes the place of the
// "contextmenu" event.
mcc->ClearDelayedTask();
apzc->ContentReceivedTouch(true);
time += 1000;
MultiTouchInput mti = MultiTouchInput(MultiTouchInput::MULTITOUCH_MOVE, time, 0);
mti.mTouches.AppendElement(SingleTouchData(0, ScreenIntPoint(touchX, touchEndY), ScreenSize(0, 0), 0, 0));
status = apzc->ReceiveInputEvent(mti);
EXPECT_EQ(status, nsEventStatus_eIgnore);
status = ApzcUp(apzc, touchX, touchEndY, time);
EXPECT_EQ(nsEventStatus_eIgnore, status);
// Flush the event queue. Once the "contextmenu" event is handled, any touch
// events that come from the same series of start->n*move->end events should
// be discarded, even if only the "contextmenu" event is preventDefaulted.
apzc->ContentReceivedTouch(false);
ScreenPoint pointOut;
ViewTransform viewTransformOut;
apzc->SampleContentTransformForFrame(testStartTime, &viewTransformOut, pointOut);
EXPECT_EQ(pointOut, ScreenPoint());
EXPECT_EQ(viewTransformOut, ViewTransform());
apzc->Destroy();
}

View File

@ -4,9 +4,6 @@
NSDISTMODE = copy
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
LIBS = \
$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
$(LIBXUL_LIBS) \

View File

@ -11,3 +11,8 @@ SOURCES += [
]
include('/ipc/chromium/chromium-config.mozbuild')
LOCAL_INCLUDES += [
'/toolkit/xre',
'/xpcom/base',
]

View File

@ -1,11 +0,0 @@
# 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/.
# For xpcshell error messages and nsDependentJSString
LOCAL_INCLUDES += \
-I$(topsrcdir)/js/xpconnect/src \
-I$(topsrcdir)/dom/base \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -30,3 +30,10 @@ FAIL_ON_WARNINGS = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
# For xpcshell error messages and nsDependentJSString
LOCAL_INCLUDES += [
'/dom/base',
'/js/xpconnect/src',
]

View File

@ -311,7 +311,10 @@ GCParameter(JSContext *cx, unsigned argc, Value *vp)
}
uint32_t value;
if (!ToUint32(cx, args[1], &value)) {
if (!ToUint32(cx, args[1], &value))
return false;
if (!value) {
JS_ReportError(cx, "the second argument must be convertable to uint32_t "
"with non-zero value");
return false;

View File

@ -2415,6 +2415,12 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
frameItems);
newFrame = frameItems.FirstChild();
NS_ASSERTION(frameItems.OnlyChild(), "multiple root element frames");
} else if (display->mDisplay == NS_STYLE_DISPLAY_FLEX) {
contentFrame = NS_NewFlexContainerFrame(mPresShell, styleContext);
InitAndRestoreFrame(state, aDocElement, mDocElementContainingBlock,
contentFrame);
newFrame = contentFrame;
processChildren = true;
} else if (display->mDisplay == NS_STYLE_DISPLAY_TABLE) {
// We're going to call the right function ourselves, so no need to give a
// function to this FrameConstructionData.
@ -2438,6 +2444,8 @@ nsCSSFrameConstructor::ConstructDocElementFrame(Element* aDocEle
newFrame = frameItems.FirstChild();
NS_ASSERTION(frameItems.OnlyChild(), "multiple root element frames");
} else {
MOZ_ASSERT(display->mDisplay == NS_STYLE_DISPLAY_BLOCK,
"Unhandled display type for root element");
contentFrame = NS_NewBlockFormattingContext(mPresShell, styleContext);
nsFrameItems frameItems;
// Use a null PendingBinding, since our binding is not in fact pending.

View File

@ -0,0 +1,10 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<svg xmlns="http://www.w3.org/2000/svg"
width="100%" height="100%">
<rect width="100%" height="100%" fill="lime"/>
</svg>

After

Width:  |  Height:  |  Size: 249 B

View File

@ -0,0 +1,15 @@
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<svg xmlns="http://www.w3.org/2000/svg"
style="display:flex"
width="100%" height="100%">
<title>Test that we ignore "display:flex" on a root SVG node</title>
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=969460 -->
<rect width="100%" height="100%" fill="lime"/>
</svg>

After

Width:  |  Height:  |  Size: 416 B

View File

@ -133,6 +133,9 @@ fails == flexbox-inlinecontent-horiz-1b.xhtml flexbox-inlinecontent-horiz-1-ref.
# Tests for flexbox in an iframe that gets resized.
skip-if(B2G) == flexbox-resizeviewport-1.xhtml flexbox-resizeviewport-1-ref.xhtml
# Tests for flexbox styling on things that don't support it
== flexbox-styling-on-svg-1.svg flexbox-styling-on-svg-1-ref.svg
# Tests with widgets as flex items
fuzzy-if(gtk2Widget,1,66) == flexbox-widget-flex-items-1.html flexbox-widget-flex-items-1-ref.html
fuzzy-if(gtk2Widget,1,74) == flexbox-widget-flex-items-2.html flexbox-widget-flex-items-2-ref.html

View File

@ -1,6 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg">
<style type="text/css">
path { fill: none; stroke: blue; stroke-width: 1px; }
path { fill: none; stroke: blue; stroke-width: 1px;
shape-rendering: crispEdges; }
</style>
<path d="M10,10

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -8,7 +8,8 @@
<title>Test animation of the 'd' attribute on the 'path' element</title>
<script xlink:href="smil-util.js" type="text/javascript"/>
<style type="text/css">
path { fill: none; stroke: blue; stroke-width: 1px; }
path { fill: none; stroke: blue; stroke-width: 1px;
shape-rendering: crispEdges; }
</style>

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -127,7 +127,7 @@ skip-if(B2G) == anim-polygon-points-01.svg anim-polygon-points-01-ref.svg
== anim-polyline-points-01.svg anim-polyline-points-01-ref.svg
# animate path data:
skip-if(B2G) fuzzy-if(/^Windows\x20NT\x205\.1/.test(http.oscpu),2,1) fuzzy-if(cocoaWidget&&layersGPUAccelerated,1,13) == anim-path-d-01.svg anim-path-d-01-ref.svg # Bug 726400 # bug 773482
== anim-path-d-01.svg anim-path-d-01-ref.svg
# animate some enumeration attributes:
skip-if(B2G) == anim-feComposite-operator-01.svg lime.svg

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html style="display: flex; justify-content: center">
<head>
<title>CSS Reftest Reference</title>
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
<style>
div {
display: flex;
justify-content: center;
}
</style>
</head>
<body>
<div>centered</div>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!-- This testcase checks that we correctly handle 'display:flex' property on
the root <html> element, with the <body> as the sole flex item. -->
<html style="display: flex; justify-content: center">
<head>
<title>CSS Test: Testing 'display:flex' on root node</title>
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
<link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-containers">
<link rel="match" href="flexbox-root-node-1-ref.html">
<style>
html {
display: flex;
justify-content: center;
}
</style>
</head>
<body>
centered
</body>
</html>

View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!-- This testcase checks that we correctly handle 'display:flex' property on
the root <html> element, with no explicit <body>. -->
<html style="display: flex; justify-content: center">
<head>
<title>CSS Test: Testing 'display:flex' on root node</title>
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
<link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-containers">
<link rel="match" href="flexbox-root-node-1-ref.html">
<style>
html {
display: flex;
justify-content: center;
}
</style>
</head>
centered
</html>

View File

@ -140,6 +140,10 @@ fuzzy-if(Android,158,32) == flexbox-align-self-vert-rtl-1.xhtml flexbox-align-s
== flexbox-paint-ordering-1.xhtml flexbox-paint-ordering-1-ref.xhtml
== flexbox-paint-ordering-2.xhtml flexbox-paint-ordering-2-ref.xhtml
# Tests for "display:flex" on root node
== flexbox-root-node-1a.html flexbox-root-node-1-ref.html
== flexbox-root-node-1b.html flexbox-root-node-1-ref.html
# Tests for sizing of flex containers, e.g. under min/max size constraints
== flexbox-sizing-horiz-1.xhtml flexbox-sizing-horiz-1-ref.xhtml
== flexbox-sizing-horiz-2.xhtml flexbox-sizing-horiz-2-ref.xhtml

View File

@ -1261,7 +1261,8 @@ nsCSSValue::AppendToString(nsCSSProperty aProperty, nsAString& aResult,
} else if (eCSSUnit_TokenStream == unit) {
nsCSSProperty shorthand = mValue.mTokenStream->mShorthandPropertyID;
if (shorthand == eCSSProperty_UNKNOWN ||
nsCSSProps::PropHasFlags(shorthand, CSS_PROPERTY_IS_ALIAS)) {
nsCSSProps::PropHasFlags(shorthand, CSS_PROPERTY_IS_ALIAS) ||
aProperty == eCSSProperty__x_system_font) {
// We treat serialization of aliases like '-moz-transform' as a special
// case, since it really wants to be serialized as if it were a longhand
// even though it is implemented as a shorthand.

View File

@ -127,17 +127,29 @@ nsRuleNode::ChildrenHashOps = {
// - if the display value (argument) is not a block-type
// then we set it to a valid block display value
// - For enforcing the floated/positioned element CSS2 rules
// - We allow the behavior of "list-item" to be customized.
// CSS21 says that position/float do not convert 'list-item' to 'block',
// but it explicitly does not define whether 'list-item' should be
// converted to block *on the root node*. To allow for flexibility
// (so that we don't have to support a list-item root node), this method
// lets the caller pick either behavior, using the 'aConvertListItem' arg.
// Reference: http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo
/* static */
void
nsRuleNode::EnsureBlockDisplay(uint8_t& display)
nsRuleNode::EnsureBlockDisplay(uint8_t& display,
bool aConvertListItem /* = false */)
{
// see if the display value is already a block
switch (display) {
case NS_STYLE_DISPLAY_LIST_ITEM :
if (aConvertListItem) {
display = NS_STYLE_DISPLAY_BLOCK;
break;
} // else, fall through to share the 'break' for non-changing display vals
case NS_STYLE_DISPLAY_NONE :
// never change display:none *ever*
case NS_STYLE_DISPLAY_TABLE :
case NS_STYLE_DISPLAY_BLOCK :
case NS_STYLE_DISPLAY_LIST_ITEM :
case NS_STYLE_DISPLAY_FLEX :
// do not muck with these at all - already blocks
// This is equivalent to nsStyleDisplay::IsBlockOutside. (XXX Maybe we

View File

@ -664,7 +664,9 @@ private:
public:
static nsRuleNode* CreateRootNode(nsPresContext* aPresContext);
static void EnsureBlockDisplay(uint8_t& display);
static void EnsureBlockDisplay(uint8_t& display,
bool aConvertListItem = false);
// Transition never returns null; on out of memory it'll just return |this|.
nsRuleNode* Transition(nsIStyleRule* aRule, uint8_t aLevel,

View File

@ -338,22 +338,19 @@ nsStyleContext::ApplyStyleFixups(bool aSkipFlexItemStyleFixup)
// here if needed, by changing the style data, so that other code
// doesn't get confused by looking at the style data.
if (!mParent) {
if (disp->mDisplay != NS_STYLE_DISPLAY_NONE &&
disp->mDisplay != NS_STYLE_DISPLAY_BLOCK &&
disp->mDisplay != NS_STYLE_DISPLAY_TABLE) {
nsStyleDisplay *mutable_display = static_cast<nsStyleDisplay*>
(GetUniqueStyleData(eStyleStruct_Display));
uint8_t displayVal = disp->mDisplay;
nsRuleNode::EnsureBlockDisplay(displayVal, true);
if (displayVal != disp->mDisplay) {
nsStyleDisplay *mutable_display =
static_cast<nsStyleDisplay*>(GetUniqueStyleData(eStyleStruct_Display));
// If we're in this code, then mOriginalDisplay doesn't matter
// for purposes of the cascade (because this nsStyleDisplay
// isn't living in the ruletree anyway), and for determining
// hypothetical boxes it's better to have mOriginalDisplay
// matching mDisplay here.
if (mutable_display->mDisplay == NS_STYLE_DISPLAY_INLINE_TABLE)
mutable_display->mOriginalDisplay = mutable_display->mDisplay =
NS_STYLE_DISPLAY_TABLE;
else
mutable_display->mOriginalDisplay = mutable_display->mDisplay =
NS_STYLE_DISPLAY_BLOCK;
mutable_display->mOriginalDisplay = mutable_display->mDisplay =
displayVal;
}
}

View File

@ -161,6 +161,7 @@ support-files = file_position_sticky.html
[test_redundant_font_download.html]
support-files = redundant_font_download.sjs
[test_rem_unit.html]
[test_root_node_display.html]
[test_rule_insertion.html]
[test_rule_serialization.html]
[test_rules_out_of_sheets.html]

View File

@ -0,0 +1,62 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=969460
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 969460</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="property_database.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=969460">Mozilla Bug 969460</a>
<p id="display"></p>
<div id="content" style="display: none">
<div id="float" style="float: left"></div>
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 969460: Test that "display" on the root node is computed
using the same conversion that we use for display on floated elements **/
function test_display_value(val)
{
var floatElem = document.getElementById("float");
floatElem.style.display = val;
var floatConversion = window.getComputedStyle(floatElem, null).display;
floatElem.style.display = "";
var rootNode = document.documentElement;
rootNode.style.display = val;
rootNode.offsetHeight; // (Flush layout, to be sure layout can handle 'val')
var rootConversion = window.getComputedStyle(rootNode, null).display;
rootNode.style.display = "";
// Special case: "display:list-item" does not get modified by 'float',
// but the spec allows us to convert it to 'block' on the root node
// (and we do convert it, so that we don't have to support documents whose
// root node is a list-item).
if (val == "list-item") {
is(floatConversion, val, "'float' shouldn't affect 'display:list-item'");
is(rootConversion, "block",
"We traditionally convert 'display:list-item' on the root node to " +
"'display:block' (though if that changes, it's not technically a bug, " +
"as long as we support it properly).");
} else {
is(rootConversion, floatConversion,
"root node should make 'display:" + val + "' compute to the same " +
"value that it computes to on a floated element");
}
}
var displayInfo = gCSSProperties["display"];
displayInfo.initial_values.forEach(test_display_value);
displayInfo.other_values.forEach(test_display_value);
</script>
</pre>
</body>
</html>

View File

@ -17,32 +17,6 @@ ifdef MOZ_SCTP
LIBS += $(DEPTH)/netwerk/sctp/src/$(LIB_PREFIX)nksctp_s.$(LIB_SUFFIX)
endif
LOCAL_INCLUDES += \
-I. \
-I$(topsrcdir)/media/webrtc/trunk/testing/gtest/include/ \
-I$(topsrcdir)/media/mtransport/ \
-I$(topsrcdir)/netwerk/sctp/src/ \
$(NULL)
LOCAL_INCLUDES += \
-I. \
-I$(topsrcdir)/media/mtransport/third_party/ \
-I$(topsrcdir)/media/mtransport/third_party/ \
-I$(topsrcdir)/media/mtransport/third_party/nICEr/src/crypto \
-I$(topsrcdir)/media/mtransport/third_party/nICEr/src/ice \
-I$(topsrcdir)/media/mtransport/third_party/nICEr/src/net \
-I$(topsrcdir)/media/mtransport/third_party/nICEr/src/stun \
-I$(topsrcdir)/media/mtransport/third_party/nICEr/src/util \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/share \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/util/ \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/util/libekr \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/log \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/registry \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/stats \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/plugin \
-I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/event \
$(NULL)
ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/darwin/include
ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))

View File

@ -40,3 +40,24 @@ else:
if CONFIG['OS_TARGET'] in ('Darwin', 'Android'):
DEFINES['GTEST_USE_OWN_TR1_TUPLE'] = 1
LOCAL_INCLUDES += [
'/media/mtransport/',
'/media/mtransport/third_party/',
'/media/mtransport/third_party/nICEr/src/crypto',
'/media/mtransport/third_party/nICEr/src/ice',
'/media/mtransport/third_party/nICEr/src/net',
'/media/mtransport/third_party/nICEr/src/stun',
'/media/mtransport/third_party/nICEr/src/util',
'/media/mtransport/third_party/nrappkit/src/event',
'/media/mtransport/third_party/nrappkit/src/log',
'/media/mtransport/third_party/nrappkit/src/plugin',
'/media/mtransport/third_party/nrappkit/src/registry',
'/media/mtransport/third_party/nrappkit/src/share',
'/media/mtransport/third_party/nrappkit/src/stats',
'/media/mtransport/third_party/nrappkit/src/util/',
'/media/mtransport/third_party/nrappkit/src/util/libekr',
'/media/webrtc/trunk/testing/gtest/include/',
'/netwerk/sctp/src/',
]

View File

@ -11,4 +11,3 @@ endif
endif
endif
LOCAL_INCLUDES += -I$(topsrcdir)/memory/build

View File

@ -31,3 +31,8 @@ DEFINES['MOZ_JEMALLOC_IMPL'] = True
# See bug 419470
if CONFIG['OS_TARGET'] == 'Linux':
NO_PGO = True
LOCAL_INCLUDES += [
'/memory/build',
]

View File

@ -3,11 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This makefile just builds support for reading archives.
LOCAL_INCLUDES += -I$(srcdir)/../src \
-I$(srcdir)/../verify \
-I$(topsrcdir)/dist/include \
$(NULL)
CFLAGS += -DMAR_NSS
include $(topsrcdir)/config/rules.mk

View File

@ -13,5 +13,11 @@ UNIFIED_SOURCES += [
FORCE_STATIC_LIB = True
LOCAL_INCLUDES += [
'../src',
'../verify',
]
if CONFIG['OS_ARCH'] == 'WINNT':
USE_STATIC_LIBS = True

View File

@ -3,8 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This makefile just builds support for reading archives.
LOCAL_INCLUDES += -I$(srcdir)/../src
ifneq ($(OS_ARCH),WINNT)
LOCAL_INCLUDES += -I$(srcdir)/../sign
endif

View File

@ -17,3 +17,8 @@ if CONFIG['OS_ARCH'] == 'WINNT':
USE_STATIC_LIBS = True
else:
DEFINES['MAR_NSS'] = True
LOCAL_INCLUDES += [
'../src',
]

View File

@ -35,8 +35,6 @@ ifeq ($(HOST_OS_ARCH),WINNT)
HOST_EXTRA_LIBS += $(call EXPAND_LIBNAME,Ws2_32)
endif
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/mozapps/update/updater
include $(topsrcdir)/config/rules.mk
HOST_CXXFLAGS += $(MOZ_BZ2_CFLAGS)

View File

@ -9,3 +9,8 @@ HOST_SOURCES += [
]
HOST_PROGRAM = 'mbsdiff'
LOCAL_INCLUDES += [
'/toolkit/mozapps/update/updater',
]

View File

@ -4,6 +4,4 @@
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES = -I$(srcdir)/../src
STL_FLAGS =

View File

@ -13,3 +13,8 @@ LIBRARY_NAME = 'profdirserviceprovidersa_s'
FORCE_STATIC_LIB = True
DEFINES['XPCOM_GLUE'] = 1
LOCAL_INCLUDES += [
'../src',
]

View File

@ -8,8 +8,4 @@ include $(DEPTH)/config/autoconf.mk
EXPORT_LIBRARY = 1
LOCAL_INCLUDES = \
-I$(topsrcdir)/security/manager/ssl/src \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -17,3 +17,8 @@ LOCAL_INCLUDES += [
]
include('/ipc/chromium/chromium-config.mozbuild')
LOCAL_INCLUDES += [
'/security/manager/ssl/src',
]

View File

@ -15,6 +15,3 @@ LIBS = \
DEFINES += $(TK_CFLAGS)
LOCAL_INCLUDES += \
-I$(srcdir)/../lib \
$(NULL)

View File

@ -15,3 +15,8 @@ SIMPLE_PROGRAMS = [
SOURCES += [
'%s.cpp' % s for s in SIMPLE_PROGRAMS
]
LOCAL_INCLUDES += [
'../lib',
]

View File

@ -5,12 +5,6 @@
MOZ_GLUE_LDFLAGS =
STL_FLAGS =
LOCAL_INCLUDES += \
-I$(topsrcdir)/security \
-I$(topsrcdir)/security/sandbox \
-I$(topsrcdir)/security/sandbox/chromium \
$(NULL)
SHARED_LIBRARY_LIBS += \
../../../$(LIB_PREFIX)sandbox_s.$(LIB_SUFFIX) \
$(NSPR_LIBS) \

View File

@ -20,3 +20,10 @@ FORCE_SHARED_LIB = True
for var in ('UNICODE', '_UNICODE', 'NS_NO_XPCOM', 'NOMINMAX',
'SANDBOX_EXPORTS'):
DEFINES[var] = True
LOCAL_INCLUDES += [
'/security',
'/security/sandbox',
'/security/sandbox/chromium',
]

View File

@ -5,13 +5,6 @@
# Avoid recursive make to avoid having to add files to the gtest/ subdirectory
# (which is third-party code), and to make the build faster.
LOCAL_INCLUDES += \
-I$(srcdir)/gtest \
-I$(srcdir)/gtest/include \
-I$(srcdir)/gmock \
-I$(srcdir)/gmock/include \
$(NULL)
include $(topsrcdir)/config/rules.mk
ifeq (browser,$(MOZ_BUILD_APP))

View File

@ -67,3 +67,10 @@ LIBXUL_LIBRARY = True
EXPORT_LIBRARY = True
LOCAL_INCLUDES += [
'gmock',
'gmock/include',
'gtest',
'gtest/include',
]

View File

@ -173,7 +173,6 @@
"content/html/content/test/forms/test_input_file_picker.html":"5 failures out of 139 and timing out, bug 901581",
"content/html/content/test/forms/test_validation.html":"374 total, bug 901848, no keygen support",
"content/html/content/test/forms/test_input_sanitization.html":"times out",
"content/html/content/test/test_bug430351.html":"13 failing out of 700, not focusable iframes? bug 902207",
@ -471,7 +470,6 @@
"content/html/content/test/test_bug209275.xhtml":"timed out, 47 tests, bug 870262, :visited support",
"content/html/content/test/test_bug481335.xhtml":"timed out, bug 870262, :visited support",
"layout/style/test/test_transitions.html":"times out",
"layout/style/test/test_visited_image_loading.html":"bug 870262, :visited support",
"layout/style/test/test_visited_image_loading_empty.html":"bug 870262, :visited support",
"layout/style/test/test_visited_lying.html" : "bug 870262, :visited support",

View File

@ -1,7 +0,0 @@
# 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/.
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/components/build/
include $(topsrcdir)/config/rules.mk

View File

@ -2,10 +2,6 @@
# 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/.
LOCAL_INCLUDES = \
-I$(topsrcdir)/js/src/ctypes \
$(NULL)
EXTRA_DSO_LDOPTS += $(MOZALLOC_LIB)
xpctestdir = $(testxpcobjdir)/$(relativesrcdir)/unit

View File

@ -16,3 +16,8 @@ UNIFIED_SOURCES += [
LIBRARY_NAME = 'jsctypes-test'
FORCE_SHARED_LIB = True
LOCAL_INCLUDES += [
'/js/src/ctypes',
]

View File

@ -7,6 +7,3 @@ include $(topsrcdir)/config/rules.mk
CXXFLAGS += $(TK_CFLAGS) -DGOOGLE_PROTOBUF_NO_RTTI
LOCAL_INCLUDES += \
-I$(srcdir)/../protobuf \
$(NULL)

View File

@ -52,3 +52,8 @@ if not CONFIG['MOZ_SUITE']:
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'toolkitcomps'
LOCAL_INCLUDES += [
'../protobuf',
]

View File

@ -38,8 +38,3 @@ include $(topsrcdir)/config/rules.mk
ifdef _MSC_VER
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
endif
# Pick up nsWindowsRestart.cpp
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre \
-I$(topsrcdir)/toolkit/mozapps/update/common \
$(NULL)

View File

@ -22,4 +22,11 @@ DEFINES['UNICODE'] = True
DEFINES['_UNICODE'] = True
DEFINES['NS_NO_XPCOM'] = True
# Pick up nsWindowsRestart.cpp
LOCAL_INCLUDES += [
'/toolkit/mozapps/update/common',
'/toolkit/xre',
]
USE_STATIC_LIBS = True

View File

@ -6,9 +6,6 @@
USE_RCS_MK := 1
include $(topsrcdir)/config/makefiles/rcs.mk
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/threads
DEFINES += -DMOZ_APP_VERSION='"$(MOZ_APP_VERSION)"'
MOZ_HISTOGRAMS_VERSION ?= $(call getSourceRepo)/rev/$(firstword $(shell hg -R $(topsrcdir) parent --template='{node|short}\n' 2>/dev/null))

View File

@ -52,3 +52,9 @@ GENERATED_FILES = [
if CONFIG['MOZILLA_OFFICIAL']:
DEFINES['MOZILLA_OFFICIAL'] = True
LOCAL_INCLUDES += [
'/xpcom/build',
'/xpcom/threads',
]

View File

@ -2,9 +2,8 @@
# 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/.
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES = \
-I$(srcdir)/../build \
-I$(topsrcdir)/ipc/chromium/src \
CXXFLAGS += \
$(SQLITE_CFLAGS) \
$(NULL)

View File

@ -65,3 +65,9 @@ FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
FINAL_LIBRARY = 'toolkitcomps'
LOCAL_INCLUDES += [
'../build',
'/ipc/chromium/src',
]

View File

@ -9,8 +9,6 @@ TARGET_LOCAL_INCLUDES = \
$(NULL)
endif
LOCAL_INCLUDES += -I$(srcdir)/google-breakpad/src
include $(topsrcdir)/config/rules.mk
check::

View File

@ -15,13 +15,10 @@ MOZ_GLUE_LDFLAGS =
MOZ_GLUE_PROGRAM_LDFLAGS =
endif
LOCAL_INCLUDES = -I$(srcdir)/../google-breakpad/src
ifeq ($(OS_ARCH),WINNT)
LIBS += \
$(DEPTH)/toolkit/crashreporter/breakpad-windows-libxul/$(LIB_PREFIX)google_breakpad_libxul_s.$(LIB_SUFFIX)
$(NULL)
LOCAL_INCLUDES += -I$(srcdir)
RCINCLUDE = crashreporter.rc
OS_LIBS += $(call EXPAND_LIBNAME,comctl32 shell32 wininet shlwapi)
MOZ_WINCONSOLE = 0
@ -33,8 +30,6 @@ LIBS += \
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/$(LIB_PREFIX)breakpad_common_s.$(LIB_SUFFIX) \
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/mac/$(LIB_PREFIX)breakpad_mac_common_s.$(LIB_SUFFIX) \
$(NULL)
LOCAL_INCLUDES += -I$(srcdir) -I$(srcdir)/../google-breakpad/src/common/mac/
endif
ifdef MOZ_WIDGET_GTK
@ -42,7 +37,6 @@ ifdef MOZ_WIDGET_GTK
LIBS += \
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/linux/$(LIB_PREFIX)breakpad_linux_common_s.$(LIB_SUFFIX) \
$(NULL)
LOCAL_INCLUDES += -I$(srcdir)
OS_CXXFLAGS += $(TK_CFLAGS) $(MOZ_GTHREAD_CFLAGS)
OS_LIBS += $(TK_LIBS) $(MOZ_GTHREAD_LIBS)
endif
@ -51,7 +45,6 @@ ifeq ($(OS_ARCH),SunOS)
LIBS += \
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/solaris/$(LIB_PREFIX)breakpad_solaris_common_s.$(LIB_SUFFIX) \
$(NULL)
LOCAL_INCLUDES += -I$(srcdir)
OS_CXXFLAGS += $(MOZ_GTK2_CFLAGS) $(MOZ_GTHREAD_CFLAGS)
OS_LIBS += $(MOZ_GTK2_LIBS) $(MOZ_GTHREAD_LIBS)
endif

View File

@ -12,6 +12,10 @@ UNIFIED_SOURCES += [
'crashreporter.cpp',
]
LOCAL_INCLUDES += [
'../google-breakpad/src',
]
if CONFIG['OS_ARCH'] == 'WINNT':
UNIFIED_SOURCES += [
'crashreporter_win.cpp',
@ -20,8 +24,12 @@ if CONFIG['OS_ARCH'] == 'WINNT':
DEFINES['_UNICODE'] = True
elif CONFIG['OS_ARCH'] == 'Darwin':
UNIFIED_SOURCES += [
'crashreporter_osx.mm',
'crashreporter_unix_common.cpp',
]
LOCAL_INCLUDES += [
'../google-breakpad/src/common/mac',
]
elif CONFIG['OS_ARCH'] == 'SunOS':
SOURCES += [
'crashreporter_linux.cpp',
@ -33,9 +41,5 @@ if CONFIG['MOZ_ENABLE_GTK']:
'crashreporter_gtk_common.cpp',
'crashreporter_linux.cpp',
'crashreporter_unix_common.cpp'
]
if CONFIG['OS_ARCH'] == 'Darwin':
UNIFIED_SOURCES += [
'crashreporter_osx.mm',
]

View File

@ -1,5 +0,0 @@
# 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/.
LOCAL_INCLUDES = -I$(srcdir)/..

View File

@ -1,13 +0,0 @@
# 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/.
LOCAL_INCLUDES = \
-I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src \
$(NULL)
include $(topsrcdir)/config/rules.mk
ifeq ($(OS_TARGET),Android)
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
endif

View File

@ -10,3 +10,12 @@ UNIFIED_SOURCES += [
]
FINAL_LIBRARY = 'xulapp_s'
LOCAL_INCLUDES += [
'/toolkit/crashreporter/google-breakpad/src',
]
if CONFIG['OS_TARGET'] == 'Android':
LOCAL_INCLUDES += [
'/toolkit/crashreporter/google-breakpad/src/common/android/include',
]

View File

@ -15,12 +15,3 @@ ifdef MOZ_THUMB2 #{
OS_CXXFLAGS += -fomit-frame-pointer
MOZ_FRAMEPTR_FLAGS := -fomit-frame-pointer
endif #}
LOCAL_INCLUDES = \
-I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src \
$(NULL)
ifeq ($(OS_TARGET),Android)
# NDK5 workarounds
LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
endif

View File

@ -18,3 +18,11 @@ if CONFIG['OS_TARGET'] == 'Android':
# NDK5 workarounds
DEFINES['_STLP_CONST_CONSTRUCTOR_BUG'] = True
DEFINES['_STLP_NO_MEMBER_TEMPLATES'] = True
LOCAL_INCLUDES += [
'/toolkit/crashreporter/google-breakpad/src/common/android/include',
]
LOCAL_INCLUDES += [
'/toolkit/crashreporter/google-breakpad/src',
]

View File

@ -1,5 +0,0 @@
# 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/.
LOCAL_INCLUDES = -I$(srcdir)/../../..

View File

@ -12,3 +12,8 @@ UNIFIED_SOURCES += [
XPI_NAME = 'crashreporter'
FINAL_LIBRARY = 'xulapp_s'
LOCAL_INCLUDES += [
'../../..',
]

View File

@ -1,5 +0,0 @@
# 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/.
LOCAL_INCLUDES = -I$(srcdir)/../../..

View File

@ -14,3 +14,8 @@ UNIFIED_SOURCES += [
XPI_NAME = 'crashreporter'
FINAL_LIBRARY = 'xulapp_s'
LOCAL_INCLUDES += [
'../../..',
]

View File

@ -11,3 +11,8 @@ SOURCES += [
XPI_NAME = 'crashreporter'
FINAL_LIBRARY = 'xulapp_s'
LOCAL_INCLUDES += [
'..',
]

View File

@ -1,5 +0,0 @@
# 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/.
LOCAL_INCLUDES = -I$(srcdir)/../../..

View File

@ -13,3 +13,8 @@ SOURCES += [
XPI_NAME = 'crashreporter'
FINAL_LIBRARY = 'xulapp_s'
LOCAL_INCLUDES += [
'../../..',
]

View File

@ -7,8 +7,6 @@ ifdef MOZ_CRASHREPORTER
endif
endif
LOCAL_INCLUDES = -I$(srcdir)/..
ifeq ($(OS_TARGET),Android)
TARGET_LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/
endif

View File

@ -2,12 +2,6 @@
# 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/.
ifdef MOZ_CRASHREPORTER
LOCAL_INCLUDES = -I$(srcdir)/../..
endif
# This code is only compiled for build-time tools,
# so enabling RTTI should be fine.
HOST_CXXFLAGS += -funsigned-char -frtti

View File

@ -12,6 +12,9 @@ if CONFIG['MOZ_CRASHREPORTER']:
'dwarf2reader.cc',
'functioninfo.cc',
]
LOCAL_INCLUDES += [
'../..',
]
# need static lib
FORCE_STATIC_LIB = True

View File

@ -2,10 +2,6 @@
# 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/.
LOCAL_INCLUDES = \
-I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src \
$(NULL)
ifneq (Android,$(OS_TARGET))
else
TARGET_LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src/common/android/include/

View File

@ -42,3 +42,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
DEFINES['ELFSIZE'] = 32
DEFINES['NO_STABS_SUPPORT'] = True
LOCAL_INCLUDES += [
'/toolkit/crashreporter/google-breakpad/src',
]

View File

@ -2,8 +2,6 @@
# 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/.
LOCAL_INCLUDES = -I$(srcdir)/../..
include $(topsrcdir)/config/rules.mk
COMPILE_CMFLAGS += -std=c99

View File

@ -33,3 +33,8 @@ SOURCES += [
LIBRARY_NAME = 'breakpad_mac_common_s'
FINAL_LIBRARY = 'xulapp_s'
LOCAL_INCLUDES += [
'../..',
]

View File

@ -87,3 +87,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
if CONFIG['OS_TARGET'] == 'Android':
DEFINES['NO_STABS_SUPPORT'] = True
LOCAL_INCLUDES += [
'..',
]

View File

@ -1,5 +0,0 @@
# 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/.
LOCAL_INCLUDES = -I$(srcdir)/../..

View File

@ -23,3 +23,8 @@ HOST_SOURCES += [
]
FINAL_LIBRARY = 'xulapp_s'
LOCAL_INCLUDES += [
'../..',
]

Some files were not shown because too many files have changed in this diff Show More