Merge backout; a=me

This commit is contained in:
Ehsan Akhgari 2012-04-23 19:12:16 -04:00
commit edae1c386e
8 changed files with 35 additions and 52 deletions

View File

@ -950,6 +950,10 @@ toolbar[iconsize="small"] #feed-button {
-moz-box-align: stretch;
}
.urlbar-input-box {
-moz-margin-start: 0;
}
.urlbar-history-dropmarker {
-moz-appearance: toolbarbutton-dropdown;
}
@ -1023,6 +1027,7 @@ toolbar[iconsize="small"] #feed-button {
#urlbar-display {
margin-top: 0;
margin-bottom: 0;
-moz-margin-start: 0;
color: GrayText;
}
@ -1033,7 +1038,7 @@ toolbar[iconsize="small"] #feed-button {
margin-top: 2px;
margin-bottom: 2px;
-moz-margin-start: 4px;
-moz-margin-end: 0;
-moz-margin-end: 3px;
list-style-image: url(chrome://browser/skin/identity-icons-generic.png);
-moz-image-region: rect(0, 16px, 16px, 0);
}
@ -1050,7 +1055,7 @@ toolbar[iconsize="small"] #feed-button {
-moz-image-region: rect(0, 32px, 16px, 16px);
}
#identity-box:hover:active > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon,
#identity-box:hover:active > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon,
#identity-box[open=true] > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon {
-moz-image-region: rect(0, 48px, 16px, 32px);
}
@ -1082,7 +1087,6 @@ toolbar[iconsize="small"] #feed-button {
}
#identity-icon-labels {
-moz-margin-start: 4px;
-moz-padding-start: 2px;
-moz-padding-end: 5px;
}
@ -1091,6 +1095,7 @@ toolbar[iconsize="small"] #feed-button {
background-color: #fff;
color: hsl(92,81%,16%);
-moz-border-end: 1px solid hsla(92,81%,16%,.2);
-moz-margin-end: 4px;
}
/* Identity popup icons */

View File

@ -1025,7 +1025,6 @@ toolbar[mode="icons"] #zoom-in-button {
}
#identity-box.verifiedIdentity {
background-color: #fff;
color: hsl(92,100%,20%);
-moz-border-end: 1px solid hsla(92,81%,16%,.2);
-moz-padding-end: 4px;
@ -1098,7 +1097,7 @@ toolbar[mode="icons"] #zoom-in-button {
list-style-image: url(chrome://browser/skin/identity-icons-https-ev.png);
}
#identity-box:hover:active > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon,
#identity-box:hover:active > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon,
#identity-box[open=true] > #identity-box-inner > #page-proxy-stack > #page-proxy-favicon {
-moz-image-region: rect(0, 32px, 16px, 16px);
}

View File

@ -1299,6 +1299,10 @@ html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
.urlbar-textbox-container {
-moz-box-align: stretch;
}
.urlbar-input-box {
-moz-margin-start: 0;
}
#urlbar-icons {
-moz-box-align: center;
@ -1347,6 +1351,7 @@ html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
#urlbar-display {
margin-top: 0;
margin-bottom: 0;
-moz-margin-start: 0;
color: GrayText;
}
@ -1401,9 +1406,13 @@ html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
}
#identity-box.verifiedIdentity {
background-color: #fff;
color: hsl(92,100%,20%);
-moz-border-end: 1px solid hsla(92,81%,16%,.2);
-moz-margin-end: 4px;
}
#identity-box.verifiedIdentity:not(:-moz-lwtheme) {
background-color: #fff;
}
#identity-box:-moz-focusring {
@ -1412,8 +1421,8 @@ html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
}
#identity-icon-labels {
-moz-margin-start: 5px;
-moz-margin-end: 3px;
-moz-padding-start: 2px;
-moz-padding-end: 5px;
}
/* Location bar dropmarker */
@ -1448,10 +1457,7 @@ html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
#page-proxy-favicon {
width: 16px;
height: 16px;
margin-top: 1px;
margin-bottom: 1px;
-moz-margin-start: 4px;
-moz-margin-end: 0;
margin: 1px 3px;
list-style-image: url(chrome://browser/skin/identity-icons-generic.png);
-moz-image-region: rect(0, 16px, 16px, 0);
}

View File

