Merge m-i to m-c, a=merge

This commit is contained in:
Phil Ringnalda 2015-05-10 09:10:19 -07:00
commit 4a7ce6d864
44 changed files with 452 additions and 264 deletions

View File

@ -10739,7 +10739,7 @@ nsDocShell::DoURILoad(nsIURI* aURI,
// (ie. POST data, referrer, ...)
//
if (httpChannel) {
nsCOMPtr<nsICachingChannel> cacheChannel(do_QueryInterface(httpChannel));
nsCOMPtr<nsICacheInfoChannel> cacheChannel(do_QueryInterface(httpChannel));
/* Get the cache Key from SH */
nsCOMPtr<nsISupports> cacheKey;
if (mLSHE) {
@ -11289,7 +11289,7 @@ nsDocShell::OnNewURI(nsIURI* aURI, nsIChannel* aChannel, nsISupports* aOwner,
"We shouldn't be updating session history for forced"
" reloads!");
nsCOMPtr<nsICachingChannel> cacheChannel(do_QueryInterface(aChannel));
nsCOMPtr<nsICacheInfoChannel> cacheChannel(do_QueryInterface(aChannel));
nsCOMPtr<nsISupports> cacheKey;
// Get the Cache Key and store it in SH.
if (cacheChannel) {
@ -11843,7 +11843,7 @@ nsDocShell::AddToSessionHistory(nsIURI* aURI, nsIChannel* aChannel,
nsCOMPtr<nsISupports> owner = aOwner;
bool expired = false;
bool discardLayoutState = false;
nsCOMPtr<nsICachingChannel> cacheChannel;
nsCOMPtr<nsICacheInfoChannel> cacheChannel;
if (aChannel) {
cacheChannel = do_QueryInterface(aChannel);

View File

@ -67,7 +67,7 @@ support-files = bug530396-noref.sjs bug530396-subframe.html
skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
[test_bug551225.html]
[test_bug570341.html]
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
skip-if = (toolkit == 'gonk' && debug) || (android_version == '18' && debug) #debug-only failure, android bug 1040769
[test_bug580069.html]
[test_bug590573.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' #bug 823022 # b2g(queryinterfaces into webnavigation, might suffer from something similar as bug 823022) b2g-debug(queryinterfaces into webnavigation, might suffer from something similar as bug 823022) b2g-desktop(queryinterfaces into webnavigation, might suffer from something similar as bug 823022)

View File

@ -7710,3 +7710,57 @@ nsContentUtils::SendMouseEvent(nsCOMPtr<nsIPresShell> aPresShell,
return NS_OK;
}
/* static */
void
nsContentUtils::FirePageHideEvent(nsIDocShellTreeItem* aItem,
EventTarget* aChromeEventHandler)
{
nsCOMPtr<nsIDocument> doc = aItem->GetDocument();
NS_ASSERTION(doc, "What happened here?");
doc->OnPageHide(true, aChromeEventHandler);
int32_t childCount = 0;
aItem->GetChildCount(&childCount);
nsAutoTArray<nsCOMPtr<nsIDocShellTreeItem>, 8> kids;
kids.AppendElements(childCount);
for (int32_t i = 0; i < childCount; ++i) {
aItem->GetChildAt(i, getter_AddRefs(kids[i]));
}
for (uint32_t i = 0; i < kids.Length(); ++i) {
if (kids[i]) {
FirePageHideEvent(kids[i], aChromeEventHandler);
}
}
}
// The pageshow event is fired for a given document only if IsShowing() returns
// the same thing as aFireIfShowing. This gives us a way to fire pageshow only
// on documents that are still loading or only on documents that are already
// loaded.
/* static */
void
nsContentUtils::FirePageShowEvent(nsIDocShellTreeItem* aItem,
EventTarget* aChromeEventHandler,
bool aFireIfShowing)
{
int32_t childCount = 0;
aItem->GetChildCount(&childCount);
nsAutoTArray<nsCOMPtr<nsIDocShellTreeItem>, 8> kids;
kids.AppendElements(childCount);
for (int32_t i = 0; i < childCount; ++i) {
aItem->GetChildAt(i, getter_AddRefs(kids[i]));
}
for (uint32_t i = 0; i < kids.Length(); ++i) {
if (kids[i]) {
FirePageShowEvent(kids[i], aChromeEventHandler, aFireIfShowing);
}
}
nsCOMPtr<nsIDocument> doc = aItem->GetDocument();
NS_ASSERTION(doc, "What happened here?");
if (doc->IsShowing() == aFireIfShowing) {
doc->OnPageShow(true, aChromeEventHandler);
}
}

View File

@ -51,6 +51,7 @@ class nsIConsoleService;
class nsIContent;
class nsIContentPolicy;
class nsIContentSecurityPolicy;
class nsIDocShellTreeItem;
class nsIDocument;
class nsIDocumentLoaderFactory;
class nsIDOMDocument;
@ -2351,6 +2352,13 @@ public:
bool *aPreventDefault,
bool aIsSynthesized);
static void FirePageShowEvent(nsIDocShellTreeItem* aItem,
mozilla::dom::EventTarget* aChromeEventHandler,
bool aFireIfShowing);
static void FirePageHideEvent(nsIDocShellTreeItem* aItem,
mozilla::dom::EventTarget* aChromeEventHandler);
private:
static bool InitializeEventTable();

View File

@ -502,59 +502,6 @@ nsFrameLoader::GetDocShell(nsIDocShell **aDocShell)
return rv;
}
static void
FirePageHideEvent(nsIDocShellTreeItem* aItem,
EventTarget* aChromeEventHandler)
{
nsCOMPtr<nsIDocument> doc = aItem->GetDocument();
NS_ASSERTION(doc, "What happened here?");
doc->OnPageHide(true, aChromeEventHandler);
int32_t childCount = 0;
aItem->GetChildCount(&childCount);
nsAutoTArray<nsCOMPtr<nsIDocShellTreeItem>, 8> kids;
kids.AppendElements(childCount);
for (int32_t i = 0; i < childCount; ++i) {
aItem->GetChildAt(i, getter_AddRefs(kids[i]));
}
for (uint32_t i = 0; i < kids.Length(); ++i) {
if (kids[i]) {
FirePageHideEvent(kids[i], aChromeEventHandler);
}
}
}
// The pageshow event is fired for a given document only if IsShowing() returns
// the same thing as aFireIfShowing. This gives us a way to fire pageshow only
// on documents that are still loading or only on documents that are already
// loaded.
static void
FirePageShowEvent(nsIDocShellTreeItem* aItem,
EventTarget* aChromeEventHandler,
bool aFireIfShowing)
{
int32_t childCount = 0;
aItem->GetChildCount(&childCount);
nsAutoTArray<nsCOMPtr<nsIDocShellTreeItem>, 8> kids;
kids.AppendElements(childCount);
for (int32_t i = 0; i < childCount; ++i) {
aItem->GetChildAt(i, getter_AddRefs(kids[i]));
}
for (uint32_t i = 0; i < kids.Length(); ++i) {
if (kids[i]) {
FirePageShowEvent(kids[i], aChromeEventHandler, aFireIfShowing);
}
}
nsCOMPtr<nsIDocument> doc = aItem->GetDocument();
NS_ASSERTION(doc, "What happened here?");
if (doc->IsShowing() == aFireIfShowing) {
doc->OnPageShow(true, aChromeEventHandler);
}
}
static void
SetTreeOwnerAndChromeEventHandlerOnDocshellTree(nsIDocShellTreeItem* aItem,
nsIDocShellTreeOwner* aOwner,
@ -1023,6 +970,9 @@ nsFrameLoader::SwapWithOtherRemoteLoader(nsFrameLoader* aOther,
otherDoc->FlushPendingNotifications(Flush_Layout);
mInSwap = aOther->mInSwap = false;
unused << mRemoteBrowser->SendSwappedWithOtherRemoteLoader();
unused << aOther->mRemoteBrowser->SendSwappedWithOtherRemoteLoader();
return NS_OK;
}
@ -1199,25 +1149,25 @@ nsFrameLoader::SwapWithOtherLoader(nsFrameLoader* aOther,
// Fire pageshow events on still-loading pages, and then fire pagehide
// events. Note that we do NOT fire these in the normal way, but just fire
// them on the chrome event handlers.
FirePageShowEvent(ourDocshell, ourEventTarget, false);
FirePageShowEvent(otherDocshell, otherEventTarget, false);
FirePageHideEvent(ourDocshell, ourEventTarget);
FirePageHideEvent(otherDocshell, otherEventTarget);
nsContentUtils::FirePageShowEvent(ourDocshell, ourEventTarget, false);
nsContentUtils::FirePageShowEvent(otherDocshell, otherEventTarget, false);
nsContentUtils::FirePageHideEvent(ourDocshell, ourEventTarget);
nsContentUtils::FirePageHideEvent(otherDocshell, otherEventTarget);
nsIFrame* ourFrame = ourContent->GetPrimaryFrame();
nsIFrame* otherFrame = otherContent->GetPrimaryFrame();
if (!ourFrame || !otherFrame) {
mInSwap = aOther->mInSwap = false;
FirePageShowEvent(ourDocshell, ourEventTarget, true);
FirePageShowEvent(otherDocshell, otherEventTarget, true);
nsContentUtils::FirePageShowEvent(ourDocshell, ourEventTarget, true);
nsContentUtils::FirePageShowEvent(otherDocshell, otherEventTarget, true);
return NS_ERROR_NOT_IMPLEMENTED;
}
nsSubDocumentFrame* ourFrameFrame = do_QueryFrame(ourFrame);
if (!ourFrameFrame) {
mInSwap = aOther->mInSwap = false;
FirePageShowEvent(ourDocshell, ourEventTarget, true);
FirePageShowEvent(otherDocshell, otherEventTarget, true);
nsContentUtils::FirePageShowEvent(ourDocshell, ourEventTarget, true);
nsContentUtils::FirePageShowEvent(otherDocshell, otherEventTarget, true);
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -1225,8 +1175,8 @@ nsFrameLoader::SwapWithOtherLoader(nsFrameLoader* aOther,
rv = ourFrameFrame->BeginSwapDocShells(otherFrame);
if (NS_FAILED(rv)) {
mInSwap = aOther->mInSwap = false;
FirePageShowEvent(ourDocshell, ourEventTarget, true);
FirePageShowEvent(otherDocshell, otherEventTarget, true);
nsContentUtils::FirePageShowEvent(ourDocshell, ourEventTarget, true);
nsContentUtils::FirePageShowEvent(otherDocshell, otherEventTarget, true);
return rv;
}
@ -1329,8 +1279,8 @@ nsFrameLoader::SwapWithOtherLoader(nsFrameLoader* aOther,
ourParentDocument->FlushPendingNotifications(Flush_Layout);
otherParentDocument->FlushPendingNotifications(Flush_Layout);
FirePageShowEvent(ourDocshell, ourEventTarget, true);
FirePageShowEvent(otherDocshell, otherEventTarget, true);
nsContentUtils::FirePageShowEvent(ourDocshell, ourEventTarget, true);
nsContentUtils::FirePageShowEvent(otherDocshell, otherEventTarget, true);
mInSwap = aOther->mInSwap = false;
return NS_OK;

View File

@ -350,7 +350,7 @@ skip-if = buildapp == 'b2g' # b2g(86 total, 4 failing - testing mozAnon - got fa
[test_XHR_system.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(12 total, 2 failing - .mozSystem == true - got false, expected true + ) b2g-desktop(12 total, 2 failing - .mozSystem == true - got false, expected true + )
[test_XHR_timeout.html]
skip-if = buildapp == 'b2g' # b2g(flaky on B2G, bug 960743) b2g-debug(flaky on B2G, bug 960743) b2g-desktop(flaky on B2G, bug 960743)
skip-if = buildapp == 'b2g' || (android_version == '18' && debug) # b2g(flaky on B2G, bug 960743) b2g-debug(flaky on B2G, bug 960743) b2g-desktop(flaky on B2G, bug 960743)
support-files = test_XHR_timeout.js
[test_base.xhtml]
[test_blobconstructor.html]

View File

@ -215,7 +215,7 @@ disabled = bug 407107
skip-if = (toolkit == 'gonk' && debug) #bug 1045153
[test_bug902651.html]
[test_canvas.html]
skip-if = (toolkit == 'gonk' && debug) || (toolkit == 'android' && processor == 'x86') #debug-only crash; bug 933541 #x86 only bug 913662
skip-if = (toolkit == 'gonk' && debug) || (toolkit == 'android' && processor == 'x86') || (android_version == '18' && debug) #debug-only crash; bug 933541 #x86 only bug 913662 #android 4.3 debug bug 1143317
[test_canvas_focusring.html]
skip-if = (toolkit == 'gonk' && !debug) || os == 'win' #specialpowers.wrap
[test_canvas_font_setter.html]

View File

@ -117,7 +117,7 @@ skip-if = (toolkit == 'gonk' && debug) #b2g-debug(debug-only failure)
[dom/nodes/test_Document-createEvent.html]
skip-if = (toolkit == 'gonk' && debug) #b2g-debug(debug-only failure)
[dom/nodes/test_Document-createProcessingInstruction-literal-1.xhtml]
skip-if = (toolkit == 'gonk' && debug) #b2g-debug(debug-only failure)
skip-if = (toolkit == 'gonk' && debug) || (android_version == '18' && debug) #b2g-debug(debug-only failure)
[dom/nodes/test_Document-createProcessingInstruction-literal-2.xhtml]
skip-if = (toolkit == 'gonk' && debug) #b2g-debug(debug-only failure)
[dom/nodes/test_Document-createProcessingInstruction.html]
@ -161,7 +161,7 @@ skip-if = (toolkit == 'gonk' && debug) #b2g-debug(debug-only failure)
[dom/nodes/test_Node-insertBefore.html]
skip-if = (toolkit == 'gonk' && debug) #b2g-debug(debug-only failure)
[dom/nodes/test_Node-isEqualNode.xhtml]
skip-if = (toolkit == 'gonk' && debug) #b2g-debug(debug-only failure)
skip-if = (toolkit == 'gonk' && debug) || (android_version == '18' && debug) #b2g-debug(debug-only failure)
[dom/nodes/test_Node-lookupPrefix.xhtml]
skip-if = (toolkit == 'gonk' && debug) #b2g-debug(debug-only failure)
[dom/nodes/test_Node-nodeName.html]
@ -257,7 +257,7 @@ skip-if = buildapp == 'b2g' || android_version == '18' #Test timed out. Bug 1078
[dom/ranges/test_Range-selectNode.html]
skip-if = (toolkit == 'gonk' && debug) #b2g-debug(debug-only failure)
[dom/ranges/test_Range-set.html]
skip-if = buildapp == 'b2g'
skip-if = buildapp == 'b2g' || (android_version == '18' && debug) # android debug time outs
[dom/ranges/test_Range-surroundContents.html]
skip-if = buildapp == 'b2g'
[dom/test_historical.html]
@ -290,7 +290,7 @@ skip-if = (toolkit == 'gonk' && debug) #b2g-debug(debug-only failure)
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-case.xhtml]
skip-if = (toolkit == 'gonk' && debug) #b2g-debug(debug-only failure)
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-id.html]
skip-if = (toolkit == 'gonk' && debug) #b2g-debug(debug-only failure)
skip-if = (toolkit == 'gonk' && debug) || (android_version == '18' && debug) #b2g-debug(debug-only failure)
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-id.xhtml]
skip-if = (toolkit == 'gonk' && debug) #b2g-debug(debug-only failure)
[html/dom/documents/dta/doc.gEBN/test_document.getElementsByName-namespace.html]

View File

@ -680,6 +680,12 @@ child:
*/
AppOfflineStatus(uint32_t id, bool offline);
/**
* Tell the browser that its frame loader has been swapped
* with another.
*/
SwappedWithOtherRemoteLoader();
/*
* FIXME: write protocol!

View File

@ -2712,6 +2712,27 @@ TabChild::RecvAppOfflineStatus(const uint32_t& aId, const bool& aOffline)
return true;
}
bool
TabChild::RecvSwappedWithOtherRemoteLoader()
{
nsCOMPtr<nsIDocShell> ourDocShell = do_GetInterface(WebNavigation());
if (NS_WARN_IF(!ourDocShell)) {
return true;
}
nsCOMPtr<nsPIDOMWindow> ourWindow = ourDocShell->GetWindow();
if (NS_WARN_IF(!ourWindow)) {
return true;
}
nsCOMPtr<EventTarget> ourEventTarget = ourWindow->GetParentTarget();
nsContentUtils::FirePageShowEvent(ourDocShell, ourEventTarget, false);
nsContentUtils::FirePageHideEvent(ourDocShell, ourEventTarget);
nsContentUtils::FirePageShowEvent(ourDocShell, ourEventTarget, true);
return true;
}
bool
TabChild::RecvDestroy()
{

View File

@ -387,6 +387,8 @@ public:
virtual bool RecvAppOfflineStatus(const uint32_t& aId, const bool& aOffline) override;
virtual bool RecvSwappedWithOtherRemoteLoader() override;
virtual PDocumentRendererChild*
AllocPDocumentRendererChild(const nsRect& documentRect, const gfx::Matrix& transform,
const nsString& bgcolor,

View File

@ -85,6 +85,7 @@ skip-if = toolkit == 'android' # bug 1056706
[test_channelMergerNodeWithVolume.html]
[test_channelSplitterNode.html]
[test_channelSplitterNodeWithVolume.html]
skip-if = (android_version == '18' && debug) # bug 1158417
[test_convolverNode.html]
[test_convolverNode_mono_mono.html]
[test_convolverNodeChannelCount.html]

View File

@ -10,6 +10,7 @@ support-files =
skip-if = toolkit == 'android' || toolkit == 'gonk' # bug 1037287
[test_audio_capture_error.html]
[test_call_start_from_end_handler.html]
skip-if = (android_version == '18' && debug) # bug 967606
[test_nested_eventloop.html]
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(showmodaldialog)
[test_preference_enable.html]

View File

@ -19,7 +19,7 @@
#include "nsIHttpChannelInternal.h"
#include "nsIEncodedChannel.h"
#include "nsIUploadChannel.h"
#include "nsICachingChannel.h"
#include "nsICacheInfoChannel.h"
#include "nsIFileChannel.h"
#include "nsEscape.h"
#include "nsUnicharUtils.h"
@ -1274,7 +1274,7 @@ nsresult nsWebBrowserPersist::SaveURIInternal(
}
// Cache key
nsCOMPtr<nsICachingChannel> cacheChannel(do_QueryInterface(httpChannel));
nsCOMPtr<nsICacheInfoChannel> cacheChannel(do_QueryInterface(httpChannel));
if (cacheChannel && cacheKey)
{
cacheChannel->SetCacheKey(cacheKey);

View File

@ -104,12 +104,6 @@ HTTP(..) == synthetic-bold-papyrus-01.html synthetic-bold-papyrus-01-ref.html
!= text-align-justify-last-end.html text-align-justify-last-justify.html
!= text-align-justify-last-center.html text-align-justify-last-justify.html
== text-align-left-in-rtl-block.html text-align-left-in-rtl-block-ref.html
== text-align-match-parent-01.html text-align-match-parent-ref.html
== text-align-match-parent-02.html text-align-match-parent-ref.html
== text-align-match-parent-03.html text-align-match-parent-ref.html
== text-align-match-parent-04.html text-align-match-parent-ref.html
== text-align-match-parent-root-ltr.html text-align-match-parent-root-ltr-ref.html
== text-align-match-parent-root-rtl.html text-align-match-parent-root-rtl-ref.html
HTTP(..) == variation-selector-unsupported-1.html variation-selector-unsupported-1-ref.html
== white-space-1a.html white-space-1-ref.html
== white-space-1b.html white-space-1-ref.html

View File

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
html { text-align: start; }
</style>
</head>
<body>
Root element ltr
</body>
</html>

View File

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
html { text-align: match-parent; }
</style>
</head>
<body>
Root element ltr
</body>
</html>

View File

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html dir="rtl">
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
html { text-align: start; }
</style>
</head>
<body>
Root element rtl
</body>
</html>

View File

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html dir="rtl">
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
html { text-align: match-parent; }
</style>
</head>
<body>
Root element rtl
</body>
</html>

View File

@ -47,7 +47,7 @@ include ruby/reftest.list
# include selectors4/reftest.list
# Text Level 3
# include text3/reftest.list
include text3/reftest.list
# Text Decoration Level 3
include text-decor-3/reftest.list

View File

@ -0,0 +1,6 @@
== text-align-match-parent-01.html text-align-match-parent-ref.html
== text-align-match-parent-02.html text-align-match-parent-ref.html
== text-align-match-parent-03.html text-align-match-parent-ref.html
== text-align-match-parent-04.html text-align-match-parent-ref.html
== text-align-match-parent-root-ltr.html text-align-match-parent-root-ltr-ref.html
== text-align-match-parent-root-rtl.html text-align-match-parent-root-rtl-ref.html

View File

@ -2,8 +2,14 @@
<html>
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
<title>CSS Text: text-align: match-parent</title>
<link rel="author" title="Simon Montagu" href="mailto:smontagu@mozilla.com">
<link rel="help" href="http://www.w3.org/TR/css-text-3/#text-align-property">
<meta name="assert" content="Text checks that an element with
text-align: match-parent inherits its parent's value and calculates
'start' and 'end' with respect to its parent's direction"
<link rel="match" href="text-align-match-parent-ref.html">
<style type="text/css">
div.start { text-align: start; }
div.end { text-align: end; }
div.left { text-align: left; }
@ -12,6 +18,8 @@ div > div { text-align: match-parent; }
</style>
</head>
<body>
<div>Test passes if each line that says "Left" is aligned left and
each line that says "Right" is aligned right</div>
<div class="start" dir="ltr"><div dir="ltr">Left</div></div>
<div class="start" dir="ltr"><div dir="rtl">Left</div></div>
<div class="start" dir="rtl"><div dir="ltr">Right</div></div>

View File

@ -2,16 +2,40 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
<title>CSS Text: text-align: match-parent</title>
<link rel="author" title="Simon Montagu" href="mailto:smontagu@mozilla.com">
<link rel="help" href="http://www.w3.org/TR/css-text-3/#text-align-property">
<meta name="flags" content="dom">
<meta name="assert" content="Text checks that an element with
text-align: match-parent still aligns correctly if the parent's
dir attribute is changed">
<link rel="match" href="text-align-match-parent-ref.html">
<style type="text/css">
div.start { text-align: start; }
div.end { text-align: end; }
div.left { text-align: left; }
div.right { text-align: right; }
div > div { text-align: match-parent; }
</style>
<script type="text/javascript">
function changeParentDir()
{
for (parent = 0; parent < 16; ++parent) {
var parentDiv = document.getElementById("d" + parent);
if (parentDiv.dir == "rtl") {
parentDiv.dir = "ltr";
} else {
parentDiv.dir = "rtl";
}
}
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body>
<body onload="changeParentDir()">
<div>Test passes if each line that says "Left" is aligned left and
each line that says "Right" is aligned right</div>
<div id="d0" class="start" dir="rtl"><div dir="ltr">Left</div></div>
<div id="d1" class="start" dir="rtl"><div dir="rtl">Left</div></div>
<div id="d2" class="start" dir="ltr"><div dir="ltr">Right</div></div>
@ -28,23 +52,5 @@ div > div { text-align: match-parent; }
<div id="d13" class="right" dir="rtl"><div dir="rtl">Right</div></div>
<div id="d14" class="right" dir="ltr"><div dir="ltr">Right</div></div>
<div id="d15" class="right" dir="ltr"><div dir="rtl">Right</div></div>
<script type="text/javascript">
function changeParentDir()
{
for (parent = 0; parent < 16; ++parent) {
var parentDiv = document.getElementById("d" + parent);
if (parentDiv.dir == "rtl") {
parentDiv.dir = "ltr";
} else {
parentDiv.dir = "rtl";
}
}
document.documentElement.removeAttribute("class");
}
document.addEventListener("MozReftestInvalidate", changeParentDir, false);
</script>
</body>
</html>

View File

@ -2,8 +2,14 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
<title>CSS Text: text-align: match-parent</title>
<link rel="author" title="Simon Montagu" href="mailto:smontagu@mozilla.com">
<link rel="help" href="http://www.w3.org/TR/css-text-3/#text-align-property">
<meta name="flags" content="dom">
<meta name="assert" content="Text checks that an element whose
text-align property is changed to match-parent aligns correctly">
<link rel="match" href="text-align-match-parent-ref.html">
<style type="text/css">
div.start { text-align: start; }
div.end { text-align: end; }
div.left { text-align: left; }
@ -11,8 +17,21 @@ div.right { text-align: right; }
div.center { text-align: center; }
div.match { text-align: match-parent; }
</style>
<script type="text/javascript">
function changeChildAlign()
{
for (child = 0; child < 16; ++child) {
var childDiv = document.getElementById("d" + child);
childDiv.className = "match";
}
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body>
<body onload="changeChildAlign()">
<div>Test passes if each line that says "Left" is aligned left and
each line that says "Right" is aligned right</div>
<div class="start" dir="ltr"><div id="d0" class="center" dir="ltr">Left</div></div>
<div class="start" dir="ltr"><div id="d1" class="center" dir="rtl">Left</div></div>
<div class="start" dir="rtl"><div id="d2" class="center" dir="ltr">Right</div></div>
@ -29,19 +48,5 @@ div.match { text-align: match-parent; }
<div class="right" dir="ltr"><div id="d13" class="center" dir="rtl">Right</div></div>
<div class="right" dir="rtl"><div id="d14" class="center" dir="ltr">Right</div></div>
<div class="right" dir="rtl"><div id="d15" class="center" dir="rtl">Right</div></div>
<script type="text/javascript">
function changeChildAlign()
{
for (child = 0; child < 16; ++child) {
var childDiv = document.getElementById("d" + child);
childDiv.className = "match";
}
document.documentElement.removeAttribute("class");
}
document.addEventListener("MozReftestInvalidate", changeChildAlign, false);
</script>
</body>
</html>

View File

@ -2,16 +2,36 @@
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
<title>CSS Text: text-align: match-parent</title>
<link rel="author" title="Simon Montagu" href="mailto:smontagu@mozilla.com">
<link rel="help" href="http://www.w3.org/TR/css-text-3/#text-align-property">
<meta name="flags" content="dom">
<meta name="assert" content="Text checks that an element with
text-align: match-parent still aligns correctly if the parent's
width is changed">
<link rel="match" href="text-align-match-parent-ref.html">
<style type="text/css">
div.start { text-align: start; }
div.end { text-align: end; }
div.left { text-align: left; }
div.right { text-align: right; }
div > div { text-align: match-parent; }
</style>
<script type="text/javascript">
function changeParentWidth()
{
for (parent = 0; parent < 16; ++parent) {
var parentDiv = document.getElementById("d" + parent);
parentDiv.style.width = "";
}
document.documentElement.removeAttribute("class");
}
</script>
</head>
<body>
<body onload="changeParentWidth()">
<div>Test passes if each line that says "Left" is aligned left and
each line that says "Right" is aligned right</div>
<div id="d0" style="width: 50%;" class="start" dir="ltr"><div dir="ltr">Left</div></div>
<div id="d1" style="width: 50%;" class="start" dir="ltr"><div dir="rtl">Left</div></div>
<div id="d2" style="width: 50%;" class="start" dir="rtl"><div dir="ltr">Right</div></div>
@ -28,19 +48,5 @@ div > div { text-align: match-parent; }
<div id="d13" style="width: 50%;" class="right" dir="ltr"><div dir="rtl">Right</div></div>
<div id="d14" style="width: 50%;" class="right" dir="rtl"><div dir="ltr">Right</div></div>
<div id="d15" style="width: 50%;" class="right" dir="rtl"><div dir="rtl">Right</div></div>
<script type="text/javascript">
function changeParentWidth()
{
for (parent = 0; parent < 16; ++parent) {
var parentDiv = document.getElementById("d" + parent);
parentDiv.style.width = "";
}
document.documentElement.removeAttribute("class");
}
document.addEventListener("MozReftestInvalidate", changeParentWidth, false);
</script>
</body>
</html>

View File

@ -2,15 +2,16 @@
<html>
<head>
<meta charset="utf-8">
<title>Text-align: match-parent</title>
<style>
div.start { text-align: start; }
div.end { text-align: end; }
<title>CSS Reftest Reference</title>
<link rel="author" title="Simon Montagu" href="mailto:smontagu@mozilla.com">
<style type="text/css">
div.left { text-align: left; }
div.right { text-align: right; }
</style>
</head>
<body>
<div>Test passes if each line that says "Left" is aligned left and
each line that says "Right" is aligned right</div>
<div class="left">Left</div>
<div class="left">Left</div>
<div class="right">Right</div>

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta charset="utf-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Simon Montagu" href="mailto:smontagu@mozilla.com">
<style type="text/css">
html { text-align: start; }
</style>
</head>
<body>
<p>This line should be aligned left</p>
</body>
</html>

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html dir="ltr">
<head>
<meta charset="utf-8">
<title>CSS Text: text-align: match-parent</title>
<link rel="author" title="Simon Montagu" href="mailto:smontagu@mozilla.com">
<link rel="help" href="http://www.w3.org/TR/css-text-3/#text-align-property">
<meta name="assert" content="Text checks that
text-align: match-parent on a root element with dir=ltr is
equivalent to text-align: start">
<link rel="match" href="text-align-match-parent-root-ltr-ref.html">
<style type="text/css">
html { text-align: match-parent; }
</style>
</head>
<body>
<p>This line should be aligned left</p>
</body>
</html>

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html dir="rtl">
<head>
<meta charset="utf-8">
<title>CSS Reftest Reference</title>
<link rel="author" title="Simon Montagu" href="mailto:smontagu@mozilla.com">
<style type="text/css">
html { text-align: start; }
</style>
</head>
<body>
<p>This line should be aligned right</p>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html dir="rtl">
<head>
<title>CSS Text: text-align: match-parent</title>
<link rel="author" title="Simon Montagu" href="mailto:smontagu@mozilla.com">
<link rel="help" href="http://www.w3.org/TR/css-text-3/#text-align-property">
<meta name="assert" content="Text checks that
text-align: match-parent on a root element with dir=rtl is
equivalent to text-align: start">
<link rel="match" href="text-align-match-parent-root-rtl-ref.html">
<style type="text/css">
html { text-align: match-parent; }
</style>
</head>
<body>
<p>This line should be aligned right</p>
</body>
</html>

View File

@ -216,6 +216,7 @@ skip-if = android_version == '10' #Android 2.3 aws only; bug 1030432
[test_transitions_computed_value_combinations.html]
[test_transitions_events.html]
[test_transitions.html]
skip-if = (android_version == '18' && debug) # bug 1159532
[test_transitions_per_property.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' #bug 775227 # b2g(times out, needs more time + various failures) b2g-debug(times out, needs more time + various failures) b2g-desktop(times out, needs more time + various failures)
[test_transitions_step_functions.html]

View File

@ -4,7 +4,7 @@
#include "nsISupports.idl"
[scriptable, uuid (299d69b4-ee86-4541-802d-7642671ebf97)]
[scriptable, uuid (c5f583f0-ae53-4e39-8af9-2c2d0d7af093)]
interface nsICacheInfoChannel : nsISupports
{
/**
@ -26,4 +26,23 @@ interface nsICacheInfoChannel : nsISupports
* and after the channel fires its OnStopRequest notification.
*/
boolean isFromCache();
/**
* Set/get the cache key... uniquely identifies the data in the cache
* for this channel. Holding a reference to this key does NOT prevent
* the cached data from being removed.
*
* A cache key retrieved from a particular instance of nsICachingChannel
* could be set on another instance of nsICachingChannel provided the
* underlying implementations are compatible and provided the new
* channel instance was created with the same URI. The implementation of
* nsICachingChannel would be expected to use the cache entry identified
* by the cache token. Depending on the value of nsIRequest::loadFlags,
* the cache entry may be validated, overwritten, or simply read.
*
* The cache key may be NULL indicating that the URI of the channel is
* sufficient to locate the same cache entry. Setting a NULL cache key
* is likewise valid.
*/
attribute nsISupports cacheKey;
};

View File

@ -17,7 +17,7 @@ interface nsIFile;
* 3) Support for uniquely identifying cached data in cases when the URL
* is insufficient (e.g., HTTP form submission).
*/
[scriptable, uuid(3d46b469-7405-416e-ba42-84899963b403)]
[scriptable, uuid(436b939d-e391-48e5-ba64-ab0e496e3400)]
interface nsICachingChannel : nsICacheInfoChannel
{
/**
@ -45,25 +45,6 @@ interface nsICachingChannel : nsICacheInfoChannel
*/
attribute nsISupports offlineCacheToken;
/**
* Set/get the cache key... uniquely identifies the data in the cache
* for this channel. Holding a reference to this key does NOT prevent
* the cached data from being removed.
*
* A cache key retrieved from a particular instance of nsICachingChannel
* could be set on another instance of nsICachingChannel provided the
* underlying implementations are compatible and provided the new
* channel instance was created with the same URI. The implementation of
* nsICachingChannel would be expected to use the cache entry identified
* by the cache token. Depending on the value of nsIRequest::loadFlags,
* the cache entry may be validated, overwritten, or simply read.
*
* The cache key may be NULL indicating that the URI of the channel is
* sufficient to locate the same cache entry. Setting a NULL cache key
* is likewise valid.
*/
attribute nsISupports cacheKey;
/**
* Instructs the channel to only store the metadata of the entry, and not
* the content. When reading an existing entry, this automatically sets

View File

@ -30,6 +30,18 @@ union OptionalHttpResponseHead
nsHttpResponseHead;
};
struct HttpChannelCacheKey
{
uint32_t postId;
nsCString key;
};
union OptionalHttpChannelCacheKey
{
void_t;
HttpChannelCacheKey;
};
struct HttpChannelOpenArgs
{
URIParams uri;
@ -67,6 +79,7 @@ struct HttpChannelOpenArgs
uint32_t contentPolicyType;
uint32_t innerWindowID;
OptionalHttpResponseHead synthesizedResponseHead;
OptionalHttpChannelCacheKey cacheKey;
};
struct HttpChannelConnectArgs

View File

@ -323,7 +323,8 @@ class StartRequestEvent : public ChannelEvent
const nsCString& cachedCharset,
const nsCString& securityInfoSerialization,
const NetAddr& selfAddr,
const NetAddr& peerAddr)
const NetAddr& peerAddr,
const HttpChannelCacheKey& cacheKey)
: mChild(child)
, mChannelStatus(channelStatus)
, mResponseHead(responseHead)
@ -336,6 +337,7 @@ class StartRequestEvent : public ChannelEvent
, mSecurityInfoSerialization(securityInfoSerialization)
, mSelfAddr(selfAddr)
, mPeerAddr(peerAddr)
, mCacheKey(cacheKey)
{}
void Run()
@ -344,7 +346,8 @@ class StartRequestEvent : public ChannelEvent
mChild->OnStartRequest(mChannelStatus, mResponseHead, mUseResponseHead,
mRequestHeaders, mIsFromCache, mCacheEntryAvailable,
mCacheExpirationTime, mCachedCharset,
mSecurityInfoSerialization, mSelfAddr, mPeerAddr);
mSecurityInfoSerialization, mSelfAddr, mPeerAddr,
mCacheKey);
}
private:
HttpChannelChild* mChild;
@ -359,6 +362,7 @@ class StartRequestEvent : public ChannelEvent
nsCString mSecurityInfoSerialization;
NetAddr mSelfAddr;
NetAddr mPeerAddr;
HttpChannelCacheKey mCacheKey;
};
bool
@ -373,7 +377,8 @@ HttpChannelChild::RecvOnStartRequest(const nsresult& channelStatus,
const nsCString& securityInfoSerialization,
const NetAddr& selfAddr,
const NetAddr& peerAddr,
const int16_t& redirectCount)
const int16_t& redirectCount,
const HttpChannelCacheKey& cacheKey)
{
LOG(("HttpChannelChild::RecvOnStartRequest [this=%p]\n", this));
// mFlushedForDiversion and mDivertingToParent should NEVER be set at this
@ -392,12 +397,12 @@ HttpChannelChild::RecvOnStartRequest(const nsresult& channelStatus,
isFromCache, cacheEntryAvailable,
cacheExpirationTime, cachedCharset,
securityInfoSerialization, selfAddr,
peerAddr));
peerAddr, cacheKey));
} else {
OnStartRequest(channelStatus, responseHead, useResponseHead, requestHeaders,
isFromCache, cacheEntryAvailable, cacheExpirationTime,
cachedCharset, securityInfoSerialization, selfAddr,
peerAddr);
peerAddr, cacheKey);
}
return true;
}
@ -413,7 +418,8 @@ HttpChannelChild::OnStartRequest(const nsresult& channelStatus,
const nsCString& cachedCharset,
const nsCString& securityInfoSerialization,
const NetAddr& selfAddr,
const NetAddr& peerAddr)
const NetAddr& peerAddr,
const HttpChannelCacheKey& cacheKey)
{
LOG(("HttpChannelChild::OnStartRequest [this=%p]\n", this));
@ -441,6 +447,10 @@ HttpChannelChild::OnStartRequest(const nsresult& channelStatus,
mCacheExpirationTime = cacheExpirationTime;
mCachedCharset = cachedCharset;
nsRefPtr<nsHttpChannelCacheKey> tmpKey = new nsHttpChannelCacheKey();
tmpKey->SetData(cacheKey.postId(), cacheKey.key());
CallQueryInterface(tmpKey.get(), getter_AddRefs(mCacheKey));
AutoEventEnqueuer ensureSerialDispatch(mEventQ);
// replace our request headers with what actually got sent in the parent
@ -1647,6 +1657,20 @@ HttpChannelChild::ContinueAsyncOpen()
openArgs.allowSpdy() = mAllowSpdy;
openArgs.allowAltSvc() = mAllowAltSvc;
if (mCacheKey) {
uint32_t postId;
nsAutoCString key;
nsresult rv = static_cast<nsHttpChannelCacheKey *>(
static_cast<nsISupportsPRUint32 *>(mCacheKey.get()))->GetData(&postId,
key);
if (NS_FAILED(rv)) {
return rv;
}
openArgs.cacheKey() = HttpChannelCacheKey(postId, key);
} else {
openArgs.cacheKey() = mozilla::void_t();
}
propagateLoadInfo(mLoadInfo, openArgs);
// The socket transport in the chrome process now holds a logical ref to us
@ -1789,6 +1813,21 @@ HttpChannelChild::IsFromCache(bool *value)
return NS_OK;
}
NS_IMETHODIMP
HttpChannelChild::GetCacheKey(nsISupports **cacheKey)
{
NS_IF_ADDREF(*cacheKey = mCacheKey);
return NS_OK;
}
NS_IMETHODIMP
HttpChannelChild::SetCacheKey(nsISupports *cacheKey)
{
ENSURE_CALLED_BEFORE_ASYNC_OPEN();
mCacheKey = cacheKey;
return NS_OK;
}
//-----------------------------------------------------------------------------
// HttpChannelChild::nsIResumableChannel
//-----------------------------------------------------------------------------

View File

@ -117,7 +117,8 @@ protected:
const nsCString& securityInfoSerialization,
const NetAddr& selfAddr,
const NetAddr& peerAddr,
const int16_t& redirectCount) override;
const int16_t& redirectCount,
const HttpChannelCacheKey& cacheKey) override;
bool RecvOnTransportAndData(const nsresult& channelStatus,
const nsresult& status,
const uint64_t& progress,
@ -176,6 +177,7 @@ private:
bool mCacheEntryAvailable;
uint32_t mCacheExpirationTime;
nsCString mCachedCharset;
nsCOMPtr<nsISupports> mCacheKey;
// If ResumeAt is called before AsyncOpen, we need to send extra data upstream
bool mSendResumeAt;
@ -208,7 +210,8 @@ private:
const nsCString& cachedCharset,
const nsCString& securityInfoSerialization,
const NetAddr& selfAddr,
const NetAddr& peerAddr);
const NetAddr& peerAddr,
const HttpChannelCacheKey& cacheKey);
void OnTransportAndData(const nsresult& channelStatus,
const nsresult& status,
const uint64_t progress,

View File

@ -113,7 +113,7 @@ HttpChannelParent::Init(const HttpChannelCreationArgs& aArgs)
a.appCacheClientID(), a.allowSpdy(), a.allowAltSvc(), a.fds(),
a.requestingPrincipalInfo(), a.triggeringPrincipalInfo(),
a.securityFlags(), a.contentPolicyType(), a.innerWindowID(),
a.synthesizedResponseHead());
a.synthesizedResponseHead(), a.cacheKey());
}
case HttpChannelCreationArgs::THttpChannelConnectArgs:
{
@ -267,7 +267,8 @@ HttpChannelParent::DoAsyncOpen( const URIParams& aURI,
const uint32_t& aSecurityFlags,
const uint32_t& aContentPolicyType,
const uint32_t& aInnerWindowID,
const OptionalHttpResponseHead& aSynthesizedResponseHead)
const OptionalHttpResponseHead& aSynthesizedResponseHead,
const OptionalHttpChannelCacheKey& aCacheKey)
{
nsCOMPtr<nsIURI> uri = DeserializeURI(aURI);
if (!uri) {
@ -389,6 +390,15 @@ HttpChannelParent::DoAsyncOpen( const URIParams& aURI,
mSynthesizedResponseHead = new nsHttpResponseHead(aSynthesizedResponseHead.get_nsHttpResponseHead());
}
if (aCacheKey.type() == OptionalHttpChannelCacheKey::THttpChannelCacheKey) {
nsRefPtr<nsHttpChannelCacheKey> cacheKey = new nsHttpChannelCacheKey();
cacheKey->SetData(aCacheKey.get_HttpChannelCacheKey().postId(),
aCacheKey.get_HttpChannelCacheKey().key());
nsCOMPtr<nsISupports> cacheKeySupp;
CallQueryInterface(cacheKey.get(), getter_AddRefs(cacheKeySupp));
mChannel->SetCacheKey(cacheKeySupp);
}
if (priority != nsISupportsPriority::PRIORITY_NORMAL) {
mChannel->SetPriority(priority);
}
@ -804,6 +814,21 @@ HttpChannelParent::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext)
uint16_t redirectCount = 0;
mChannel->GetRedirectCount(&redirectCount);
nsCOMPtr<nsISupports> cacheKeySupp;
mChannel->GetCacheKey(getter_AddRefs(cacheKeySupp));
uint32_t postId = 0;
nsAutoCString key;
if (cacheKeySupp) {
nsresult rv = static_cast<nsHttpChannelCacheKey *>(
static_cast<nsISupportsPRUint32 *>(cacheKeySupp.get()))->GetData(&postId,
key);
if (NS_FAILED(rv)) {
return rv;
}
}
HttpChannelCacheKey cacheKey = HttpChannelCacheKey(postId, key);
if (mIPCClosed ||
!SendOnStartRequest(channelStatus,
responseHead ? *responseHead : nsHttpResponseHead(),
@ -813,7 +838,8 @@ HttpChannelParent::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext)
mCacheEntry ? true : false,
expirationTime, cachedCharset, secInfoSerialization,
mChannel->GetSelfAddr(), mChannel->GetPeerAddr(),
redirectCount))
redirectCount,
cacheKey))
{
return NS_ERROR_UNEXPECTED;
}

View File

@ -121,7 +121,8 @@ protected:
const uint32_t& aSecurityFlags,
const uint32_t& aContentPolicyType,
const uint32_t& aInnerWindowID,
const OptionalHttpResponseHead& aSynthesizedResponseHead);
const OptionalHttpResponseHead& aSynthesizedResponseHead,
const OptionalHttpChannelCacheKey& aCacheKey);
virtual bool RecvSetPriority(const uint16_t& priority) override;
virtual bool RecvSetClassOfService(const uint32_t& cos) override;

View File

@ -8,15 +8,13 @@
include protocol PNecko;
include InputStreamParams;
include URIParams;
include NeckoChannelParams;
include protocol PBlob; //FIXME: bug #792908
include "mozilla/net/NeckoMessageUtils.h";
using RequestHeaderTuples from "mozilla/net/PHttpChannelParams.h";
using class nsHttpHeaderArray from "nsHttpHeaderArray.h";
using class nsHttpResponseHead from "nsHttpResponseHead.h";
using struct nsHttpAtom from "nsHttp.h";
using mozilla::net::NetAddr from "mozilla/net/DNS.h";
using struct mozilla::net::ResourceTimingStruct from "mozilla/net/TimingStruct.h";
@ -93,7 +91,8 @@ child:
nsCString securityInfoSerialization,
NetAddr selfAddr,
NetAddr peerAddr,
int16_t redirectCount);
int16_t redirectCount,
HttpChannelCacheKey cacheKey);
// Combines a single OnDataAvailable and its associated OnProgress &
// OnStatus calls into one IPDL message

View File

@ -6037,35 +6037,6 @@ nsHttpChannel::SetOfflineCacheToken(nsISupports *token)
return NS_ERROR_NOT_IMPLEMENTED;
}
class nsHttpChannelCacheKey final : public nsISupportsPRUint32,
public nsISupportsCString
{
NS_DECL_ISUPPORTS
NS_DECL_NSISUPPORTSPRIMITIVE
NS_FORWARD_NSISUPPORTSPRUINT32(mSupportsPRUint32->)
// Both interfaces declares toString method with the same signature.
// Thus we have to delegate only to nsISupportsPRUint32 implementation.
NS_IMETHOD GetData(nsACString & aData) override
{
return mSupportsCString->GetData(aData);
}
NS_IMETHOD SetData(const nsACString & aData) override
{
return mSupportsCString->SetData(aData);
}
public:
nsresult SetData(uint32_t aPostID, const nsACString& aKey);
protected:
~nsHttpChannelCacheKey() {}
nsCOMPtr<nsISupportsPRUint32> mSupportsPRUint32;
nsCOMPtr<nsISupportsCString> mSupportsCString;
};
NS_IMPL_ADDREF(nsHttpChannelCacheKey)
NS_IMPL_RELEASE(nsHttpChannelCacheKey)
NS_INTERFACE_TABLE_HEAD(nsHttpChannelCacheKey)
@ -6111,6 +6082,19 @@ nsresult nsHttpChannelCacheKey::SetData(uint32_t aPostID,
return NS_OK;
}
nsresult nsHttpChannelCacheKey::GetData(uint32_t *aPostID,
nsACString& aKey)
{
nsresult rv;
rv = mSupportsPRUint32->GetData(aPostID);
if (NS_FAILED(rv)) {
return rv;
}
return mSupportsCString->GetData(aKey);
}
NS_IMETHODIMP
nsHttpChannel::GetCacheKey(nsISupports **key)
{

View File

@ -40,6 +40,40 @@ public:
const nsAString& aMessageCategory) = 0;
};
//-----------------------------------------------------------------------------
// nsHttpChannelCacheKey
//-----------------------------------------------------------------------------
class nsHttpChannelCacheKey final : public nsISupportsPRUint32,
public nsISupportsCString
{
NS_DECL_ISUPPORTS
NS_DECL_NSISUPPORTSPRIMITIVE
NS_FORWARD_NSISUPPORTSPRUINT32(mSupportsPRUint32->)
// Both interfaces declares toString method with the same signature.
// Thus we have to delegate only to nsISupportsPRUint32 implementation.
NS_IMETHOD GetData(nsACString & aData) override
{
return mSupportsCString->GetData(aData);
}
NS_IMETHOD SetData(const nsACString & aData) override
{
return mSupportsCString->SetData(aData);
}
public:
nsresult SetData(uint32_t aPostID, const nsACString& aKey);
nsresult GetData(uint32_t *aPostID, nsACString& aKey);
protected:
~nsHttpChannelCacheKey() {}
nsCOMPtr<nsISupportsPRUint32> mSupportsPRUint32;
nsCOMPtr<nsISupportsCString> mSupportsCString;
};
//-----------------------------------------------------------------------------
// nsHttpChannel
//-----------------------------------------------------------------------------

View File

@ -25,6 +25,7 @@ NS_INTERFACE_MAP_BEGIN(nsViewSourceChannel)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIHttpChannel, mHttpChannel)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIHttpChannelInternal, mHttpChannelInternal)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsICachingChannel, mCachingChannel)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsICacheInfoChannel, mCacheInfoChannel)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIApplicationCacheChannel, mApplicationCacheChannel)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIUploadChannel, mUploadChannel)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIRequest, nsIViewSourceChannel)
@ -80,6 +81,7 @@ nsViewSourceChannel::Init(nsIURI* uri)
mHttpChannel = do_QueryInterface(mChannel);
mHttpChannelInternal = do_QueryInterface(mChannel);
mCachingChannel = do_QueryInterface(mChannel);
mCacheInfoChannel = do_QueryInterface(mChannel);
mApplicationCacheChannel = do_QueryInterface(mChannel);
mUploadChannel = do_QueryInterface(mChannel);
@ -117,6 +119,7 @@ nsViewSourceChannel::InitSrcdoc(nsIURI* aURI, const nsAString &aSrcdoc)
mHttpChannel = do_QueryInterface(mChannel);
mHttpChannelInternal = do_QueryInterface(mChannel);
mCachingChannel = do_QueryInterface(mChannel);
mCacheInfoChannel = do_QueryInterface(mChannel);
mApplicationCacheChannel = do_QueryInterface(mChannel);
mUploadChannel = do_QueryInterface(mChannel);
return NS_OK;
@ -544,6 +547,7 @@ nsViewSourceChannel::OnStartRequest(nsIRequest *aRequest, nsISupports *aContext)
mChannel = do_QueryInterface(aRequest);
mHttpChannel = do_QueryInterface(aRequest);
mCachingChannel = do_QueryInterface(aRequest);
mCacheInfoChannel = do_QueryInterface(mChannel);
mUploadChannel = do_QueryInterface(aRequest);
return mListener->OnStartRequest(static_cast<nsIViewSourceChannel*>

View File

@ -35,7 +35,7 @@ public:
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSIHTTPCHANNEL
NS_FORWARD_SAFE_NSICACHEINFOCHANNEL(mCachingChannel)
NS_FORWARD_SAFE_NSICACHEINFOCHANNEL(mCacheInfoChannel)
NS_FORWARD_SAFE_NSICACHINGCHANNEL(mCachingChannel)
NS_FORWARD_SAFE_NSIAPPLICATIONCACHECHANNEL(mApplicationCacheChannel)
NS_FORWARD_SAFE_NSIAPPLICATIONCACHECONTAINER(mApplicationCacheChannel)
@ -58,6 +58,7 @@ protected:
nsCOMPtr<nsIHttpChannel> mHttpChannel;
nsCOMPtr<nsIHttpChannelInternal> mHttpChannelInternal;
nsCOMPtr<nsICachingChannel> mCachingChannel;
nsCOMPtr<nsICacheInfoChannel> mCacheInfoChannel;
nsCOMPtr<nsIApplicationCacheChannel> mApplicationCacheChannel;
nsCOMPtr<nsIUploadChannel> mUploadChannel;
nsCOMPtr<nsIStreamListener> mListener;

View File

@ -19,6 +19,7 @@ skip-if = (toolkit == 'android' && processor == 'x86') #x86 only
[test_MochiKit-DateTime.html]
[test_MochiKit-DOM.html]
[test_MochiKit-DOM-Safari.html]
skip-if = (android_version == '18' && debug) # intermittent time-out
[test_MochiKit-DragAndDrop.html]
[test_MochiKit-Format.html]
[test_MochiKit-Iter.html]