mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Merge mozilla-central to mozilla-inbound
This commit is contained in:
commit
dde3ae8e9a
@ -710,7 +710,7 @@ nsresult
|
||||
nsImageMap::GetBoundsForAreaContent(nsIContent *aContent,
|
||||
nsRect& aBounds)
|
||||
{
|
||||
NS_ENSURE_TRUE(aContent, NS_ERROR_INVALID_ARG);
|
||||
NS_ENSURE_TRUE(aContent && mImageFrame, NS_ERROR_INVALID_ARG);
|
||||
|
||||
// Find the Area struct associated with this content node, and return bounds
|
||||
PRUint32 i, n = mAreas.Length();
|
||||
@ -718,10 +718,7 @@ nsImageMap::GetBoundsForAreaContent(nsIContent *aContent,
|
||||
Area* area = mAreas.ElementAt(i);
|
||||
if (area->mArea == aContent) {
|
||||
aBounds = nsRect();
|
||||
nsIFrame* frame = aContent->GetPrimaryFrame();
|
||||
if (frame) {
|
||||
area->GetRect(frame, aBounds);
|
||||
}
|
||||
area->GetRect(mImageFrame, aBounds);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
@ -998,11 +995,10 @@ nsImageMap::HandleEvent(nsIDOMEvent* aEvent)
|
||||
//Set or Remove internal focus
|
||||
area->HasFocus(focus);
|
||||
//Now invalidate the rect
|
||||
nsIFrame* imgFrame = targetContent->GetPrimaryFrame();
|
||||
if (imgFrame) {
|
||||
if (mImageFrame) {
|
||||
nsRect dmgRect;
|
||||
area->GetRect(imgFrame, dmgRect);
|
||||
imgFrame->Invalidate(dmgRect);
|
||||
area->GetRect(mImageFrame, dmgRect);
|
||||
mImageFrame->Invalidate(dmgRect);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -419,7 +419,7 @@ pref("browser.ui.zoom.animationDuration", 200); // ms duration of double-tap zoo
|
||||
pref("browser.ui.zoom.reflow", false); // Change text wrapping on double-tap
|
||||
pref("browser.ui.zoom.reflow.fontSize", 720);
|
||||
|
||||
pref("font.size.inflation.minTwips", 160);
|
||||
pref("font.size.inflation.minTwips", 120);
|
||||
|
||||
// pinch gesture
|
||||
pref("browser.ui.pinch.maxGrowth", 150); // max pinch distance growth
|
||||
|
@ -371,33 +371,33 @@ nsMIMEHeaderParamImpl::DoParameterInternal(const char *aHeaderValue,
|
||||
|
||||
// Two single quotation marks must be present even in
|
||||
// absence of charset and lang.
|
||||
if (!sQuote1 || !sQuote2) {
|
||||
// log the warning and skip to next parameter
|
||||
NS_WARNING("Mandatory two single quotes are missing in header parameter, parameter ignored\n");
|
||||
goto increment_str;
|
||||
}
|
||||
|
||||
// charset part is required
|
||||
if (! (sQuote1 > valueStart && sQuote1 < valueEnd)) {
|
||||
// log the warning and skip to next parameter
|
||||
NS_WARNING("Mandatory charset part missing in header parameter, parameter ignored\n");
|
||||
goto increment_str;
|
||||
}
|
||||
|
||||
if (aCharset) {
|
||||
if (!sQuote1 || !sQuote2)
|
||||
NS_WARNING("Mandatory two single quotes are missing in header parameter\n");
|
||||
if (aCharset && sQuote1 > valueStart && sQuote1 < valueEnd)
|
||||
{
|
||||
*aCharset = (char *) nsMemory::Clone(valueStart, sQuote1 - valueStart + 1);
|
||||
if (*aCharset)
|
||||
*(*aCharset + (sQuote1 - valueStart)) = 0;
|
||||
}
|
||||
|
||||
if (aLang && sQuote2 > sQuote1 + 1 && sQuote2 < valueEnd)
|
||||
if (aLang && sQuote1 && sQuote2 && sQuote2 > sQuote1 + 1 &&
|
||||
sQuote2 < valueEnd)
|
||||
{
|
||||
*aLang = (char *) nsMemory::Clone(sQuote1 + 1, sQuote2 - (sQuote1 + 1) + 1);
|
||||
if (*aLang)
|
||||
*(*aLang + (sQuote2 - (sQuote1 + 1))) = 0;
|
||||
}
|
||||
|
||||
if (sQuote2 + 1 < valueEnd)
|
||||
// Be generous and handle gracefully when required
|
||||
// single quotes are absent.
|
||||
if (sQuote1)
|
||||
{
|
||||
if(!sQuote2)
|
||||
sQuote2 = sQuote1;
|
||||
}
|
||||
else
|
||||
sQuote2 = valueStart - 1;
|
||||
|
||||
if (sQuote2 && sQuote2 + 1 < valueEnd)
|
||||
{
|
||||
if (*aResult)
|
||||
{
|
||||
|
@ -262,7 +262,9 @@ var tests = [
|
||||
|
||||
// the actual bug
|
||||
["attachment; filename*=''foo",
|
||||
"attachment", Cr.NS_ERROR_INVALID_ARG],
|
||||
"attachment", "foo"],
|
||||
// previously with the fix for 692574:
|
||||
// "attachment", Cr.NS_ERROR_INVALID_ARG],
|
||||
|
||||
// sanity check
|
||||
["attachment; filename*=a''foo",
|
||||
@ -273,15 +275,27 @@ var tests = [
|
||||
|
||||
// one missing
|
||||
["attachment; filename*=UTF-8'foo-%41.html",
|
||||
"attachment", Cr.NS_ERROR_INVALID_ARG],
|
||||
"attachment", "foo-A.html"],
|
||||
// previously with the fix for 692574:
|
||||
// "attachment", Cr.NS_ERROR_INVALID_ARG],
|
||||
|
||||
// both missing
|
||||
["attachment; filename*=foo-%41.html",
|
||||
"attachment", Cr.NS_ERROR_INVALID_ARG],
|
||||
"attachment","foo-A.html"],
|
||||
// previously with the fix for 692574:
|
||||
// "attachment", Cr.NS_ERROR_INVALID_ARG],
|
||||
|
||||
// make sure fallback works
|
||||
["attachment; filename*=UTF-8'foo-%41.html; filename=bar.html",
|
||||
"attachment", "bar.html"],
|
||||
"attachment", "foo-A.html"],
|
||||
// previously with the fix for 692574:
|
||||
// "attachment", "bar.html"],
|
||||
|
||||
// Bug 704989: add workaround for broken Outlook Web App (OWA)
|
||||
// attachment handling
|
||||
|
||||
["attachment; filename*=\"a%20b\"",
|
||||
"attachment", "a b"],
|
||||
];
|
||||
|
||||
function do_tests(whichRFC)
|
||||
|
Loading…
Reference in New Issue
Block a user