@ -60,8 +60,10 @@ nsresult xpcJSWeakReference::Init(JSContext* cx, const JS::Value& object)
// See if the object is a wrapped native that supports weak references.
nsISupports* supports =
nsXPConnect::GetXPConnect()->GetNativeOfWrapper(cx, &obj);
if (supports) {
mReferent = do_GetWeakReference(supports);
nsCOMPtr<nsISupportsWeakReference> supportsWeakRef =
do_QueryInterface(supports);
if (supportsWeakRef) {
supportsWeakRef->GetWeakReference(getter_AddRefs(mReferent));
if (mReferent) {
return NS_OK;
}

View File

@ -168,20 +168,6 @@ nsLayoutUtils::Are3DTransformsEnabled()
return s3DTransformsEnabled;
}
bool
nsLayoutUtils::UseBackgroundNearestFiltering()
{
static bool sUseBackgroundNearestFilteringEnabled;
static bool sUseBackgroundNearestFilteringPrefInitialised = false;
if (!sUseBackgroundNearestFilteringPrefInitialised) {
sUseBackgroundNearestFilteringPrefInitialised = true;
sUseBackgroundNearestFilteringEnabled = mozilla::Preferences::GetBool("gfx.filter.nearest.force-enabled", false);
}
return sUseBackgroundNearestFilteringEnabled;
}
void
nsLayoutUtils::UnionChildOverflow(nsIFrame* aFrame,
nsOverflowAreas& aOverflowAreas)
@ -3748,11 +3734,6 @@ nsLayoutUtils::DrawBackgroundImage(nsRenderingContext* aRenderingContext,
PRUint32 aImageFlags)
{
SAMPLE_LABEL("layout", "nsLayoutUtils::DrawBackgroundImage");
if (UseBackgroundNearestFiltering()) {
aGraphicsFilter = gfxPattern::FILTER_NEAREST;
}
return DrawImageInternal(aRenderingContext, aImage, aGraphicsFilter,
aDest, aFill, aAnchor, aDirty,
aImageSize, aImageFlags);

View File

@ -1496,12 +1496,6 @@ public:
*/
static bool Are3DTransformsEnabled();
/**
* Checks if we should forcibly use nearest pixel filtering for the
* background.
*/
static bool UseBackgroundNearestFiltering();
/**
* Unions the overflow areas of all non-popup children of aFrame with
* aOverflowAreas.

View File

@ -511,11 +511,16 @@ function OnDocumentLoad(event)
}
var contentRootElement = currentDoc ? currentDoc.documentElement : null;
currentDoc = null;
setupZoom(contentRootElement);
setupDisplayport(contentRootElement);
var inPrintMode = false;
function AfterOnLoadScripts() {
// Regrab the root element, because the document may have changed.
var contentRootElement =
content.document ? content.document.documentElement : null;
// Take a snapshot now. We need to do this before we check whether
// we should wait, since this might trigger dispatching of
// MozPaintWait events and make shouldWaitForExplicitPaintWaiters() true
@ -671,7 +676,6 @@ function LogInfo(str)
const SYNC_DEFAULT = 0x0;
const SYNC_ALLOW_DISABLE = 0x1;
var gDummyCanvas = null;
function SynchronizeForSnapshot(flags)
{
if (flags & SYNC_ALLOW_DISABLE) {
@ -682,13 +686,11 @@ function SynchronizeForSnapshot(flags)
}
}
if (gDummyCanvas == null) {
gDummyCanvas = content.document.createElementNS(XHTML_NS, "canvas");
gDummyCanvas.setAttribute("width", 1);
gDummyCanvas.setAttribute("height", 1);
}
var dummyCanvas = content.document.createElementNS(XHTML_NS, "canvas");
dummyCanvas.setAttribute("width", 1);
dummyCanvas.setAttribute("height", 1);
var ctx = gDummyCanvas.getContext("2d");
var ctx = dummyCanvas.getContext("2d");
var flags = ctx.DRAWWINDOW_DRAW_CARET | ctx.DRAWWINDOW_DRAW_VIEW | ctx.DRAWWINDOW_USE_WIDGET_LAYERS;
ctx.drawWindow(content, 0, 0, 1, 1, "rgb(255,255,255)", flags);
}

View File

@ -212,12 +212,6 @@ pref("gfx.downloadable_fonts.enabled", true);
pref("gfx.downloadable_fonts.fallback_delay", 3000);
pref("gfx.downloadable_fonts.sanitize", true);
#ifdef ANDROID
pref("gfx.filter.nearest.force-enabled", true);
#else
pref("gfx.filter.nearest.force-enabled", false);
#endif
// whether to always search all font cmaps during system font fallback
pref("gfx.font_rendering.fallback.always_use_cmaps", false);