зеркало из https://github.com/mozilla/gecko-dev.git
merge mozilla-inbound to mozilla-central a=merge
This commit is contained in:
Коммит
3c40ac6f0b
2
CLOBBER
2
CLOBBER
|
@ -22,4 +22,4 @@
|
|||
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
|
||||
# don't change CLOBBER for WebIDL changes any more.
|
||||
|
||||
Bug 1287827 - Clobber needed because this patch removes files, second landing.
|
||||
Bug 1287827 - Clobber needed because this patch removes files, second landing AND Bug 1272693 - Clobber required to rebuild NSS.
|
||||
|
|
|
@ -41,10 +41,14 @@ xpcAccessibleHyperText::GetCharacterCount(int32_t* aCharacterCount)
|
|||
NS_ENSURE_ARG_POINTER(aCharacterCount);
|
||||
*aCharacterCount = 0;
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*aCharacterCount = Intl()->CharacterCount();
|
||||
if (mIntl.IsAccessible()) {
|
||||
*aCharacterCount = Intl()->CharacterCount();
|
||||
} else {
|
||||
*aCharacterCount = mIntl.AsProxy()->CharacterCount();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -54,10 +58,16 @@ xpcAccessibleHyperText::GetText(int32_t aStartOffset, int32_t aEndOffset,
|
|||
{
|
||||
aText.Truncate();
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->TextSubstring(aStartOffset, aEndOffset, aText);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->TextSubstring(aStartOffset, aEndOffset, aText);
|
||||
} else {
|
||||
nsString text;
|
||||
mIntl.AsProxy()->TextSubstring(aStartOffset, aEndOffset, text);
|
||||
aText = text;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -73,10 +83,18 @@ xpcAccessibleHyperText::GetTextBeforeOffset(int32_t aOffset,
|
|||
*aStartOffset = *aEndOffset = 0;
|
||||
aText.Truncate();
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->TextBeforeOffset(aOffset, aBoundaryType, aStartOffset, aEndOffset, aText);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->TextBeforeOffset(aOffset, aBoundaryType, aStartOffset, aEndOffset,
|
||||
aText);
|
||||
} else {
|
||||
nsString text;
|
||||
mIntl.AsProxy()->GetTextBeforeOffset(aOffset, aBoundaryType, text,
|
||||
aStartOffset, aEndOffset);
|
||||
aText = text;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -91,10 +109,18 @@ xpcAccessibleHyperText::GetTextAtOffset(int32_t aOffset,
|
|||
*aStartOffset = *aEndOffset = 0;
|
||||
aText.Truncate();
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->TextAtOffset(aOffset, aBoundaryType, aStartOffset, aEndOffset, aText);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->TextAtOffset(aOffset, aBoundaryType, aStartOffset, aEndOffset,
|
||||
aText);
|
||||
} else {
|
||||
nsString text;
|
||||
mIntl.AsProxy()->GetTextAtOffset(aOffset, aBoundaryType, text,
|
||||
aStartOffset, aEndOffset);
|
||||
aText = text;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -109,10 +135,18 @@ xpcAccessibleHyperText::GetTextAfterOffset(int32_t aOffset,
|
|||
*aStartOffset = *aEndOffset = 0;
|
||||
aText.Truncate();
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->TextAfterOffset(aOffset, aBoundaryType, aStartOffset, aEndOffset, aText);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->TextAfterOffset(aOffset, aBoundaryType, aStartOffset, aEndOffset,
|
||||
aText);
|
||||
} else {
|
||||
nsString text;
|
||||
mIntl.AsProxy()->GetTextAfterOffset(aOffset, aBoundaryType, text,
|
||||
aStartOffset, aEndOffset);
|
||||
aText = text;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -123,10 +157,14 @@ xpcAccessibleHyperText::GetCharacterAtOffset(int32_t aOffset,
|
|||
NS_ENSURE_ARG_POINTER(aCharacter);
|
||||
*aCharacter = L'\0';
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*aCharacter = Intl()->CharAt(aOffset);
|
||||
if (mIntl.IsAccessible()) {
|
||||
*aCharacter = Intl()->CharAt(aOffset);
|
||||
} else {
|
||||
*aCharacter = mIntl.AsProxy()->CharAt(aOffset);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -143,12 +181,24 @@ xpcAccessibleHyperText::GetTextAttributes(bool aIncludeDefAttrs,
|
|||
*aStartOffset = *aEndOffset = 0;
|
||||
*aAttributes = nullptr;
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIPersistentProperties> attrs =
|
||||
Intl()->TextAttributes(aIncludeDefAttrs, aOffset, aStartOffset, aEndOffset);
|
||||
attrs.swap(*aAttributes);
|
||||
nsCOMPtr<nsIPersistentProperties> props;
|
||||
if (mIntl.IsAccessible()) {
|
||||
props = Intl()->TextAttributes(aIncludeDefAttrs, aOffset, aStartOffset,
|
||||
aEndOffset);
|
||||
} else {
|
||||
AutoTArray<Attribute, 10> attrs;
|
||||
mIntl.AsProxy()->TextAttributes(aIncludeDefAttrs, aOffset, &attrs,
|
||||
aStartOffset, aEndOffset);
|
||||
uint32_t attrCount = attrs.Length();
|
||||
nsAutoString unused;
|
||||
for (uint32_t i = 0; i < attrCount; i++) {
|
||||
props->SetStringProperty(attrs[i].Name(), attrs[i].Value(), unused);
|
||||
}
|
||||
}
|
||||
props.forget(aAttributes);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -159,11 +209,23 @@ xpcAccessibleHyperText::GetDefaultTextAttributes(nsIPersistentProperties** aAttr
|
|||
NS_ENSURE_ARG_POINTER(aAttributes);
|
||||
*aAttributes = nullptr;
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIPersistentProperties> attrs = Intl()->DefaultTextAttributes();
|
||||
attrs.swap(*aAttributes);
|
||||
nsCOMPtr<nsIPersistentProperties> props;
|
||||
if (mIntl.IsAccessible()) {
|
||||
props = Intl()->DefaultTextAttributes();
|
||||
} else {
|
||||
AutoTArray<Attribute, 10> attrs;
|
||||
mIntl.AsProxy()->DefaultTextAttributes(&attrs);
|
||||
uint32_t attrCount = attrs.Length();
|
||||
nsAutoString unused;
|
||||
for (uint32_t i = 0; i < attrCount; i++) {
|
||||
props->SetStringProperty(attrs[i].Name(), attrs[i].Value(), unused);
|
||||
}
|
||||
}
|
||||
props.forget(aAttributes);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -179,10 +241,15 @@ xpcAccessibleHyperText::GetCharacterExtents(int32_t aOffset,
|
|||
NS_ENSURE_ARG_POINTER(aHeight);
|
||||
*aX = *aY = *aWidth = *aHeight;
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsIntRect rect = Intl()->CharBounds(aOffset, aCoordType);
|
||||
nsIntRect rect;
|
||||
if (mIntl.IsAccessible()) {
|
||||
rect = Intl()->CharBounds(aOffset, aCoordType);
|
||||
} else {
|
||||
rect = mIntl.AsProxy()->CharBounds(aOffset, aCoordType);
|
||||
}
|
||||
*aX = rect.x; *aY = rect.y;
|
||||
*aWidth = rect.width; *aHeight = rect.height;
|
||||
return NS_OK;
|
||||
|
@ -200,10 +267,15 @@ xpcAccessibleHyperText::GetRangeExtents(int32_t aStartOffset, int32_t aEndOffset
|
|||
NS_ENSURE_ARG_POINTER(aHeight);
|
||||
*aX = *aY = *aWidth = *aHeight = 0;
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsIntRect rect = Intl()->TextBounds(aStartOffset, aEndOffset, aCoordType);
|
||||
nsIntRect rect;
|
||||
if (mIntl.IsAccessible()) {
|
||||
rect = Intl()->TextBounds(aStartOffset, aEndOffset, aCoordType);
|
||||
} else {
|
||||
rect = mIntl.AsProxy()->TextBounds(aStartOffset, aEndOffset, aCoordType);
|
||||
}
|
||||
*aX = rect.x; *aY = rect.y;
|
||||
*aWidth = rect.width; *aHeight = rect.height;
|
||||
return NS_OK;
|
||||
|
@ -216,10 +288,14 @@ xpcAccessibleHyperText::GetOffsetAtPoint(int32_t aX, int32_t aY,
|
|||
NS_ENSURE_ARG_POINTER(aOffset);
|
||||
*aOffset = -1;
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*aOffset = Intl()->OffsetAtPoint(aX, aY, aCoordType);
|
||||
if (mIntl.IsAccessible()) {
|
||||
*aOffset = Intl()->OffsetAtPoint(aX, aY, aCoordType);
|
||||
} else {
|
||||
*aOffset = mIntl.AsProxy()->OffsetAtPoint(aX, aY, aCoordType);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -229,20 +305,28 @@ xpcAccessibleHyperText::GetCaretOffset(int32_t* aCaretOffset)
|
|||
NS_ENSURE_ARG_POINTER(aCaretOffset);
|
||||
*aCaretOffset = -1;
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*aCaretOffset = Intl()->CaretOffset();
|
||||
if (mIntl.IsAccessible()) {
|
||||
*aCaretOffset = Intl()->CaretOffset();
|
||||
} else {
|
||||
*aCaretOffset = mIntl.AsProxy()->CaretOffset();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
xpcAccessibleHyperText::SetCaretOffset(int32_t aCaretOffset)
|
||||
{
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->SetCaretOffset(aCaretOffset);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->SetCaretOffset(aCaretOffset);
|
||||
} else {
|
||||
mIntl.AsProxy()->SetCaretOffset(aCaretOffset);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -252,10 +336,14 @@ xpcAccessibleHyperText::GetSelectionCount(int32_t* aSelectionCount)
|
|||
NS_ENSURE_ARG_POINTER(aSelectionCount);
|
||||
*aSelectionCount = 0;
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*aSelectionCount = Intl()->SelectionCount();
|
||||
if (mIntl.IsAccessible()) {
|
||||
*aSelectionCount = Intl()->SelectionCount();
|
||||
} else {
|
||||
*aSelectionCount = mIntl.AsProxy()->SelectionCount();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -268,13 +356,22 @@ xpcAccessibleHyperText::GetSelectionBounds(int32_t aSelectionNum,
|
|||
NS_ENSURE_ARG_POINTER(aEndOffset);
|
||||
*aStartOffset = *aEndOffset = 0;
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (aSelectionNum < 0 || aSelectionNum >= Intl()->SelectionCount())
|
||||
if (aSelectionNum < 0)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
Intl()->SelectionBoundsAt(aSelectionNum, aStartOffset, aEndOffset);
|
||||
if (mIntl.IsAccessible()) {
|
||||
if (aSelectionNum >= Intl()->SelectionCount())
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
Intl()->SelectionBoundsAt(aSelectionNum, aStartOffset, aEndOffset);
|
||||
} else {
|
||||
nsString unused;
|
||||
mIntl.AsProxy()->SelectionBoundsAt(aSelectionNum, unused, aStartOffset,
|
||||
aEndOffset);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -283,33 +380,51 @@ xpcAccessibleHyperText::SetSelectionBounds(int32_t aSelectionNum,
|
|||
int32_t aStartOffset,
|
||||
int32_t aEndOffset)
|
||||
{
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (aSelectionNum < 0 ||
|
||||
!Intl()->SetSelectionBoundsAt(aSelectionNum, aStartOffset, aEndOffset))
|
||||
if (aSelectionNum < 0)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
if (mIntl.IsAccessible()) {
|
||||
if (!Intl()->SetSelectionBoundsAt(aSelectionNum, aStartOffset,
|
||||
aEndOffset)) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
} else {
|
||||
if (!mIntl.AsProxy()->SetSelectionBoundsAt(aSelectionNum, aStartOffset,
|
||||
aEndOffset)) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
xpcAccessibleHyperText::AddSelection(int32_t aStartOffset, int32_t aEndOffset)
|
||||
{
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->AddToSelection(aStartOffset, aEndOffset);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->AddToSelection(aStartOffset, aEndOffset);
|
||||
} else {
|
||||
mIntl.AsProxy()->AddToSelection(aStartOffset, aEndOffset);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
xpcAccessibleHyperText::RemoveSelection(int32_t aSelectionNum)
|
||||
{
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->RemoveFromSelection(aSelectionNum);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->RemoveFromSelection(aSelectionNum);
|
||||
} else {
|
||||
mIntl.AsProxy()->RemoveFromSelection(aSelectionNum);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -318,10 +433,14 @@ xpcAccessibleHyperText::ScrollSubstringTo(int32_t aStartOffset,
|
|||
int32_t aEndOffset,
|
||||
uint32_t aScrollType)
|
||||
{
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->ScrollSubstringTo(aStartOffset, aEndOffset, aScrollType);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->ScrollSubstringTo(aStartOffset, aEndOffset, aScrollType);
|
||||
} else {
|
||||
mIntl.AsProxy()->ScrollSubstringTo(aStartOffset, aEndOffset, aScrollType);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -331,10 +450,16 @@ xpcAccessibleHyperText::ScrollSubstringToPoint(int32_t aStartOffset,
|
|||
uint32_t aCoordinateType,
|
||||
int32_t aX, int32_t aY)
|
||||
{
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->ScrollSubstringToPoint(aStartOffset, aEndOffset, aCoordinateType, aX, aY);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->ScrollSubstringToPoint(aStartOffset, aEndOffset, aCoordinateType,
|
||||
aX, aY);
|
||||
} else {
|
||||
mIntl.AsProxy()->ScrollSubstringToPoint(aStartOffset, aEndOffset,
|
||||
aCoordinateType, aX, aY);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -452,60 +577,86 @@ xpcAccessibleHyperText::GetRangeAtPoint(int32_t aX, int32_t aY,
|
|||
NS_IMETHODIMP
|
||||
xpcAccessibleHyperText::SetTextContents(const nsAString& aText)
|
||||
{
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->ReplaceText(aText);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->ReplaceText(aText);
|
||||
} else {
|
||||
nsString text(aText);
|
||||
mIntl.AsProxy()->ReplaceText(text);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
xpcAccessibleHyperText::InsertText(const nsAString& aText, int32_t aOffset)
|
||||
{
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->InsertText(aText, aOffset);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->InsertText(aText, aOffset);
|
||||
} else {
|
||||
nsString text(aText);
|
||||
mIntl.AsProxy()->InsertText(text, aOffset);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
xpcAccessibleHyperText::CopyText(int32_t aStartOffset, int32_t aEndOffset)
|
||||
{
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->CopyText(aStartOffset, aEndOffset);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->CopyText(aStartOffset, aEndOffset);
|
||||
} else {
|
||||
mIntl.AsProxy()->CopyText(aStartOffset, aEndOffset);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
xpcAccessibleHyperText::CutText(int32_t aStartOffset, int32_t aEndOffset)
|
||||
{
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->CutText(aStartOffset, aEndOffset);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->CutText(aStartOffset, aEndOffset);
|
||||
} else {
|
||||
mIntl.AsProxy()->CutText(aStartOffset, aEndOffset);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
xpcAccessibleHyperText::DeleteText(int32_t aStartOffset, int32_t aEndOffset)
|
||||
{
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->DeleteText(aStartOffset, aEndOffset);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->DeleteText(aStartOffset, aEndOffset);
|
||||
} else {
|
||||
mIntl.AsProxy()->DeleteText(aStartOffset, aEndOffset);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
xpcAccessibleHyperText::PasteText(int32_t aOffset)
|
||||
{
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Intl()->PasteText(aOffset);
|
||||
if (mIntl.IsAccessible()) {
|
||||
Intl()->PasteText(aOffset);
|
||||
} else {
|
||||
mIntl.AsProxy()->PasteText(aOffset);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -518,10 +669,14 @@ xpcAccessibleHyperText::GetLinkCount(int32_t* aLinkCount)
|
|||
NS_ENSURE_ARG_POINTER(aLinkCount);
|
||||
*aLinkCount = 0;
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*aLinkCount = Intl()->LinkCount();
|
||||
if (mIntl.IsAccessible()) {
|
||||
*aLinkCount = Intl()->LinkCount();
|
||||
} else {
|
||||
*aLinkCount = mIntl.AsProxy()->LinkCount();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -531,10 +686,14 @@ xpcAccessibleHyperText::GetLinkAt(int32_t aIndex, nsIAccessibleHyperLink** aLink
|
|||
NS_ENSURE_ARG_POINTER(aLink);
|
||||
*aLink = nullptr;
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
NS_IF_ADDREF(*aLink = ToXPC(Intl()->LinkAt(aIndex)));
|
||||
if (mIntl.IsAccessible()) {
|
||||
NS_IF_ADDREF(*aLink = ToXPC(Intl()->LinkAt(aIndex)));
|
||||
} else {
|
||||
NS_IF_ADDREF(*aLink = ToXPC(mIntl.AsProxy()->LinkAt(aIndex)));
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -546,13 +705,20 @@ xpcAccessibleHyperText::GetLinkIndex(nsIAccessibleHyperLink* aLink,
|
|||
NS_ENSURE_ARG_POINTER(aIndex);
|
||||
*aIndex = -1;
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIAccessible> xpcLink(do_QueryInterface(aLink));
|
||||
Accessible* link = xpcLink->ToInternalAccessible();
|
||||
if (link)
|
||||
*aIndex = Intl()->LinkIndexOf(link);
|
||||
if (Accessible* accLink = xpcLink->ToInternalAccessible()) {
|
||||
*aIndex = Intl()->LinkIndexOf(accLink);
|
||||
} else {
|
||||
xpcAccessibleHyperText* linkHyperText =
|
||||
static_cast<xpcAccessibleHyperText*>(xpcLink.get());
|
||||
ProxyAccessible* proxyLink = linkHyperText->mIntl.AsProxy();
|
||||
if (proxyLink) {
|
||||
*aIndex = mIntl.AsProxy()->LinkIndexOf(proxyLink);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -564,9 +730,13 @@ xpcAccessibleHyperText::GetLinkIndexAtOffset(int32_t aOffset,
|
|||
NS_ENSURE_ARG_POINTER(aLinkIndex);
|
||||
*aLinkIndex = -1; // API says this magic value means 'not found'
|
||||
|
||||
if (!Intl())
|
||||
if (mIntl.IsNull())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
*aLinkIndex = Intl()->LinkIndexAtOffset(aOffset);
|
||||
if (mIntl.IsAccessible()) {
|
||||
*aLinkIndex = Intl()->LinkIndexAtOffset(aOffset);
|
||||
} else {
|
||||
*aLinkIndex = mIntl.AsProxy()->LinkIndexAtOffset(aOffset);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -3370,6 +3370,9 @@ var SessionStoreInternal = {
|
|||
let uri = activePageData ? activePageData.url || null : null;
|
||||
if (aLoadArguments) {
|
||||
uri = aLoadArguments.uri;
|
||||
if (aLoadArguments.userContextId) {
|
||||
browser.setAttribute("usercontextid", aLoadArguments.userContextId);
|
||||
}
|
||||
}
|
||||
|
||||
// We have to mark this tab as restoring first, otherwise
|
||||
|
|
|
@ -85,7 +85,7 @@ if test -n "$USE_ICU"; then
|
|||
dnl We also don't do it on Windows because sometimes the file goes
|
||||
dnl missing -- possibly due to overzealous antivirus software? --
|
||||
dnl which prevents the browser from starting up :(
|
||||
if test -z "$JS_STANDALONE" -a -z "$MOZ_SYSTEM_ICU" -a "$OS_TARGET" != WINNT; then
|
||||
if test -z "$JS_STANDALONE" -a -z "$MOZ_SYSTEM_ICU" -a "$OS_TARGET" != WINNT -a "$MOZ_WIDGET_TOOLKIT" != "android"; then
|
||||
MOZ_ICU_DATA_ARCHIVE=1
|
||||
else
|
||||
MOZ_ICU_DATA_ARCHIVE=
|
||||
|
|
|
@ -345,9 +345,13 @@ class RemoteAutomation(Automation):
|
|||
lines = [l for l in lines if l]
|
||||
|
||||
if lines:
|
||||
# We only keep the last (unfinished) line in the buffer
|
||||
self.logBuffer = lines[-1]
|
||||
del lines[-1]
|
||||
if self.logBuffer.endswith('\n'):
|
||||
# all lines are complete; no need to buffer
|
||||
self.logBuffer = ""
|
||||
else:
|
||||
# keep the last (unfinished) line in the buffer
|
||||
self.logBuffer = lines[-1]
|
||||
del lines[-1]
|
||||
|
||||
if not lines:
|
||||
return False
|
||||
|
|
|
@ -14,36 +14,35 @@ def rust_compiler_names(value):
|
|||
rustc = check_prog('RUSTC', rust_compiler_names, allow_missing=True)
|
||||
|
||||
@depends_if(rustc)
|
||||
@checking('rustc version')
|
||||
@imports('subprocess')
|
||||
def rustc_version(rustc):
|
||||
try:
|
||||
# TODO: We should run `rustc --version -v` and parse that output instead.
|
||||
version = Version(subprocess.check_output(
|
||||
[rustc, '--version']
|
||||
).splitlines()[0].split()[1])
|
||||
return version
|
||||
except subprocess.CalledProcessError as e:
|
||||
die('Failed to get rustc version: %s', e.message)
|
||||
@checking('rustc version', lambda info: info.version)
|
||||
def rustc_info(rustc):
|
||||
out = check_cmd_output(rustc, '--version', '--verbose').splitlines()
|
||||
info = dict((s.strip() for s in line.split(':', 1)) for line in out[1:])
|
||||
return namespace(
|
||||
version=Version(info.get('release', '0')),
|
||||
commit=info.get('commit-hash', 'unknown'),
|
||||
)
|
||||
|
||||
@depends('--enable-rust', rustc, rustc_version)
|
||||
@depends('--enable-rust', rustc, rustc_info)
|
||||
@imports(_from='textwrap', _import='dedent')
|
||||
def rust_compiler(value, rustc, rustc_version):
|
||||
def rust_compiler(value, rustc, rustc_info):
|
||||
if value:
|
||||
if not rustc:
|
||||
die(dedent('''\
|
||||
Rust compiler not found.
|
||||
To compile rust language sources, you must have 'rustc' in your path.
|
||||
See http://www.rust-lang.org/ for more information.
|
||||
See https//www.rust-lang.org/ for more information.
|
||||
'''))
|
||||
if rustc_version < '1.5':
|
||||
version = rustc_info.version
|
||||
min_version = Version('1.5')
|
||||
if version < min_version:
|
||||
die(dedent('''\
|
||||
Rust compiler {} is too old.
|
||||
To compile Rust language sources please install at least
|
||||
version 1.5 of the 'rustc' toolchain and make sure it is
|
||||
version {} of the 'rustc' toolchain and make sure it is
|
||||
first in your path.
|
||||
You can verify this by typing 'rustc --version'.
|
||||
'''.format(rustc_version)))
|
||||
'''.format(version, min_version)))
|
||||
return True
|
||||
|
||||
set_config('MOZ_RUST', rust_compiler)
|
||||
|
|
|
@ -323,7 +323,10 @@ NSS_DIRS += $(NSS_STATIC_DIRS)
|
|||
# TODO: The following can be replaced by something simpler when bug 844884
|
||||
# is fixed.
|
||||
# Remaining nss/lib directories
|
||||
NSS_DIRS += nss/lib/freebl nss/lib/softoken nss/lib/jar nss/lib/crmf nss/lib/ckfw nss/lib/libpkix
|
||||
NSS_DIRS += nss/lib/freebl nss/lib/softoken nss/lib/jar nss/lib/crmf nss/lib/ckfw
|
||||
|
||||
DEFAULT_GMAKE_FLAGS += NSS_DISABLE_LIBPKIX=1
|
||||
|
||||
ifeq (WINNT,$(OS_TARGET))
|
||||
NSS_DIRS += nss/lib/zlib
|
||||
endif
|
||||
|
|
|
@ -142,7 +142,6 @@ CERT_NewCertList
|
|||
CERT_NewTempCertificate
|
||||
CERT_NicknameStringsFromCertList
|
||||
CERT_OCSPCacheSettings
|
||||
CERT_PKIXVerifyCert
|
||||
CERT_RemoveCertListNode
|
||||
CERT_RFC1485_EscapeAndQuote
|
||||
CERT_SaveSMimeProfile
|
||||
|
|
|
@ -797,7 +797,7 @@ nsSHistory::EvictAllContentViewers()
|
|||
while (trans) {
|
||||
EvictContentViewerForTransaction(trans);
|
||||
|
||||
nsISHTransaction* temp = trans;
|
||||
nsCOMPtr<nsISHTransaction> temp = trans;
|
||||
temp->GetNext(getter_AddRefs(trans));
|
||||
}
|
||||
|
||||
|
@ -974,7 +974,7 @@ nsSHistory::EvictOutOfRangeWindowContentViewers(int32_t aIndex)
|
|||
for (int32_t i = startSafeIndex; trans && i <= endSafeIndex; i++) {
|
||||
nsCOMPtr<nsIContentViewer> viewer = GetContentViewerForTransaction(trans);
|
||||
safeViewers.AppendObject(viewer);
|
||||
nsISHTransaction* temp = trans;
|
||||
nsCOMPtr<nsISHTransaction> temp = trans;
|
||||
temp->GetNext(getter_AddRefs(trans));
|
||||
}
|
||||
|
||||
|
@ -986,7 +986,7 @@ nsSHistory::EvictOutOfRangeWindowContentViewers(int32_t aIndex)
|
|||
EvictContentViewerForTransaction(trans);
|
||||
}
|
||||
|
||||
nsISHTransaction* temp = trans;
|
||||
nsCOMPtr<nsISHTransaction> temp = trans;
|
||||
temp->GetNext(getter_AddRefs(trans));
|
||||
}
|
||||
}
|
||||
|
@ -1108,7 +1108,7 @@ nsSHistory::GloballyEvictContentViewers()
|
|||
}
|
||||
}
|
||||
|
||||
nsISHTransaction* temp = trans;
|
||||
nsCOMPtr<nsISHTransaction> temp = trans;
|
||||
temp->GetNext(getter_AddRefs(trans));
|
||||
}
|
||||
|
||||
|
@ -1154,7 +1154,7 @@ nsSHistory::EvictExpiredContentViewerForEntry(nsIBFCacheEntry* aEntry)
|
|||
break;
|
||||
}
|
||||
|
||||
nsISHTransaction* temp = trans;
|
||||
nsCOMPtr<nsISHTransaction> temp = trans;
|
||||
temp->GetNext(getter_AddRefs(trans));
|
||||
}
|
||||
if (i > endIndex) {
|
||||
|
|
|
@ -65,6 +65,9 @@ AnimationPerformanceWarning::ToLocalizedString(
|
|||
case Type::OpacityFrameInactive:
|
||||
key = "CompositorAnimationWarningOpacityFrameInactive";
|
||||
break;
|
||||
case Type::HasRenderingObserver:
|
||||
key = "CompositorAnimationWarningHasRenderingObserver";
|
||||
break;
|
||||
}
|
||||
|
||||
nsresult rv =
|
||||
|
|
|
@ -25,6 +25,7 @@ struct AnimationPerformanceWarning
|
|||
TransformWithGeometricProperties,
|
||||
TransformFrameInactive,
|
||||
OpacityFrameInactive,
|
||||
HasRenderingObserver,
|
||||
};
|
||||
|
||||
explicit AnimationPerformanceWarning(Type aType)
|
||||
|
|
|
@ -101,6 +101,21 @@ FindAnimationsForCompositor(const nsIFrame* aFrame,
|
|||
return false;
|
||||
}
|
||||
|
||||
// Disable async animations if we have a rendering observer that
|
||||
// depends on our content (svg masking, -moz-element etc) so that
|
||||
// it gets updated correctly.
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
while (content) {
|
||||
if (content->HasRenderingObservers()) {
|
||||
EffectCompositor::SetPerformanceWarning(
|
||||
aFrame, aProperty,
|
||||
AnimationPerformanceWarning(
|
||||
AnimationPerformanceWarning::Type::HasRenderingObserver));
|
||||
return false;
|
||||
}
|
||||
content = content->GetParent();
|
||||
}
|
||||
|
||||
bool foundSome = false;
|
||||
for (KeyframeEffectReadOnly* effect : *effects) {
|
||||
MOZ_ASSERT(effect && effect->GetAnimation());
|
||||
|
|
|
@ -238,7 +238,8 @@ var gAnimationWithGeometricKeyframeTests = [
|
|||
},
|
||||
];
|
||||
|
||||
var gPerformanceWarningTests = [
|
||||
// Performance warning tests that set and clear a style property.
|
||||
var gPerformanceWarningTestsStyle = [
|
||||
{
|
||||
desc: 'preserve-3d transform',
|
||||
frames: {
|
||||
|
@ -307,6 +308,25 @@ var gPerformanceWarningTests = [
|
|||
},
|
||||
];
|
||||
|
||||
// Performance warning tests that set and clear the id property
|
||||
var gPerformanceWarningTestsId= [
|
||||
{
|
||||
desc: 'moz-element referencing a transform',
|
||||
frames: {
|
||||
transform: ['translate(0px)', 'translate(100px)']
|
||||
},
|
||||
id: 'transformed',
|
||||
createelement: 'width:100px; height:100px; background: -moz-element(#transformed)',
|
||||
expected: [
|
||||
{
|
||||
property: 'transform',
|
||||
runningOnCompositor: false,
|
||||
warning: 'CompositorAnimationWarningHasRenderingObserver'
|
||||
}
|
||||
]
|
||||
},
|
||||
];
|
||||
|
||||
var gMultipleAsyncAnimationsTests = [
|
||||
{
|
||||
desc: 'opacity and transform with preserve-3d',
|
||||
|
@ -637,7 +657,7 @@ function start() {
|
|||
}, 'An animation has: ' + subtest.desc);
|
||||
});
|
||||
|
||||
gPerformanceWarningTests.forEach(function(subtest) {
|
||||
gPerformanceWarningTestsStyle.forEach(function(subtest) {
|
||||
promise_test(function(t) {
|
||||
var animation = addDivAndAnimate(t,
|
||||
{ class: 'compositable' },
|
||||
|
@ -662,6 +682,35 @@ function start() {
|
|||
}, subtest.desc);
|
||||
});
|
||||
|
||||
gPerformanceWarningTestsId.forEach(function(subtest) {
|
||||
promise_test(function(t) {
|
||||
if (subtest.createelement) {
|
||||
addDiv(t, { style: subtest.createelement });
|
||||
}
|
||||
|
||||
var animation = addDivAndAnimate(t,
|
||||
{ class: 'compositable' },
|
||||
subtest.frames, 100 * MS_PER_SEC);
|
||||
return animation.ready.then(function() {
|
||||
assert_property_state_on_compositor(
|
||||
animation.effect.getProperties(),
|
||||
subtest.expected);
|
||||
animation.effect.target.id = subtest.id;
|
||||
return waitForFrame();
|
||||
}).then(function() {
|
||||
assert_animation_property_state_equals(
|
||||
animation.effect.getProperties(),
|
||||
subtest.expected);
|
||||
animation.effect.target.id = '';
|
||||
return waitForFrame();
|
||||
}).then(function() {
|
||||
assert_property_state_on_compositor(
|
||||
animation.effect.getProperties(),
|
||||
subtest.expected);
|
||||
});
|
||||
}, subtest.desc);
|
||||
});
|
||||
|
||||
gMultipleAsyncAnimationsTests.forEach(function(subtest) {
|
||||
promise_test(function(t) {
|
||||
var div = addDiv(t, { class: 'compositable' });
|
||||
|
|
|
@ -991,6 +991,16 @@ BlobImplFile::GetInternalStream(nsIInputStream** aStream, ErrorResult& aRv)
|
|||
-1, -1, sFileStreamFlags);
|
||||
}
|
||||
|
||||
bool
|
||||
BlobImplFile::IsDirectory() const
|
||||
{
|
||||
bool isDirectory = false;
|
||||
if (mFile) {
|
||||
mFile->IsDirectory(&isDirectory);
|
||||
}
|
||||
return isDirectory;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// EmptyBlobImpl implementation
|
||||
|
||||
|
|
|
@ -329,6 +329,13 @@ public:
|
|||
|
||||
virtual bool IsFile() const = 0;
|
||||
|
||||
// Returns true if the BlobImpl is backed by an nsIFile and the underlying
|
||||
// file is a directory.
|
||||
virtual bool IsDirectory() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// True if this implementation can be sent to other threads.
|
||||
virtual bool MayBeClonedToOtherThreads() const
|
||||
{
|
||||
|
@ -712,6 +719,8 @@ public:
|
|||
virtual void GetInternalStream(nsIInputStream** aInputStream,
|
||||
ErrorResult& aRv) override;
|
||||
|
||||
virtual bool IsDirectory() const override;
|
||||
|
||||
// We always have size and date for this kind of blob.
|
||||
virtual bool IsSizeUnknown() const override { return false; }
|
||||
virtual bool IsDateUnknown() const override { return false; }
|
||||
|
|
|
@ -8347,11 +8347,8 @@ nsGlobalWindow::PostMessageMozOuter(JSContext* aCx, JS::Handle<JS::Value> aMessa
|
|||
nsCOMPtr<nsIPrincipal> providedPrincipal;
|
||||
|
||||
if (aTargetOrigin.EqualsASCII("/")) {
|
||||
providedPrincipal = GetEntryGlobal()->PrincipalOrNull();
|
||||
if (NS_WARN_IF(!providedPrincipal))
|
||||
return;
|
||||
providedPrincipal = callerPrin;
|
||||
}
|
||||
|
||||
// "*" indicates no specific origin is required.
|
||||
else if (!aTargetOrigin.EqualsASCII("*")) {
|
||||
nsCOMPtr<nsIURI> originURI;
|
||||
|
|
|
@ -2247,6 +2247,7 @@ class MethodDefiner(PropertyDefiner):
|
|||
# Generate the keys/values/entries aliases for value iterables.
|
||||
maplikeOrSetlikeOrIterable = descriptor.interface.maplikeOrSetlikeOrIterable
|
||||
if (not static and
|
||||
not unforgeable and
|
||||
maplikeOrSetlikeOrIterable and
|
||||
maplikeOrSetlikeOrIterable.isIterable() and
|
||||
maplikeOrSetlikeOrIterable.isValueIterator()):
|
||||
|
@ -2282,7 +2283,7 @@ class MethodDefiner(PropertyDefiner):
|
|||
"name": "forEach",
|
||||
"methodInfo": False,
|
||||
"selfHostedName": "ArrayForEach",
|
||||
"length": 0,
|
||||
"length": 1,
|
||||
"flags": "JSPROP_ENUMERATE",
|
||||
"condition": PropertyDefiner.getControllingCondition(m,
|
||||
descriptor)
|
||||
|
|
|
@ -1337,6 +1337,8 @@ bool CanvasRenderingContext2D::SwitchRenderingMode(RenderingMode aRenderingMode)
|
|||
RefPtr<SourceSurface> snapshot;
|
||||
Matrix transform;
|
||||
RefPtr<PersistentBufferProvider> oldBufferProvider = mBufferProvider;
|
||||
RefPtr<DrawTarget> oldTarget = mTarget;
|
||||
|
||||
AutoReturnSnapshot autoReturn(nullptr);
|
||||
|
||||
if (mTarget) {
|
||||
|
@ -1351,14 +1353,19 @@ bool CanvasRenderingContext2D::SwitchRenderingMode(RenderingMode aRenderingMode)
|
|||
autoReturn.mBufferProvider = mBufferProvider;
|
||||
autoReturn.mSnapshot = &snapshot;
|
||||
}
|
||||
|
||||
mTarget = nullptr;
|
||||
mBufferProvider = nullptr;
|
||||
mResetLayer = true;
|
||||
|
||||
// Recreate target using the new rendering mode
|
||||
RenderingMode attemptedMode = EnsureTarget(nullptr, aRenderingMode);
|
||||
if (!IsTargetValid())
|
||||
if (!IsTargetValid()) {
|
||||
if (oldBufferProvider && oldTarget) {
|
||||
oldBufferProvider->ReturnDrawTarget(oldTarget.forget());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// We succeeded, so update mRenderingMode to reflect reality
|
||||
mRenderingMode = attemptedMode;
|
||||
|
@ -1374,6 +1381,10 @@ bool CanvasRenderingContext2D::SwitchRenderingMode(RenderingMode aRenderingMode)
|
|||
|
||||
mTarget->SetTransform(transform);
|
||||
|
||||
if (oldBufferProvider && oldTarget) {
|
||||
oldBufferProvider->ReturnDrawTarget(oldTarget.forget());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -203,6 +203,8 @@ WebGL2Context::SamplerParameterfv(WebGLSampler* sampler, GLenum pname, const dom
|
|||
void
|
||||
WebGL2Context::GetSamplerParameter(JSContext*, WebGLSampler* sampler, GLenum pname, JS::MutableHandleValue retval)
|
||||
{
|
||||
retval.setNull();
|
||||
|
||||
if (IsContextLost())
|
||||
return;
|
||||
|
||||
|
@ -212,8 +214,6 @@ WebGL2Context::GetSamplerParameter(JSContext*, WebGLSampler* sampler, GLenum pna
|
|||
if (!ValidateSamplerParameterName(pname, "getSamplerParameter"))
|
||||
return;
|
||||
|
||||
retval.set(JS::NullValue());
|
||||
|
||||
switch (pname) {
|
||||
case LOCAL_GL_TEXTURE_MIN_FILTER:
|
||||
case LOCAL_GL_TEXTURE_MAG_FILTER:
|
||||
|
|
|
@ -277,6 +277,7 @@ void
|
|||
WebGL2Context::GetActiveUniformBlockName(WebGLProgram* program, GLuint uniformBlockIndex,
|
||||
nsAString& retval)
|
||||
{
|
||||
retval.SetIsVoid(true);
|
||||
if (IsContextLost())
|
||||
return;
|
||||
|
||||
|
|
|
@ -763,7 +763,7 @@ if (contextVersion > 1) {
|
|||
gl.RG32UI, gl.RGB8I, gl.RGB8UI, gl.RGB16I,
|
||||
gl.RGB16UI, gl.RGB32I, gl.RGB32UI, gl.RGBA8I,
|
||||
gl.RGBA8UI, gl.RGBA16I, gl.RGBA16UI, gl.RGBA32I,
|
||||
gl.RGBA32UI, gl.RGB, gl.RGBA, gl.DEPTH_COMPONENT16,
|
||||
gl.RGBA32UI, gl.RGB, gl.RGBA, gl.DEPTH_STENCIL, gl.DEPTH_COMPONENT16,
|
||||
gl.DEPTH_COMPONENT24, gl.DEPTH_COMPONENT32F, gl.DEPTH24_STENCIL8,
|
||||
gl.DEPTH32F_STENCIL8, gl.STENCIL_INDEX8
|
||||
);
|
||||
|
|
|
@ -9,6 +9,11 @@
|
|||
#include "mozilla/ContentEvents.h"
|
||||
#include "mozilla/EventForwards.h"
|
||||
#include "mozilla/dom/DataTransferItemBinding.h"
|
||||
#include "mozilla/dom/Directory.h"
|
||||
#include "mozilla/dom/DirectoryEntry.h"
|
||||
#include "mozilla/dom/DOMFileSystem.h"
|
||||
#include "mozilla/dom/Event.h"
|
||||
#include "mozilla/dom/FileEntry.h"
|
||||
#include "nsIClipboard.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
@ -268,6 +273,78 @@ DataTransferItem::GetAsFile(ErrorResult& aRv)
|
|||
return file.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<Entry>
|
||||
DataTransferItem::GetAsEntry(ErrorResult& aRv)
|
||||
{
|
||||
RefPtr<File> file = GetAsFile(aRv);
|
||||
if (NS_WARN_IF(aRv.Failed()) || !file) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIGlobalObject> global;
|
||||
RefPtr<DataTransfer> dataTransfer;
|
||||
RefPtr<DataTransferItemList> list = GetParentObject();
|
||||
if (!list) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
dataTransfer = list->GetParentObject();
|
||||
if (!dataTransfer) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// This is annoying, but DataTransfer may have various things as parent.
|
||||
nsCOMPtr<EventTarget> target =
|
||||
do_QueryInterface(dataTransfer->GetParentObject());
|
||||
if (target) {
|
||||
global = target->GetOwnerGlobal();
|
||||
} else {
|
||||
nsCOMPtr<nsIDOMEvent> event =
|
||||
do_QueryInterface(dataTransfer->GetParentObject());
|
||||
if (event) {
|
||||
global = event->InternalDOMEvent()->GetParentObject();
|
||||
}
|
||||
}
|
||||
|
||||
if (!global) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<DOMFileSystem> fs = DOMFileSystem::Create(global);
|
||||
RefPtr<Entry> entry;
|
||||
BlobImpl* impl = file->Impl();
|
||||
MOZ_ASSERT(impl);
|
||||
|
||||
if (impl->IsDirectory()) {
|
||||
nsAutoString fullpath;
|
||||
impl->GetMozFullPathInternal(fullpath, aRv);
|
||||
if (aRv.Failed()) {
|
||||
aRv.SuppressException();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIFile> directoryFile;
|
||||
nsresult rv = NS_NewNativeLocalFile(NS_ConvertUTF16toUTF8(fullpath),
|
||||
true, getter_AddRefs(directoryFile));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<Directory> directory = Directory::Create(global, directoryFile);
|
||||
entry = new DirectoryEntry(global, directory, fs);
|
||||
} else {
|
||||
entry = new FileEntry(global, file, fs);
|
||||
}
|
||||
|
||||
Sequence<RefPtr<Entry>> entries;
|
||||
if (!entries.AppendElement(entry, fallible)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
fs->CreateRoot(entries);
|
||||
return entry.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<File>
|
||||
DataTransferItem::CreateFileFromInputStream(nsIInputStream* aStream)
|
||||
{
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class Entry;
|
||||
class FunctionStringCallback;
|
||||
|
||||
class DataTransferItem final : public nsISupports
|
||||
|
@ -74,6 +75,8 @@ public:
|
|||
|
||||
already_AddRefed<File> GetAsFile(ErrorResult& aRv);
|
||||
|
||||
already_AddRefed<Entry> GetAsEntry(ErrorResult& aRv);
|
||||
|
||||
DataTransferItemList* GetParentObject() const
|
||||
{
|
||||
return mParent;
|
||||
|
|
|
@ -243,6 +243,13 @@ public:
|
|||
static nsIContent* GetShadowRelatedTarget(nsIContent* aCurrentTarget,
|
||||
nsIContent* aRelatedTarget);
|
||||
|
||||
void MarkUninitialized()
|
||||
{
|
||||
mEvent->mMessage = eVoidEvent;
|
||||
mEvent->mSpecifiedEventTypeString.Truncate();
|
||||
mEvent->mSpecifiedEventType = nullptr;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
// Internal helper functions
|
||||
|
|
|
@ -879,7 +879,10 @@ EventDispatcher::CreateEvent(EventTarget* aOwner,
|
|||
return NS_NewDOMMutationEvent(aOwner, aPresContext, nullptr);
|
||||
if (aEventType.LowerCaseEqualsLiteral("deviceorientationevent")) {
|
||||
DeviceOrientationEventInit init;
|
||||
return DeviceOrientationEvent::Constructor(aOwner, EmptyString(), init);
|
||||
RefPtr<Event> event =
|
||||
DeviceOrientationEvent::Constructor(aOwner, EmptyString(), init);
|
||||
event->MarkUninitialized();
|
||||
return event.forget();
|
||||
}
|
||||
if (aEventType.LowerCaseEqualsLiteral("devicemotionevent"))
|
||||
return NS_NewDOMDeviceMotionEvent(aOwner, aPresContext, nullptr);
|
||||
|
@ -918,7 +921,10 @@ EventDispatcher::CreateEvent(EventTarget* aOwner,
|
|||
// XXXkhuey this is broken
|
||||
if (aEventType.LowerCaseEqualsLiteral("pagetransition")) {
|
||||
PageTransitionEventInit init;
|
||||
return PageTransitionEvent::Constructor(aOwner, EmptyString(), init);
|
||||
RefPtr<Event> event =
|
||||
PageTransitionEvent::Constructor(aOwner, EmptyString(), init);
|
||||
event->MarkUninitialized();
|
||||
return event.forget();
|
||||
}
|
||||
if (aEventType.LowerCaseEqualsLiteral("scrollareaevent"))
|
||||
return NS_NewDOMScrollAreaEvent(aOwner, aPresContext, nullptr);
|
||||
|
@ -928,14 +934,20 @@ EventDispatcher::CreateEvent(EventTarget* aOwner,
|
|||
if (aEventType.LowerCaseEqualsLiteral("popstateevent")) {
|
||||
AutoJSContext cx;
|
||||
RootedDictionary<PopStateEventInit> init(cx);
|
||||
return PopStateEvent::Constructor(aOwner, EmptyString(), init);
|
||||
RefPtr<Event> event =
|
||||
PopStateEvent::Constructor(aOwner, EmptyString(), init);
|
||||
event->MarkUninitialized();
|
||||
return event.forget();
|
||||
}
|
||||
if (aEventType.LowerCaseEqualsLiteral("touchevent") &&
|
||||
TouchEvent::PrefEnabled(nsContentUtils::GetDocShellForEventTarget(aOwner)))
|
||||
return NS_NewDOMTouchEvent(aOwner, aPresContext, nullptr);
|
||||
if (aEventType.LowerCaseEqualsLiteral("hashchangeevent")) {
|
||||
HashChangeEventInit init;
|
||||
return HashChangeEvent::Constructor(aOwner, EmptyString(), init);
|
||||
RefPtr<Event> event =
|
||||
HashChangeEvent::Constructor(aOwner, EmptyString(), init);
|
||||
event->MarkUninitialized();
|
||||
return event.forget();
|
||||
}
|
||||
if (aEventType.LowerCaseEqualsLiteral("customevent"))
|
||||
return NS_NewDOMCustomEvent(aOwner, aPresContext, nullptr);
|
||||
|
|
|
@ -101,63 +101,29 @@ support-files =
|
|||
support-files = pointerevent_setpointercapture_invalid_pointerid-manual.html
|
||||
[test_pointerevent_setpointercapture_relatedtarget-manual.html]
|
||||
support-files = pointerevent_setpointercapture_relatedtarget-manual.html
|
||||
[test_pointerevent_touch-action-auto-css_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-auto-css_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-button-test_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-button-test_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-illegal.html]
|
||||
support-files = pointerevent_touch-action-illegal.html
|
||||
[test_pointerevent_touch-action-inherit_child-auto-child-none_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-inherit_child-auto-child-none_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-inherit_child-none_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-inherit_child-none_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-inherit_child-pan-x-child-pan-x_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-inherit_child-pan-x-child-pan-x_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-inherit_child-pan-x-child-pan-y_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-inherit_child-pan-x-child-pan-y_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-inherit_highest-parent-none_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-inherit_highest-parent-none_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-inherit_parent-none_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-inherit_parent-none_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-keyboard-manual.html]
|
||||
support-files = pointerevent_touch-action-keyboard-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-mouse-manual.html]
|
||||
support-files = pointerevent_touch-action-mouse-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-none-css_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-none-css_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-pan-x-css_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-pan-x-css_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-pan-x-pan-y-pan-y_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-pan-x-pan-y-pan-y_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-pan-x-pan-y_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-pan-x-pan-y_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-pan-y-css_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-pan-y-css_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-span-test_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-span-test_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-svg-test_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-svg-test_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-table-test_touch-manual.html]
|
||||
support-files = pointerevent_touch-action-table-test_touch-manual.html
|
||||
disabled = disabled
|
||||
[test_pointerevent_touch-action-verification.html]
|
||||
support-files = pointerevent_touch-action-verification.html
|
||||
[test_touch_action.html]
|
||||
# Windows touch injection doesn't work in automation, but this test can be run locally on a windows touch device.
|
||||
skip-if = (toolkit == 'windows')
|
||||
support-files =
|
||||
../../../../gfx/layers/apz/test/mochitest/apz_test_utils.js
|
||||
../../../../gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js
|
||||
touch_action_helpers.js
|
||||
pointerevent_touch-action-auto-css_touch-manual.html
|
||||
pointerevent_touch-action-button-test_touch-manual.html
|
||||
pointerevent_touch-action-inherit_child-auto-child-none_touch-manual.html
|
||||
pointerevent_touch-action-inherit_child-none_touch-manual.html
|
||||
pointerevent_touch-action-inherit_child-pan-x-child-pan-x_touch-manual.html
|
||||
pointerevent_touch-action-inherit_child-pan-x-child-pan-y_touch-manual.html
|
||||
pointerevent_touch-action-inherit_highest-parent-none_touch-manual.html
|
||||
pointerevent_touch-action-inherit_parent-none_touch-manual.html
|
||||
pointerevent_touch-action-none-css_touch-manual.html
|
||||
pointerevent_touch-action-pan-x-css_touch-manual.html
|
||||
pointerevent_touch-action-pan-x-pan-y-pan-y_touch-manual.html
|
||||
pointerevent_touch-action-pan-x-pan-y_touch-manual.html
|
||||
pointerevent_touch-action-pan-y-css_touch-manual.html
|
||||
pointerevent_touch-action-span-test_touch-manual.html
|
||||
pointerevent_touch-action-svg-test_touch-manual.html
|
||||
pointerevent_touch-action-table-test_touch-manual.html
|
||||
|
||||
[test_empty_file.html]
|
||||
disabled = disabled # Bug 1150091 - Issue with support-files
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
width: 700px;
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
height: 150px;
|
||||
|
@ -27,11 +26,9 @@
|
|||
</style>
|
||||
</head>
|
||||
<body onload="run()">
|
||||
<!--
|
||||
<h2>Pointer Events touch-action attribute support</h2>
|
||||
<h4 id="desc">Test Description: Try to scroll black element DOWN moving your touch outside of the red border. Wait for description update.</h4>
|
||||
<p>Note: this test is for touch only</p>
|
||||
-->
|
||||
<div id="target0">
|
||||
<button>Test Button</button>
|
||||
</div>
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
width: 700px;
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
.scroller > div {
|
||||
touch-action: auto;
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
.scroller > div {
|
||||
touch-action: none;
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
.scroller > div {
|
||||
touch-action: pan-x;
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
.scroller > div {
|
||||
touch-action: pan-x;
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#divParent {
|
||||
touch-action: none;
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
.scroller {
|
||||
touch-action: none;
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
width: 700px;
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
width: 700px;
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
width: 700px;
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
width: 700px;
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
.scroller > div {
|
||||
touch-action: pan-x pan-y;
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
width: 700px;
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
width: 700px;
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
height: 150px;
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
height: 350px;
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
height: 150px;
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<!--script src="/resources/testharnessreport.js"></script-->
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="pointerevent_support.js"></script>
|
||||
<script src="mochitest_support_internal.js"></script>
|
||||
<style>
|
||||
#target0 {
|
||||
width: 700px;
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-auto-css_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-button-test_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-illegal.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
// Function should be, but can be empty
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-inherit_child-auto-child-none_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-inherit_child-none_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-inherit_child-pan-x-child-pan-x_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-inherit_child-pan-x-child-pan-y_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-inherit_highest-parent-none_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-inherit_parent-none_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-keyboard-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,31 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-mouse-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointerdown", MouseEvent.MOZ_SOURCE_MOUSE);
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE);
|
||||
sendPointerEvent(int_win, "log", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE);
|
||||
sendPointerEvent(int_win, "log", "pointerup", MouseEvent.MOZ_SOURCE_MOUSE);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-none-css_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-pan-x-css_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-pan-x-pan-y-pan-y_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-pan-x-pan-y_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-pan-y-css_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-span-test_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-svg-test_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-table-test_touch-manual.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
sendPointerEvent(int_win, "target0", "pointermove", MouseEvent.MOZ_SOURCE_MOUSE, {button:-1});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1000870</title>
|
||||
<meta name="author" content="Maksim Lebedev" />
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="text/javascript" src="mochitest_support_external.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function startTest() {
|
||||
var iframe = document.getElementById("testFrame");
|
||||
iframe.src = "pointerevent_touch-action-verification.html";
|
||||
}
|
||||
function executeTest(int_win) {
|
||||
// Function should be, but can be empty
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe id="testFrame" height="800" width="1000"></iframe>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,99 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>W3C pointerevents/*touch-action*.html tests in Mochitest form</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="apz_test_utils.js"></script>
|
||||
<script type="application/javascript" src="apz_test_native_event_utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
var apz_touch_action_prefs = [
|
||||
// Obviously we need touch-action support enabled for testing touch-action.
|
||||
["layout.css.touch_action.enabled", true],
|
||||
// Dropping the touch slop to 0 makes the tests easier to write because
|
||||
// we can just do a one-pixel drag to get over the pan threshold rather
|
||||
// than having to hard-code some larger value.
|
||||
["apz.touch_start_tolerance", "0.0"],
|
||||
// The touchstart from the drag can turn into a long-tap if the touch-move
|
||||
// events get held up. Try to prevent that by making long-taps require
|
||||
// a 10 second hold. Note that we also cannot enable chaos mode on this
|
||||
// test for this reason, since chaos mode can cause the long-press timer
|
||||
// to fire sooner than the pref dictates.
|
||||
["ui.click_hold_context_menus.delay", 10000],
|
||||
// The subtests in this test do touch-drags to pan the page, but we don't
|
||||
// want those pans to turn into fling animations, so we increase the
|
||||
// fling-stop threshold velocity to absurdly high.
|
||||
["apz.fling_stopped_threshold", "10000"],
|
||||
// The helper_div_pan's div gets a displayport on scroll, but if the
|
||||
// test takes too long the displayport can expire before the new scroll
|
||||
// position is synced back to the main thread. So we disable displayport
|
||||
// expiry for these tests.
|
||||
["apz.displayport_expiry_ms", 0],
|
||||
];
|
||||
|
||||
function apzScriptInjector(name) {
|
||||
return function(childWin) {
|
||||
childWin._ACTIVE_TEST_NAME = name;
|
||||
injectScript('/tests/SimpleTest/paint_listener.js', childWin)()
|
||||
.then(injectScript('apz_test_utils.js', childWin))
|
||||
.then(injectScript('apz_test_native_event_utils.js', childWin))
|
||||
.then(injectScript('touch_action_helpers.js', childWin));
|
||||
};
|
||||
}
|
||||
|
||||
// Each of these test names is turned into an entry in the |subtests| array
|
||||
// below.
|
||||
var testnames = [
|
||||
'pointerevent_touch-action-auto-css_touch-manual',
|
||||
'pointerevent_touch-action-button-test_touch-manual',
|
||||
// this one runs as a web-platform-test since it's not a manual test
|
||||
// 'pointerevent_touch-action-illegal',
|
||||
'pointerevent_touch-action-inherit_child-auto-child-none_touch-manual',
|
||||
'pointerevent_touch-action-inherit_child-none_touch-manual',
|
||||
'pointerevent_touch-action-inherit_child-pan-x-child-pan-x_touch-manual',
|
||||
'pointerevent_touch-action-inherit_child-pan-x-child-pan-y_touch-manual',
|
||||
'pointerevent_touch-action-inherit_highest-parent-none_touch-manual',
|
||||
'pointerevent_touch-action-inherit_parent-none_touch-manual',
|
||||
// the keyboard-manual and mouse-manual tests require simulating keyboard/
|
||||
// mouse input, rather than touch, so we're not going to do that here.
|
||||
//'pointerevent_touch-action-keyboard-manual',
|
||||
//'pointerevent_touch-action-mouse-manual',
|
||||
'pointerevent_touch-action-none-css_touch-manual',
|
||||
'pointerevent_touch-action-pan-x-css_touch-manual',
|
||||
'pointerevent_touch-action-pan-x-pan-y-pan-y_touch-manual',
|
||||
'pointerevent_touch-action-pan-x-pan-y_touch-manual',
|
||||
'pointerevent_touch-action-pan-y-css_touch-manual',
|
||||
'pointerevent_touch-action-span-test_touch-manual',
|
||||
'pointerevent_touch-action-svg-test_touch-manual',
|
||||
'pointerevent_touch-action-table-test_touch-manual',
|
||||
// this one runs as a web-platform-test since it's not a manual test
|
||||
//'pointerevent_touch-action-verification',
|
||||
];
|
||||
|
||||
// Each entry in |subtests| is loaded in a new window. When loaded, it runs
|
||||
// the function returned by apzScriptInjector, which injects some helper JS
|
||||
// files into the vanilla unmodified W3C testcase, and simulates the necessary
|
||||
// user input to run the test.
|
||||
var subtests = [];
|
||||
for (var name of testnames) {
|
||||
subtests.push({
|
||||
'file': name + '.html',
|
||||
'prefs': apz_touch_action_prefs,
|
||||
'onload': apzScriptInjector(name),
|
||||
});
|
||||
}
|
||||
|
||||
if (isApzEnabled()) {
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
window.onload = function() {
|
||||
runSubtestsSeriallyInFreshWindows(subtests)
|
||||
.then(SimpleTest.finish);
|
||||
};
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,206 @@
|
|||
// Some common helpers
|
||||
|
||||
function touchActionSetup(testDriver) {
|
||||
add_completion_callback(subtestDone);
|
||||
document.body.addEventListener('touchend', testDriver, { passive: true });
|
||||
}
|
||||
|
||||
function touchScrollRight(aSelector = '#target0', aX = 20, aY = 20) {
|
||||
var target = document.querySelector(aSelector);
|
||||
return ok(synthesizeNativeTouchDrag(target, aX + 40, aY, -40, 0), "Synthesized horizontal drag");
|
||||
}
|
||||
|
||||
function touchScrollDown(aSelector = '#target0', aX = 20, aY = 20) {
|
||||
var target = document.querySelector(aSelector);
|
||||
return ok(synthesizeNativeTouchDrag(target, aX, aY + 40, 0, -40), "Synthesized vertical drag");
|
||||
}
|
||||
|
||||
function tapComplete() {
|
||||
var button = document.getElementById('btnComplete');
|
||||
return button.click();
|
||||
}
|
||||
|
||||
// The main body functions to simulate the input events required for the named test
|
||||
|
||||
function* pointerevent_touch_action_auto_css_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollRight();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollDown();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_button_test_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield setTimeout(testDriver, 2 * scrollReturnInterval);
|
||||
yield touchScrollRight();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield setTimeout(testDriver, 2 * scrollReturnInterval);
|
||||
yield touchScrollDown('#target0 > button');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight('#target0 > button');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield tapComplete();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_inherit_child_auto_child_none_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown('#target0 > div div');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight('#target0 > div div');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield tapComplete();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_inherit_child_none_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown('#target0 > div');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight('#target0 > div');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield tapComplete();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_inherit_child_pan_x_child_pan_x_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown('#target0 > div div');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight('#target0 > div div');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield tapComplete();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_inherit_child_pan_x_child_pan_y_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown('#target0 > div div');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight('#target0 > div div');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield tapComplete();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_inherit_highest_parent_none_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown('#target0 > div');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight('#target0 > div');
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_inherit_parent_none_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield tapComplete();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_none_css_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield tapComplete();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_pan_x_css_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield tapComplete();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_pan_x_pan_y_pan_y_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown('#target0 > div div');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight('#target0 > div div');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield tapComplete();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_pan_x_pan_y_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_pan_y_css_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield tapComplete();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_span_test_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield setTimeout(testDriver, 2 * scrollReturnInterval);
|
||||
yield touchScrollRight();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield setTimeout(testDriver, 2 * scrollReturnInterval);
|
||||
yield touchScrollDown('#testspan');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight('#testspan');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield tapComplete();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_svg_test_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield setTimeout(testDriver, 2 * scrollReturnInterval);
|
||||
yield touchScrollRight();
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield setTimeout(testDriver, 2 * scrollReturnInterval);
|
||||
yield touchScrollDown('#target0', 250, 250);
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight('#target0', 250, 250);
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield tapComplete();
|
||||
}
|
||||
|
||||
function* pointerevent_touch_action_table_test_touch_manual(testDriver) {
|
||||
touchActionSetup(testDriver);
|
||||
|
||||
yield touchScrollDown('#row1');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield setTimeout(testDriver, 2 * scrollReturnInterval);
|
||||
yield touchScrollRight('#row1');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield setTimeout(testDriver, 2 * scrollReturnInterval);
|
||||
yield touchScrollDown('#cell3');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield touchScrollRight('#cell3');
|
||||
yield waitForApzFlushedRepaints(testDriver);
|
||||
yield tapComplete();
|
||||
}
|
||||
|
||||
// This the stuff that runs the appropriate body function above
|
||||
|
||||
var test = eval(_ACTIVE_TEST_NAME.replace(/-/g, '_'));
|
||||
waitUntilApzStable().then(runContinuation(test));
|
|
@ -75,6 +75,16 @@ void
|
|||
FileEntry::GetFullPath(nsAString& aPath, ErrorResult& aRv) const
|
||||
{
|
||||
mFile->GetPath(aPath);
|
||||
if (aPath.IsEmpty()) {
|
||||
// We're under the root directory. webkitRelativePath
|
||||
// (implemented as GetPath) is for cases when file is selected because its
|
||||
// ancestor directory is selected. But that is not the case here, so need to
|
||||
// manually prepend '/'.
|
||||
nsAutoString name;
|
||||
mFile->GetName(name);
|
||||
aPath.AssignLiteral(FILESYSTEM_DOM_PATH_SEPARATOR_LITERAL);
|
||||
aPath.Append(name);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -2839,6 +2839,11 @@ HTMLInputElement::SetFilesOrDirectories(const nsTArray<OwningFileOrDirectory>& a
|
|||
{
|
||||
ClearGetFilesHelpers();
|
||||
|
||||
if (Preferences::GetBool("dom.webkitBlink.filesystem.enabled", false)) {
|
||||
HTMLInputElementBinding::ClearCachedWebkitEntriesValue(this);
|
||||
mEntries.Clear();
|
||||
}
|
||||
|
||||
mFilesOrDirectories.Clear();
|
||||
mFilesOrDirectories.AppendElements(aFilesOrDirectories);
|
||||
|
||||
|
@ -2853,6 +2858,11 @@ HTMLInputElement::SetFiles(nsIDOMFileList* aFiles,
|
|||
mFilesOrDirectories.Clear();
|
||||
ClearGetFilesHelpers();
|
||||
|
||||
if (Preferences::GetBool("dom.webkitBlink.filesystem.enabled", false)) {
|
||||
HTMLInputElementBinding::ClearCachedWebkitEntriesValue(this);
|
||||
mEntries.Clear();
|
||||
}
|
||||
|
||||
if (aFiles) {
|
||||
uint32_t listLength;
|
||||
aFiles->GetLength(&listLength);
|
||||
|
@ -2869,12 +2879,12 @@ HTMLInputElement::SetFiles(nsIDOMFileList* aFiles,
|
|||
void
|
||||
HTMLInputElement::MozSetDndFilesAndDirectories(const nsTArray<OwningFileOrDirectory>& aFilesOrDirectories)
|
||||
{
|
||||
SetFilesOrDirectories(aFilesOrDirectories, true);
|
||||
|
||||
if (Preferences::GetBool("dom.webkitBlink.filesystem.enabled", false)) {
|
||||
UpdateEntries(aFilesOrDirectories);
|
||||
}
|
||||
|
||||
SetFilesOrDirectories(aFilesOrDirectories, true);
|
||||
|
||||
RefPtr<DispatchChangeEventCallback> dispatchChangeEventCallback =
|
||||
new DispatchChangeEventCallback(this);
|
||||
|
||||
|
@ -8100,7 +8110,7 @@ HTMLInputElement::GetOrCreateGetFilesHelper(bool aRecursiveFlag,
|
|||
void
|
||||
HTMLInputElement::UpdateEntries(const nsTArray<OwningFileOrDirectory>& aFilesOrDirectories)
|
||||
{
|
||||
mEntries.Clear();
|
||||
MOZ_ASSERT(mEntries.IsEmpty());
|
||||
|
||||
nsCOMPtr<nsIGlobalObject> global = OwnerDoc()->GetScopeObject();
|
||||
MOZ_ASSERT(global);
|
||||
|
|
|
@ -806,6 +806,8 @@ public:
|
|||
*/
|
||||
static Decimal StringToDecimal(const nsAString& aValue);
|
||||
|
||||
void UpdateEntries(const nsTArray<OwningFileOrDirectory>& aFilesOrDirectories);
|
||||
|
||||
protected:
|
||||
virtual ~HTMLInputElement();
|
||||
|
||||
|
@ -966,8 +968,6 @@ protected:
|
|||
*/
|
||||
void UpdateFileList();
|
||||
|
||||
void UpdateEntries(const nsTArray<OwningFileOrDirectory>& aFilesOrDirectories);
|
||||
|
||||
/**
|
||||
* Called after calling one of the SetFilesOrDirectories() functions.
|
||||
* This method can explore the directory recursively if needed.
|
||||
|
|
|
@ -1713,7 +1713,16 @@ protected:
|
|||
|
||||
const bool mIsSlice;
|
||||
|
||||
const bool mIsDirectory;
|
||||
|
||||
public:
|
||||
|
||||
enum BlobImplIsDirectory
|
||||
{
|
||||
eNotDirectory,
|
||||
eDirectory
|
||||
};
|
||||
|
||||
// For File.
|
||||
RemoteBlobImpl(BlobChild* aActor,
|
||||
BlobImpl* aRemoteBlobImpl,
|
||||
|
@ -1722,6 +1731,7 @@ public:
|
|||
const nsAString& aPath,
|
||||
uint64_t aLength,
|
||||
int64_t aModDate,
|
||||
BlobImplIsDirectory aIsDirectory,
|
||||
bool aIsSameProcessBlob);
|
||||
|
||||
// For Blob.
|
||||
|
@ -1775,6 +1785,9 @@ public:
|
|||
virtual void
|
||||
GetMozFullPathInternal(nsAString& aFileName, ErrorResult& aRv) const override;
|
||||
|
||||
virtual bool
|
||||
IsDirectory() const override;
|
||||
|
||||
virtual already_AddRefed<BlobImpl>
|
||||
CreateSlice(uint64_t aStart,
|
||||
uint64_t aLength,
|
||||
|
@ -1948,6 +1961,9 @@ public:
|
|||
virtual void
|
||||
GetMozFullPathInternal(nsAString& aFileName, ErrorResult& aRv) const override;
|
||||
|
||||
virtual bool
|
||||
IsDirectory() const override;
|
||||
|
||||
virtual uint64_t
|
||||
GetSize(ErrorResult& aRv) override;
|
||||
|
||||
|
@ -2034,9 +2050,10 @@ RemoteBlobImpl::RemoteBlobImpl(BlobChild* aActor,
|
|||
const nsAString& aPath,
|
||||
uint64_t aLength,
|
||||
int64_t aModDate,
|
||||
BlobImplIsDirectory aIsDirectory,
|
||||
bool aIsSameProcessBlob)
|
||||
: BlobImplBase(aName, aContentType, aLength, aModDate)
|
||||
, mIsSlice(false)
|
||||
, mIsSlice(false), mIsDirectory(aIsDirectory == eDirectory)
|
||||
{
|
||||
SetPath(aPath);
|
||||
|
||||
|
@ -2058,7 +2075,7 @@ RemoteBlobImpl::RemoteBlobImpl(BlobChild* aActor,
|
|||
uint64_t aLength,
|
||||
bool aIsSameProcessBlob)
|
||||
: BlobImplBase(aContentType, aLength)
|
||||
, mIsSlice(false)
|
||||
, mIsSlice(false), mIsDirectory(false)
|
||||
{
|
||||
if (aIsSameProcessBlob) {
|
||||
MOZ_ASSERT(aRemoteBlobImpl);
|
||||
|
@ -2074,7 +2091,7 @@ RemoteBlobImpl::RemoteBlobImpl(BlobChild* aActor,
|
|||
BlobChild::
|
||||
RemoteBlobImpl::RemoteBlobImpl(BlobChild* aActor)
|
||||
: BlobImplBase(EmptyString(), EmptyString(), UINT64_MAX, INT64_MAX)
|
||||
, mIsSlice(false)
|
||||
, mIsSlice(false), mIsDirectory(false)
|
||||
{
|
||||
CommonInit(aActor);
|
||||
}
|
||||
|
@ -2084,6 +2101,7 @@ RemoteBlobImpl::RemoteBlobImpl(const nsAString& aContentType, uint64_t aLength)
|
|||
: BlobImplBase(aContentType, aLength)
|
||||
, mActor(nullptr)
|
||||
, mIsSlice(true)
|
||||
, mIsDirectory(false)
|
||||
{
|
||||
mImmutable = true;
|
||||
}
|
||||
|
@ -2196,6 +2214,13 @@ RemoteBlobImpl::GetMozFullPathInternal(nsAString& aFilePath,
|
|||
aFilePath = filePath;
|
||||
}
|
||||
|
||||
bool
|
||||
BlobChild::
|
||||
RemoteBlobImpl::IsDirectory() const
|
||||
{
|
||||
return mIsDirectory;
|
||||
}
|
||||
|
||||
already_AddRefed<BlobImpl>
|
||||
BlobChild::
|
||||
RemoteBlobImpl::CreateSlice(uint64_t aStart,
|
||||
|
@ -2643,6 +2668,13 @@ RemoteBlobImpl::GetMozFullPathInternal(nsAString& aFileName, ErrorResult& aRv) c
|
|||
mBlobImpl->GetMozFullPathInternal(aFileName, aRv);
|
||||
}
|
||||
|
||||
bool
|
||||
BlobParent::
|
||||
RemoteBlobImpl::IsDirectory() const
|
||||
{
|
||||
return mBlobImpl->IsDirectory();
|
||||
}
|
||||
|
||||
uint64_t
|
||||
BlobParent::
|
||||
RemoteBlobImpl::GetSize(ErrorResult& aRv)
|
||||
|
@ -2953,9 +2985,14 @@ BlobChild::CommonInit(BlobChild* aOther, BlobImpl* aBlobImpl)
|
|||
int64_t modDate = otherImpl->GetLastModified(rv);
|
||||
MOZ_ASSERT(!rv.Failed());
|
||||
|
||||
RemoteBlobImpl::BlobImplIsDirectory directory = otherImpl->IsDirectory() ?
|
||||
RemoteBlobImpl::BlobImplIsDirectory::eDirectory :
|
||||
RemoteBlobImpl::BlobImplIsDirectory::eNotDirectory;
|
||||
|
||||
remoteBlob =
|
||||
new RemoteBlobImpl(this, otherImpl, name, contentType, path,
|
||||
length, modDate, false /* SameProcessBlobImpl */);
|
||||
length, modDate, directory,
|
||||
false /* SameProcessBlobImpl */);
|
||||
} else {
|
||||
remoteBlob = new RemoteBlobImpl(this, otherImpl, contentType, length,
|
||||
false /* SameProcessBlobImpl */);
|
||||
|
@ -3001,6 +3038,9 @@ BlobChild::CommonInit(const ChildBlobConstructorParams& aParams)
|
|||
case AnyBlobConstructorParams::TFileBlobConstructorParams: {
|
||||
const FileBlobConstructorParams& params =
|
||||
blobParams.get_FileBlobConstructorParams();
|
||||
RemoteBlobImpl::BlobImplIsDirectory directory = params.isDirectory() ?
|
||||
RemoteBlobImpl::BlobImplIsDirectory::eDirectory :
|
||||
RemoteBlobImpl::BlobImplIsDirectory::eNotDirectory;
|
||||
remoteBlob = new RemoteBlobImpl(this,
|
||||
nullptr,
|
||||
params.name(),
|
||||
|
@ -3008,6 +3048,7 @@ BlobChild::CommonInit(const ChildBlobConstructorParams& aParams)
|
|||
params.path(),
|
||||
params.length(),
|
||||
params.modDate(),
|
||||
directory,
|
||||
false /* SameProcessBlobImpl */);
|
||||
break;
|
||||
}
|
||||
|
@ -3039,6 +3080,11 @@ BlobChild::CommonInit(const ChildBlobConstructorParams& aParams)
|
|||
int64_t lastModifiedDate = blobImpl->GetLastModified(rv);
|
||||
MOZ_ASSERT(!rv.Failed());
|
||||
|
||||
RemoteBlobImpl::BlobImplIsDirectory directory =
|
||||
blobImpl->IsDirectory() ?
|
||||
RemoteBlobImpl::BlobImplIsDirectory::eDirectory :
|
||||
RemoteBlobImpl::BlobImplIsDirectory::eNotDirectory;
|
||||
|
||||
remoteBlob =
|
||||
new RemoteBlobImpl(this,
|
||||
blobImpl,
|
||||
|
@ -3047,6 +3093,7 @@ BlobChild::CommonInit(const ChildBlobConstructorParams& aParams)
|
|||
path,
|
||||
size,
|
||||
lastModifiedDate,
|
||||
directory,
|
||||
true /* SameProcessBlobImpl */);
|
||||
} else {
|
||||
remoteBlob = new RemoteBlobImpl(this, blobImpl, contentType, size,
|
||||
|
@ -3231,7 +3278,7 @@ BlobChild::GetOrCreateFromImpl(ChildManagerType* aManager,
|
|||
|
||||
blobParams =
|
||||
FileBlobConstructorParams(name, contentType, path, length, modDate,
|
||||
blobData);
|
||||
aBlobImpl->IsDirectory(), blobData);
|
||||
} else {
|
||||
blobParams = NormalBlobConstructorParams(contentType, length, blobData);
|
||||
}
|
||||
|
@ -3408,7 +3455,9 @@ BlobChild::SetMysteryBlobInfo(const nsString& aName,
|
|||
{
|
||||
AssertIsOnOwningThread();
|
||||
MOZ_ASSERT(mBlobImpl);
|
||||
MOZ_ASSERT(!mBlobImpl->IsDirectory());
|
||||
MOZ_ASSERT(mRemoteBlobImpl);
|
||||
MOZ_ASSERT(!mRemoteBlobImpl->IsDirectory());
|
||||
MOZ_ASSERT(aLastModifiedDate != INT64_MAX);
|
||||
|
||||
mBlobImpl->SetLazyData(aName, aContentType, aLength, aLastModifiedDate);
|
||||
|
@ -3418,6 +3467,7 @@ BlobChild::SetMysteryBlobInfo(const nsString& aName,
|
|||
EmptyString(),
|
||||
aLength,
|
||||
aLastModifiedDate,
|
||||
mBlobImpl->IsDirectory(),
|
||||
void_t() /* optionalBlobData */);
|
||||
return SendResolveMystery(params);
|
||||
}
|
||||
|
@ -3783,7 +3833,7 @@ BlobParent::GetOrCreateFromImpl(ParentManagerType* aManager,
|
|||
|
||||
blobParams =
|
||||
FileBlobConstructorParams(name, contentType, path, length, modDate,
|
||||
void_t());
|
||||
aBlobImpl->IsDirectory(), void_t());
|
||||
} else {
|
||||
blobParams = NormalBlobConstructorParams(contentType, length, void_t());
|
||||
}
|
||||
|
|
|
@ -579,6 +579,9 @@ ContentChild::ContentChild()
|
|||
|
||||
ContentChild::~ContentChild()
|
||||
{
|
||||
#ifndef NS_FREE_PERMANENT_DATA
|
||||
NS_RUNTIMEABORT("Content Child shouldn't be destroyed.");
|
||||
#endif
|
||||
}
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(ContentChild)
|
||||
|
|
|
@ -72,6 +72,7 @@ struct FileBlobConstructorParams
|
|||
nsString path;
|
||||
uint64_t length;
|
||||
int64_t modDate;
|
||||
bool isDirectory;
|
||||
|
||||
// This must be of type BlobData in a child->parent message, and will always
|
||||
// be of type void_t in a parent->child message.
|
||||
|
|
|
@ -43,7 +43,6 @@ parent:
|
|||
sync GetFileId()
|
||||
returns (int64_t fileId);
|
||||
|
||||
// Use only for testing!
|
||||
sync GetFilePath()
|
||||
returns (nsString filePath);
|
||||
|
||||
|
|
|
@ -1743,9 +1743,8 @@ TabChild::HandleDoubleTap(const CSSPoint& aPoint, const Modifiers& aModifiers,
|
|||
|
||||
// Note: there is nothing to do with the modifiers here, as we are not
|
||||
// synthesizing any sort of mouse event.
|
||||
CSSPoint point = APZCCallbackHelper::ApplyCallbackTransform(aPoint, aGuid);
|
||||
nsCOMPtr<nsIDocument> document = GetDocument();
|
||||
CSSRect zoomToRect = CalculateRectToZoomTo(document, point);
|
||||
CSSRect zoomToRect = CalculateRectToZoomTo(document, aPoint);
|
||||
// The double-tap can be dispatched by any scroll frame (so |aGuid| could be
|
||||
// the guid of any scroll frame), but the zoom-to-rect operation must be
|
||||
// performed by the root content scroll frame, so query its identifiers
|
||||
|
@ -1762,25 +1761,35 @@ TabChild::HandleDoubleTap(const CSSPoint& aPoint, const Modifiers& aModifiers,
|
|||
|
||||
void
|
||||
TabChild::HandleTap(GeckoContentController::TapType aType,
|
||||
const CSSPoint& aPoint, const Modifiers& aModifiers,
|
||||
const LayoutDevicePoint& aPoint, const Modifiers& aModifiers,
|
||||
const ScrollableLayerGuid& aGuid, const uint64_t& aInputBlockId,
|
||||
bool aCallTakeFocusForClickFromTap)
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> presShell = GetPresShell();
|
||||
if (!presShell) {
|
||||
return;
|
||||
}
|
||||
if (!presShell->GetPresContext()) {
|
||||
return;
|
||||
}
|
||||
CSSToLayoutDeviceScale scale(presShell->GetPresContext()->CSSToDevPixelScale());
|
||||
CSSPoint point = APZCCallbackHelper::ApplyCallbackTransform(aPoint / scale, aGuid);
|
||||
|
||||
switch (aType) {
|
||||
case GeckoContentController::TapType::eSingleTap:
|
||||
if (aCallTakeFocusForClickFromTap && mRemoteFrame) {
|
||||
mRemoteFrame->SendTakeFocusForClickFromTap();
|
||||
}
|
||||
if (mGlobal && mTabChildGlobal) {
|
||||
mAPZEventState->ProcessSingleTap(aPoint, aModifiers, aGuid);
|
||||
mAPZEventState->ProcessSingleTap(point, scale, aModifiers, aGuid);
|
||||
}
|
||||
break;
|
||||
case GeckoContentController::TapType::eDoubleTap:
|
||||
HandleDoubleTap(aPoint, aModifiers, aGuid);
|
||||
HandleDoubleTap(point, aModifiers, aGuid);
|
||||
break;
|
||||
case GeckoContentController::TapType::eLongTap:
|
||||
if (mGlobal && mTabChildGlobal) {
|
||||
mAPZEventState->ProcessLongTap(GetPresShell(), aPoint, aModifiers, aGuid,
|
||||
mAPZEventState->ProcessLongTap(presShell, point, scale, aModifiers, aGuid,
|
||||
aInputBlockId);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -623,7 +623,7 @@ public:
|
|||
void SetTargetAPZC(uint64_t aInputBlockId,
|
||||
const nsTArray<ScrollableLayerGuid>& aTargets) const;
|
||||
void HandleTap(layers::GeckoContentController::TapType aType,
|
||||
const CSSPoint& aPoint,
|
||||
const LayoutDevicePoint& aPoint,
|
||||
const Modifiers& aModifiers,
|
||||
const mozilla::layers::ScrollableLayerGuid& aGuid,
|
||||
const uint64_t& aInputBlockId,
|
||||
|
|
|
@ -1298,9 +1298,9 @@ TabParent::SendRealDragEvent(WidgetDragEvent& event, uint32_t aDragAction,
|
|||
return PBrowserParent::SendRealDragEvent(event, aDragAction, aDropEffect);
|
||||
}
|
||||
|
||||
CSSPoint TabParent::AdjustTapToChildWidget(const CSSPoint& aPoint)
|
||||
LayoutDevicePoint TabParent::AdjustTapToChildWidget(const LayoutDevicePoint& aPoint)
|
||||
{
|
||||
return aPoint + (LayoutDevicePoint(GetChildProcessOffset()) * GetLayoutDeviceToCSSScale());
|
||||
return aPoint + LayoutDevicePoint(GetChildProcessOffset());
|
||||
}
|
||||
|
||||
bool TabParent::SendMouseWheelEvent(WidgetWheelEvent& event)
|
||||
|
|
|
@ -568,7 +568,7 @@ public:
|
|||
}
|
||||
|
||||
LayoutDeviceIntPoint GetChildProcessOffset();
|
||||
CSSPoint AdjustTapToChildWidget(const CSSPoint& aPoint);
|
||||
LayoutDevicePoint AdjustTapToChildWidget(const LayoutDevicePoint& aPoint);
|
||||
|
||||
/**
|
||||
* Native widget remoting protocol for use with windowed plugins with e10s.
|
||||
|
|
|
@ -35,3 +35,4 @@ CompositorAnimationWarningTransformSVG=Animations of ‘transform’ on elements
|
|||
CompositorAnimationWarningTransformWithGeometricProperties=Animations of ‘transform’ cannot be run on the compositor when geometric properties are animated on the same element at the same time
|
||||
CompositorAnimationWarningTransformFrameInactive=Animation cannot be run on the compositor because the frame was not marked active for ‘transform’ animation
|
||||
CompositorAnimationWarningOpacityFrameInactive=Animation cannot be run on the compositor because the frame was not marked active for ‘opacity’ animation
|
||||
CompositorAnimationWarningHasRenderingObserver=Animation cannot be run on the compositor because the element has rendering observers (-moz-element or SVG clipping/masking)
|
||||
|
|
|
@ -39,10 +39,10 @@ struct CreateDecoderParams {
|
|||
{}
|
||||
|
||||
template <typename T1, typename... Ts>
|
||||
CreateDecoderParams(const TrackInfo& aConfig, T1 a1, Ts... as)
|
||||
CreateDecoderParams(const TrackInfo& aConfig, T1&& a1, Ts&&... args)
|
||||
: mConfig(aConfig)
|
||||
{
|
||||
Set(a1, as...);
|
||||
Set(mozilla::Forward<T1>(a1), mozilla::Forward<Ts>(args)...);
|
||||
}
|
||||
|
||||
const VideoInfo& VideoConfig() const
|
||||
|
@ -73,13 +73,10 @@ private:
|
|||
void Set(layers::LayersBackend aLayersBackend) { mLayersBackend = aLayersBackend; }
|
||||
void Set(GMPCrashHelper* aCrashHelper) { mCrashHelper = aCrashHelper; }
|
||||
template <typename T1, typename T2, typename... Ts>
|
||||
void Set(T1 a1, T2 a2, Ts... as)
|
||||
void Set(T1&& a1, T2&& a2, Ts&&... args)
|
||||
{
|
||||
// Parameter pack expansion trick, to call Set() on each argument.
|
||||
using expander = int[];
|
||||
(void)expander {
|
||||
(Set(a1), 0), (Set(a2), 0), (Set(as), 0)...
|
||||
};
|
||||
Set(mozilla::Forward<T1>(a1));
|
||||
Set(mozilla::Forward<T2>(a2), mozilla::Forward<Ts>(args)...);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1236639: Crash on audio playback due to invalid XING headers</title>
|
||||
</head>
|
||||
<body>
|
||||
<audio autoplay src="1236639.mp3"></audio>
|
||||
</body>
|
||||
</html>
|
Двоичный файл не отображается.
|
@ -95,3 +95,4 @@ load oscillator-ended-2.html
|
|||
load video-replay-after-audio-end.html
|
||||
# This needs to run at the end to avoid leaking busted state into other tests.
|
||||
skip-if(B2G) load 691096-1.html # bug 852821
|
||||
load 1236639.html
|
||||
|
|
|
@ -27,4 +27,5 @@ interface DOMTokenList {
|
|||
[SetterThrows]
|
||||
attribute DOMString value;
|
||||
stringifier DOMString ();
|
||||
iterable<DOMString?>;
|
||||
};
|
||||
|
|
|
@ -17,3 +17,8 @@ interface DataTransferItem {
|
|||
};
|
||||
|
||||
callback FunctionStringCallback = void (DOMString data);
|
||||
|
||||
partial interface DataTransferItem {
|
||||
[Pref="dom.webkitBlink.filesystem.enabled", BinaryName="getAsEntry", Throws]
|
||||
Entry? webkitGetAsEntry();
|
||||
};
|
||||
|
|
|
@ -226,7 +226,7 @@ HTMLInputElement implements MozPhonetic;
|
|||
|
||||
// Webkit/Blink
|
||||
partial interface HTMLInputElement {
|
||||
[Pref="dom.webkitBlink.filesystem.enabled", Cached, Constant]
|
||||
[Pref="dom.webkitBlink.filesystem.enabled", Frozen, Cached, Pure]
|
||||
readonly attribute sequence<Entry> webkitEntries;
|
||||
|
||||
[Pref="dom.webkitBlink.dirPicker.enabled", BinaryName="WebkitDirectoryAttr", SetterThrows]
|
||||
|
|
|
@ -13,4 +13,5 @@
|
|||
interface NodeList {
|
||||
getter Node? item(unsigned long index);
|
||||
readonly attribute unsigned long length;
|
||||
iterable<Node?>;
|
||||
};
|
||||
|
|
|
@ -378,7 +378,13 @@ nsWindowWatcher::OpenWindow(mozIDOMWindowProxy* aParent,
|
|||
struct SizeSpec
|
||||
{
|
||||
SizeSpec()
|
||||
: mLeftSpecified(false)
|
||||
: mLeft(0)
|
||||
, mTop(0)
|
||||
, mOuterWidth(0)
|
||||
, mOuterHeight(0)
|
||||
, mInnerWidth(0)
|
||||
, mInnerHeight(0)
|
||||
, mLeftSpecified(false)
|
||||
, mTopSpecified(false)
|
||||
, mOuterWidthSpecified(false)
|
||||
, mOuterHeightSpecified(false)
|
||||
|
|
|
@ -50,8 +50,6 @@ CopyableCanvasLayer::~CopyableCanvasLayer()
|
|||
void
|
||||
CopyableCanvasLayer::Initialize(const Data& aData)
|
||||
{
|
||||
NS_ASSERTION(mSurface == nullptr, "BasicCanvasLayer::Initialize called twice!");
|
||||
|
||||
if (aData.mGLContext) {
|
||||
mGLContext = aData.mGLContext;
|
||||
mIsAlphaPremultiplied = aData.mIsGLAlphaPremult;
|
||||
|
@ -72,7 +70,7 @@ CopyableCanvasLayer::Initialize(const Data& aData)
|
|||
mAsyncRenderer = aData.mRenderer;
|
||||
mOriginPos = gl::OriginPos::BottomLeft;
|
||||
} else {
|
||||
MOZ_CRASH("GFX: CanvasLayer created without mSurface, mDrawTarget or mGLContext?");
|
||||
MOZ_CRASH("GFX: CanvasLayer created without BufferProvider, DrawTarget or GLContext?");
|
||||
}
|
||||
|
||||
mBounds.SetRect(0, 0, aData.mSize.width, aData.mSize.height);
|
||||
|
@ -84,112 +82,6 @@ CopyableCanvasLayer::IsDataValid(const Data& aData)
|
|||
return mGLContext == aData.mGLContext;
|
||||
}
|
||||
|
||||
void
|
||||
CopyableCanvasLayer::UpdateTarget(DrawTarget* aDestTarget)
|
||||
{
|
||||
AutoReturnSnapshot autoReturn;
|
||||
|
||||
if (mAsyncRenderer) {
|
||||
mSurface = mAsyncRenderer->GetSurface();
|
||||
} else if (!mGLFrontbuffer && mBufferProvider) {
|
||||
mSurface = mBufferProvider->BorrowSnapshot();
|
||||
if (aDestTarget) {
|
||||
// If !aDestTarget we'll end up painting using mSurface later,
|
||||
// so we can't return it to the provider (note that this will trigger a
|
||||
// copy of the snapshot behind the scenes when the provider is unlocked).
|
||||
autoReturn.mSnapshot = &mSurface;
|
||||
}
|
||||
// Either way we need to call ReturnSnapshot because ther may be an
|
||||
// underlying TextureClient that has to be unlocked.
|
||||
autoReturn.mBufferProvider = mBufferProvider;
|
||||
}
|
||||
|
||||
if (!mGLContext && aDestTarget) {
|
||||
NS_ASSERTION(mSurface, "Must have surface to draw!");
|
||||
if (mSurface) {
|
||||
aDestTarget->CopySurface(mSurface,
|
||||
IntRect(0, 0, mBounds.width, mBounds.height),
|
||||
IntPoint(0, 0));
|
||||
mSurface = nullptr;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ((!mGLFrontbuffer && mBufferProvider) || mAsyncRenderer) {
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mGLContext);
|
||||
|
||||
SharedSurface* frontbuffer = nullptr;
|
||||
if (mGLFrontbuffer) {
|
||||
frontbuffer = mGLFrontbuffer.get();
|
||||
} else {
|
||||
GLScreenBuffer* screen = mGLContext->Screen();
|
||||
const auto& front = screen->Front();
|
||||
if (front) {
|
||||
frontbuffer = front->Surf();
|
||||
}
|
||||
}
|
||||
|
||||
if (!frontbuffer) {
|
||||
NS_WARNING("Null frame received.");
|
||||
return;
|
||||
}
|
||||
|
||||
IntSize readSize(frontbuffer->mSize);
|
||||
SurfaceFormat format = (GetContentFlags() & CONTENT_OPAQUE)
|
||||
? SurfaceFormat::B8G8R8X8
|
||||
: SurfaceFormat::B8G8R8A8;
|
||||
bool needsPremult = frontbuffer->mHasAlpha && !mIsAlphaPremultiplied;
|
||||
|
||||
// Try to read back directly into aDestTarget's output buffer
|
||||
if (aDestTarget) {
|
||||
uint8_t* destData;
|
||||
IntSize destSize;
|
||||
int32_t destStride;
|
||||
SurfaceFormat destFormat;
|
||||
if (aDestTarget->LockBits(&destData, &destSize, &destStride, &destFormat)) {
|
||||
if (destSize == readSize && destFormat == format) {
|
||||
RefPtr<DataSourceSurface> data =
|
||||
Factory::CreateWrappingDataSourceSurface(destData, destStride, destSize, destFormat);
|
||||
mGLContext->Readback(frontbuffer, data);
|
||||
if (needsPremult) {
|
||||
gfxUtils::PremultiplyDataSurface(data, data);
|
||||
}
|
||||
aDestTarget->ReleaseBits(destData);
|
||||
return;
|
||||
}
|
||||
aDestTarget->ReleaseBits(destData);
|
||||
}
|
||||
}
|
||||
|
||||
RefPtr<DataSourceSurface> resultSurf = GetTempSurface(readSize, format);
|
||||
// There will already be a warning from inside of GetTempSurface, but
|
||||
// it doesn't hurt to complain:
|
||||
if (NS_WARN_IF(!resultSurf)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Readback handles Flush/MarkDirty.
|
||||
mGLContext->Readback(frontbuffer, resultSurf);
|
||||
if (needsPremult) {
|
||||
gfxUtils::PremultiplyDataSurface(resultSurf, resultSurf);
|
||||
}
|
||||
MOZ_ASSERT(resultSurf);
|
||||
|
||||
if (aDestTarget) {
|
||||
aDestTarget->CopySurface(resultSurf,
|
||||
IntRect(0, 0, readSize.width, readSize.height),
|
||||
IntPoint(0, 0));
|
||||
} else {
|
||||
// If !aDestSurface then we will end up painting using mSurface, so
|
||||
// stick our surface into mSurface, so that the Paint() path is the same.
|
||||
mSurface = resultSurf;
|
||||
}
|
||||
}
|
||||
|
||||
DataSourceSurface*
|
||||
CopyableCanvasLayer::GetTempSurface(const IntSize& aSize,
|
||||
const SurfaceFormat aFormat)
|
||||
|
@ -206,11 +98,5 @@ CopyableCanvasLayer::GetTempSurface(const IntSize& aSize,
|
|||
return mCachedTempSurface;
|
||||
}
|
||||
|
||||
void
|
||||
CopyableCanvasLayer::DiscardTempSurface()
|
||||
{
|
||||
mCachedTempSurface = nullptr;
|
||||
}
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -47,13 +47,8 @@ public:
|
|||
bool IsGLLayer() { return !!mGLContext; }
|
||||
|
||||
protected:
|
||||
void UpdateTarget(gfx::DrawTarget* aDestTarget = nullptr);
|
||||
|
||||
RefPtr<gfx::SourceSurface> mSurface;
|
||||
RefPtr<gl::GLContext> mGLContext;
|
||||
GLuint mCanvasFrontbufferTexID;
|
||||
RefPtr<PersistentBufferProvider> mBufferProvider;
|
||||
|
||||
UniquePtr<gl::SharedSurface> mGLFrontbuffer;
|
||||
|
||||
bool mIsAlphaPremultiplied;
|
||||
|
@ -64,8 +59,6 @@ protected:
|
|||
|
||||
gfx::DataSourceSurface* GetTempSurface(const gfx::IntSize& aSize,
|
||||
const gfx::SurfaceFormat aFormat);
|
||||
|
||||
void DiscardTempSurface();
|
||||
};
|
||||
|
||||
} // namespace layers
|
||||
|
|
|
@ -55,11 +55,11 @@ public:
|
|||
};
|
||||
|
||||
/**
|
||||
* Requests handling of a tap event. |aPoint| is in CSS pixels, relative to the
|
||||
* Requests handling of a tap event. |aPoint| is in LD pixels, relative to the
|
||||
* current scroll offset.
|
||||
*/
|
||||
virtual void HandleTap(TapType aType,
|
||||
const CSSPoint& aPoint,
|
||||
const LayoutDevicePoint& aPoint,
|
||||
Modifiers aModifiers,
|
||||
const ScrollableLayerGuid& aGuid,
|
||||
uint64_t aInputBlockId) = 0;
|
||||
|
|
|
@ -890,6 +890,9 @@ ConvertToTouchBehavior(HitTestResult result)
|
|||
return AllowedTouchBehavior::HORIZONTAL_PAN;
|
||||
case HitLayerTouchActionPanY:
|
||||
return AllowedTouchBehavior::VERTICAL_PAN;
|
||||
case HitLayerTouchActionPanXY:
|
||||
return AllowedTouchBehavior::HORIZONTAL_PAN
|
||||
| AllowedTouchBehavior::VERTICAL_PAN;
|
||||
case HitDispatchToContentRegion:
|
||||
default:
|
||||
return AllowedTouchBehavior::UNKNOWN;
|
||||
|
|
|
@ -22,6 +22,7 @@ enum HitTestResult {
|
|||
HitLayerTouchActionNone,
|
||||
HitLayerTouchActionPanX,
|
||||
HitLayerTouchActionPanY,
|
||||
HitLayerTouchActionPanXY,
|
||||
HitDispatchToContentRegion,
|
||||
};
|
||||
|
||||
|
|
|
@ -1464,7 +1464,7 @@ nsEventStatus AsyncPanZoomController::OnScaleEnd(const PinchGestureInput& aEvent
|
|||
}
|
||||
|
||||
bool
|
||||
AsyncPanZoomController::ConvertToGecko(const ScreenIntPoint& aPoint, CSSPoint* aOut)
|
||||
AsyncPanZoomController::ConvertToGecko(const ScreenIntPoint& aPoint, LayoutDevicePoint* aOut)
|
||||
{
|
||||
if (APZCTreeManager* treeManagerLocal = GetApzcTreeManager()) {
|
||||
ScreenToScreenMatrix4x4 transformScreenToGecko =
|
||||
|
@ -1477,14 +1477,8 @@ AsyncPanZoomController::ConvertToGecko(const ScreenIntPoint& aPoint, CSSPoint* a
|
|||
return false;
|
||||
}
|
||||
|
||||
{ // scoped lock to access mFrameMetrics
|
||||
ReentrantMonitorAutoEnter lock(mMonitor);
|
||||
// NOTE: This isn't *quite* LayoutDevicePoint, we just don't have a name
|
||||
// for this coordinate space and it maps the closest to LayoutDevicePoint.
|
||||
*aOut = LayoutDevicePoint(ViewAs<LayoutDevicePixel>(*layoutPoint,
|
||||
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent))
|
||||
/ mFrameMetrics.GetDevPixelsPerCSSPixel();
|
||||
}
|
||||
*aOut = LayoutDevicePoint(ViewAs<LayoutDevicePixel>(*layoutPoint,
|
||||
PixelCastJustification::LayoutDeviceIsScreenForUntransformedEvent));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1988,7 +1982,7 @@ nsEventStatus AsyncPanZoomController::OnLongPress(const TapGestureInput& aEvent)
|
|||
APZC_LOG("%p got a long-press in state %d\n", this, mState);
|
||||
RefPtr<GeckoContentController> controller = GetGeckoContentController();
|
||||
if (controller) {
|
||||
CSSPoint geckoScreenPoint;
|
||||
LayoutDevicePoint geckoScreenPoint;
|
||||
if (ConvertToGecko(aEvent.mPoint, &geckoScreenPoint)) {
|
||||
CancelableBlockState* block = CurrentInputBlock();
|
||||
MOZ_ASSERT(block);
|
||||
|
@ -2017,7 +2011,7 @@ nsEventStatus AsyncPanZoomController::GenerateSingleTap(TapType aType,
|
|||
const ScreenIntPoint& aPoint, mozilla::Modifiers aModifiers) {
|
||||
RefPtr<GeckoContentController> controller = GetGeckoContentController();
|
||||
if (controller) {
|
||||
CSSPoint geckoScreenPoint;
|
||||
LayoutDevicePoint geckoScreenPoint;
|
||||
if (ConvertToGecko(aPoint, &geckoScreenPoint)) {
|
||||
CancelableBlockState* block = CurrentInputBlock();
|
||||
MOZ_ASSERT(block);
|
||||
|
@ -2041,7 +2035,7 @@ nsEventStatus AsyncPanZoomController::GenerateSingleTap(TapType aType,
|
|||
// schedule the singletap message to run on the next spin of the event loop.
|
||||
// See bug 965381 for the issue this was causing.
|
||||
RefPtr<Runnable> runnable =
|
||||
NewRunnableMethod<TapType, CSSPoint, mozilla::Modifiers,
|
||||
NewRunnableMethod<TapType, LayoutDevicePoint, mozilla::Modifiers,
|
||||
ScrollableLayerGuid, uint64_t>(controller,
|
||||
&GeckoContentController::HandleTap,
|
||||
aType, geckoScreenPoint,
|
||||
|
@ -2082,7 +2076,7 @@ nsEventStatus AsyncPanZoomController::OnDoubleTap(const TapGestureInput& aEvent)
|
|||
RefPtr<GeckoContentController> controller = GetGeckoContentController();
|
||||
if (controller) {
|
||||
if (mZoomConstraints.mAllowDoubleTapZoom && CurrentTouchBlock()->TouchActionAllowsDoubleTapZoom()) {
|
||||
CSSPoint geckoScreenPoint;
|
||||
LayoutDevicePoint geckoScreenPoint;
|
||||
if (ConvertToGecko(aEvent.mPoint, &geckoScreenPoint)) {
|
||||
controller->HandleTap(TapType::eDoubleTap, geckoScreenPoint,
|
||||
aEvent.modifiers, GetGuid(), CurrentTouchBlock()->GetBlockId());
|
||||
|
|
|
@ -608,12 +608,12 @@ protected:
|
|||
APZCTreeManager* GetApzcTreeManager() const;
|
||||
|
||||
/**
|
||||
* Convert ScreenPoint relative to the screen to CSSPoint relative
|
||||
* Convert ScreenPoint relative to the screen to LayoutDevicePoint relative
|
||||
* to the parent document. This excludes the transient compositor transform.
|
||||
* NOTE: This must be converted to CSSPoint relative to the child
|
||||
* NOTE: This must be converted to LayoutDevicePoint relative to the child
|
||||
* document before sending over IPC to a child process.
|
||||
*/
|
||||
bool ConvertToGecko(const ScreenIntPoint& aPoint, CSSPoint* aOut);
|
||||
bool ConvertToGecko(const ScreenIntPoint& aPoint, LayoutDevicePoint* aOut);
|
||||
|
||||
enum AxisLockMode {
|
||||
FREE, /* No locking at all */
|
||||
|
|
|
@ -282,10 +282,13 @@ HitTestingTreeNode::HitTest(const ParentLayerPoint& aPoint) const
|
|||
if (mEventRegions.mNoActionRegion.Contains(point.x, point.y)) {
|
||||
return HitTestResult::HitLayerTouchActionNone;
|
||||
}
|
||||
if (mEventRegions.mHorizontalPanRegion.Contains(point.x, point.y)) {
|
||||
bool panX = mEventRegions.mHorizontalPanRegion.Contains(point.x, point.y);
|
||||
bool panY = mEventRegions.mVerticalPanRegion.Contains(point.x, point.y);
|
||||
if (panX && panY) {
|
||||
return HitTestResult::HitLayerTouchActionPanXY;
|
||||
} else if (panX) {
|
||||
return HitTestResult::HitLayerTouchActionPanX;
|
||||
}
|
||||
if (mEventRegions.mVerticalPanRegion.Contains(point.x, point.y)) {
|
||||
} else if (panY) {
|
||||
return HitTestResult::HitLayerTouchActionPanY;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public:
|
|||
MOCK_METHOD1(RequestContentRepaint, void(const FrameMetrics&));
|
||||
MOCK_METHOD2(RequestFlingSnap, void(const FrameMetrics::ViewID& aScrollId, const mozilla::CSSPoint& aDestination));
|
||||
MOCK_METHOD2(AcknowledgeScrollUpdate, void(const FrameMetrics::ViewID&, const uint32_t& aScrollGeneration));
|
||||
MOCK_METHOD5(HandleTap, void(TapType, const CSSPoint&, Modifiers, const ScrollableLayerGuid&, uint64_t));
|
||||
MOCK_METHOD5(HandleTap, void(TapType, const LayoutDevicePoint&, Modifiers, const ScrollableLayerGuid&, uint64_t));
|
||||
// Can't use the macros with already_AddRefed :(
|
||||
void PostDelayedTask(already_AddRefed<Runnable> aTask, int aDelayMs) {
|
||||
RefPtr<Runnable> task = aTask;
|
||||
|
|
|
@ -264,7 +264,7 @@ TEST_F(APZEventRegionsTester, Bug1117712) {
|
|||
Tap(manager, ScreenIntPoint(55, 5), TimeDuration::FromMilliseconds(100), nullptr, &inputBlockId);
|
||||
// But now we tell the APZ that really it hit layers[2], and expect the tap
|
||||
// to be delivered at the correct coordinates.
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, CSSPoint(55, 5), 0, apzc2->GetGuid(), _)).Times(1);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, LayoutDevicePoint(55, 5), 0, apzc2->GetGuid(), _)).Times(1);
|
||||
|
||||
nsTArray<ScrollableLayerGuid> targets;
|
||||
targets.AppendElement(apzc2->GetGuid());
|
||||
|
|
|
@ -300,7 +300,7 @@ TEST_F(APZCGestureDetectorTester, ShortPress) {
|
|||
// touchup is fully processed. The ordering here is important.
|
||||
EXPECT_CALL(check, Call("pre-tap"));
|
||||
EXPECT_CALL(check, Call("post-tap"));
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
}
|
||||
|
||||
check.Call("pre-tap");
|
||||
|
@ -320,7 +320,7 @@ TEST_F(APZCGestureDetectorTester, MediumPress) {
|
|||
// touchup is fully processed. The ordering here is important.
|
||||
EXPECT_CALL(check, Call("pre-tap"));
|
||||
EXPECT_CALL(check, Call("post-tap"));
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
}
|
||||
|
||||
check.Call("pre-tap");
|
||||
|
@ -356,11 +356,11 @@ protected:
|
|||
|
||||
EXPECT_CALL(check, Call("preHandleLongTap"));
|
||||
blockId++;
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eLongTap, CSSPoint(10, 10), 0, apzc->GetGuid(), blockId)).Times(1);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eLongTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), blockId)).Times(1);
|
||||
EXPECT_CALL(check, Call("postHandleLongTap"));
|
||||
|
||||
EXPECT_CALL(check, Call("preHandleLongTapUp"));
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eLongTapUp, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eLongTapUp, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
EXPECT_CALL(check, Call("postHandleLongTapUp"));
|
||||
}
|
||||
|
||||
|
@ -417,7 +417,7 @@ protected:
|
|||
|
||||
EXPECT_CALL(check, Call("preHandleLongTap"));
|
||||
blockId++;
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eLongTap, CSSPoint(touchX, touchStartY), 0, apzc->GetGuid(), blockId)).Times(1);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eLongTap, LayoutDevicePoint(touchX, touchStartY), 0, apzc->GetGuid(), blockId)).Times(1);
|
||||
EXPECT_CALL(check, Call("postHandleLongTap"));
|
||||
}
|
||||
|
||||
|
@ -439,7 +439,7 @@ protected:
|
|||
status = apzc->ReceiveInputEvent(mti, nullptr);
|
||||
EXPECT_EQ(nsEventStatus_eConsumeDoDefault, status);
|
||||
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, CSSPoint(touchX, touchEndY), 0, apzc->GetGuid(), _)).Times(0);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, LayoutDevicePoint(touchX, touchEndY), 0, apzc->GetGuid(), _)).Times(0);
|
||||
status = TouchUp(apzc, ScreenIntPoint(touchX, touchEndY), mcc->Time());
|
||||
EXPECT_EQ(nsEventStatus_eConsumeDoDefault, status);
|
||||
|
||||
|
@ -482,8 +482,8 @@ TEST_F(APZCGestureDetectorTester, DoubleTap) {
|
|||
MakeApzcWaitForMainThread();
|
||||
MakeApzcZoomable();
|
||||
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(0);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eDoubleTap, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(0);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eDoubleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
|
||||
uint64_t blockIds[2];
|
||||
DoubleTapAndCheckStatus(apzc, ScreenIntPoint(10, 10), &blockIds);
|
||||
|
@ -499,8 +499,8 @@ TEST_F(APZCGestureDetectorTester, DoubleTapNotZoomable) {
|
|||
MakeApzcWaitForMainThread();
|
||||
MakeApzcUnzoomable();
|
||||
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(2);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eDoubleTap, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(0);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(2);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eDoubleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(0);
|
||||
|
||||
uint64_t blockIds[2];
|
||||
DoubleTapAndCheckStatus(apzc, ScreenIntPoint(10, 10), &blockIds);
|
||||
|
@ -516,8 +516,8 @@ TEST_F(APZCGestureDetectorTester, DoubleTapPreventDefaultFirstOnly) {
|
|||
MakeApzcWaitForMainThread();
|
||||
MakeApzcZoomable();
|
||||
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eDoubleTap, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(0);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eDoubleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(0);
|
||||
|
||||
uint64_t blockIds[2];
|
||||
DoubleTapAndCheckStatus(apzc, ScreenIntPoint(10, 10), &blockIds);
|
||||
|
@ -533,8 +533,8 @@ TEST_F(APZCGestureDetectorTester, DoubleTapPreventDefaultBoth) {
|
|||
MakeApzcWaitForMainThread();
|
||||
MakeApzcZoomable();
|
||||
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(0);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eDoubleTap, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(0);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(0);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eDoubleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(0);
|
||||
|
||||
uint64_t blockIds[2];
|
||||
DoubleTapAndCheckStatus(apzc, ScreenIntPoint(10, 10), &blockIds);
|
||||
|
@ -551,7 +551,7 @@ TEST_F(APZCGestureDetectorTester, DoubleTapPreventDefaultBoth) {
|
|||
TEST_F(APZCGestureDetectorTester, TapFollowedByPinch) {
|
||||
MakeApzcZoomable();
|
||||
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
|
||||
Tap(apzc, ScreenIntPoint(10, 10), TimeDuration::FromMilliseconds(100));
|
||||
|
||||
|
@ -573,7 +573,7 @@ TEST_F(APZCGestureDetectorTester, TapFollowedByPinch) {
|
|||
TEST_F(APZCGestureDetectorTester, TapFollowedByMultipleTouches) {
|
||||
MakeApzcZoomable();
|
||||
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
|
||||
Tap(apzc, ScreenIntPoint(10, 10), TimeDuration::FromMilliseconds(100));
|
||||
|
||||
|
@ -618,7 +618,7 @@ TEST_F(APZCGestureDetectorTester, TapTimeoutInterruptedByWheel) {
|
|||
// In this test, even though the wheel block comes right after the tap, the
|
||||
// tap should still be dispatched because it completes fully before the wheel
|
||||
// block arrived.
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, CSSPoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
EXPECT_CALL(*mcc, HandleTap(TapType::eSingleTap, LayoutDevicePoint(10, 10), 0, apzc->GetGuid(), _)).Times(1);
|
||||
|
||||
// We make the APZC zoomable so the gesture detector needs to wait to
|
||||
// distinguish between tap and double-tap. During that timeout is when we
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче