Merge cvs-trunk-mirror to mozilla-central. Automated merge, no manual conflict resolution necessary.

--HG--
rename : js/src/jsapi.c => js/src/jsapi.cpp
rename : js/src/jsarray.c => js/src/jsarray.cpp
rename : js/src/jsdbgapi.c => js/src/jsdbgapi.cpp
rename : js/src/jsfun.c => js/src/jsfun.cpp
rename : js/src/jsinterp.c => js/src/jsinterp.cpp
rename : js/src/jslong.c => js/src/jslong.cpp
rename : js/src/jsobj.c => js/src/jsobj.cpp
rename : js/src/jsopcode.c => js/src/jsopcode.cpp
rename : js/src/jsparse.c => js/src/jsparse.cpp
rename : js/src/jsregexp.c => js/src/jsregexp.cpp
rename : js/src/jsscope.c => js/src/jsscope.cpp
rename : js/src/jsstr.c => js/src/jsstr.cpp
rename : js/src/prmjtime.c => js/src/prmjtime.cpp
This commit is contained in:
Benjamin Smedberg 2008-04-29 10:20:07 -04:00
commit 160d9d1766
1524 changed files with 100144 additions and 4370 deletions

View File

@ -794,8 +794,11 @@ nsAccessNode::GetCacheEntry(nsAccessNodeHashtable& aCache,
PLDHashOperator nsAccessNode::ClearCacheEntry(const void* aKey, nsCOMPtr<nsIAccessNode>& aAccessNode, void* aUserArg) PLDHashOperator nsAccessNode::ClearCacheEntry(const void* aKey, nsCOMPtr<nsIAccessNode>& aAccessNode, void* aUserArg)
{ {
NS_ASSERTION(!aAccessNode, "Calling ClearCacheEntry with a NULL pointer!");
if (aAccessNode) {
nsCOMPtr<nsPIAccessNode> privateAccessNode(do_QueryInterface(aAccessNode)); nsCOMPtr<nsPIAccessNode> privateAccessNode(do_QueryInterface(aAccessNode));
privateAccessNode->Shutdown(); privateAccessNode->Shutdown();
}
return PL_DHASH_REMOVE; return PL_DHASH_REMOVE;
} }

View File

@ -1440,20 +1440,54 @@ NS_IMETHODIMP nsAccessible::TakeSelection()
} }
/* void takeFocus (); */ /* void takeFocus (); */
NS_IMETHODIMP nsAccessible::TakeFocus() NS_IMETHODIMP
nsAccessible::TakeFocus()
{ {
nsCOMPtr<nsIDOMNSHTMLElement> htmlElement(do_QueryInterface(mDOMNode)); if (IsDefunct())
return NS_ERROR_FAILURE;
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsIFrame *frame = GetFrame();
NS_ENSURE_STATE(frame);
// If the current element can't take real DOM focus and if it has an ID and
// ancestor with a the aria-activedescendant attribute present, then set DOM
// focus to that ancestor and set aria-activedescendant on the ancestor to
// the ID of the desired element.
if (!frame->IsFocusable()) {
nsAutoString id;
if (content && nsAccUtils::GetID(content, id)) {
nsCOMPtr<nsIContent> ancestorContent = content;
while ((ancestorContent = ancestorContent->GetParent()) &&
!ancestorContent->HasAttr(kNameSpaceID_None,
nsAccessibilityAtoms::aria_activedescendant));
if (ancestorContent) {
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
if (presShell) {
nsIFrame *frame = presShell->GetPrimaryFrameFor(ancestorContent);
if (frame && frame->IsFocusable()) {
content = ancestorContent;
content->SetAttr(kNameSpaceID_None,
nsAccessibilityAtoms::aria_activedescendant,
id, PR_TRUE);
}
}
}
}
}
nsCOMPtr<nsIDOMNSHTMLElement> htmlElement(do_QueryInterface(content));
if (htmlElement) { if (htmlElement) {
// HTML Elements also set the caret position // HTML Elements also set the caret position
// in order to affect tabbing order // in order to affect tabbing order
return htmlElement->Focus(); return htmlElement->Focus();
} }
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
if (!content) {
return NS_ERROR_FAILURE;
}
content->SetFocus(GetPresContext());
content->SetFocus(GetPresContext());
return NS_OK; return NS_OK;
} }

View File

@ -91,14 +91,6 @@ nsApplicationAccessible::GetName(nsAString& aName)
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
nsApplicationAccessible::GetDescription(nsAString& aDescription)
{
GetName(aDescription);
aDescription.AppendLiteral(" Application Accessible");
return NS_OK;
}
NS_IMETHODIMP NS_IMETHODIMP
nsApplicationAccessible::GetRole(PRUint32 *aRole) nsApplicationAccessible::GetRole(PRUint32 *aRole)
{ {

View File

@ -69,7 +69,6 @@ public:
// nsIAccessible // nsIAccessible
NS_IMETHOD GetName(nsAString & aName); NS_IMETHOD GetName(nsAString & aName);
NS_IMETHOD GetDescription(nsAString & aDescription);
NS_IMETHOD GetRole(PRUint32 *aRole); NS_IMETHOD GetRole(PRUint32 *aRole);
NS_IMETHOD GetFinalRole(PRUint32 *aFinalRole); NS_IMETHOD GetFinalRole(PRUint32 *aFinalRole);
NS_IMETHOD GetState(PRUint32 *aState, PRUint32 *aExtraState); NS_IMETHOD GetState(PRUint32 *aState, PRUint32 *aExtraState);

View File

@ -1562,9 +1562,12 @@ NS_IMETHODIMP nsDocAccessible::FlushPendingEvents()
// wait to fire this here, instead of in InvalidateCacheSubtree(), where we wouldn't be able to calculate // wait to fire this here, instead of in InvalidateCacheSubtree(), where we wouldn't be able to calculate
// the offset, length and text for the text change. // the offset, length and text for the text change.
if (domNode && domNode != mDOMNode) { if (domNode && domNode != mDOMNode) {
if (!containerAccessible) if (!containerAccessible) {
GetAccessibleInParentChain(domNode, PR_TRUE, GetAccessibleInParentChain(domNode, PR_TRUE,
getter_AddRefs(containerAccessible)); getter_AddRefs(containerAccessible));
if (!containerAccessible)
containerAccessible = this;
}
nsCOMPtr<nsIAccessibleTextChangeEvent> textChangeEvent = nsCOMPtr<nsIAccessibleTextChangeEvent> textChangeEvent =
CreateTextChangeEventForNode(containerAccessible, domNode, accessible, PR_TRUE, PR_TRUE); CreateTextChangeEventForNode(containerAccessible, domNode, accessible, PR_TRUE, PR_TRUE);
@ -2066,10 +2069,10 @@ nsDocAccessible::FireShowHideEvents(nsIDOMNode *aDOMNode, PRBool aAvoidOnThisNod
// Could not find accessible to show hide yet, so fire on any // Could not find accessible to show hide yet, so fire on any
// accessible descendants in this subtree // accessible descendants in this subtree
nsCOMPtr<nsIContent> content(do_QueryInterface(aDOMNode)); nsCOMPtr<nsINode> node(do_QueryInterface(aDOMNode));
PRUint32 count = content->GetChildCount(); PRUint32 count = node->GetChildCount();
for (PRUint32 index = 0; index < count; index++) { for (PRUint32 index = 0; index < count; index++) {
nsCOMPtr<nsIDOMNode> childNode = do_QueryInterface(content->GetChildAt(index)); nsCOMPtr<nsIDOMNode> childNode = do_QueryInterface(node->GetChildAt(index));
nsresult rv = FireShowHideEvents(childNode, PR_FALSE, aEventType, nsresult rv = FireShowHideEvents(childNode, PR_FALSE, aEventType,
aDelay, aForceIsFromUserInput); aDelay, aForceIsFromUserInput);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);

View File

@ -238,12 +238,14 @@ nsRootAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
if (privateDOMWindow) { if (privateDOMWindow) {
nsIFocusController *focusController = nsIFocusController *focusController =
privateDOMWindow->GetRootFocusController(); privateDOMWindow->GetRootFocusController();
if (focusController) {
PRBool isActive = PR_FALSE; PRBool isActive = PR_FALSE;
focusController->GetActive(&isActive); focusController->GetActive(&isActive);
if (isActive) { if (isActive) {
*aExtraState |= nsIAccessibleStates::EXT_STATE_ACTIVE; *aExtraState |= nsIAccessibleStates::EXT_STATE_ACTIVE;
} }
} }
}
#ifdef MOZ_XUL #ifdef MOZ_XUL
if (GetChromeFlags() & nsIWebBrowserChrome::CHROME_MODAL) { if (GetChromeFlags() & nsIWebBrowserChrome::CHROME_MODAL) {
*aExtraState |= nsIAccessibleStates::EXT_STATE_MODAL; *aExtraState |= nsIAccessibleStates::EXT_STATE_MODAL;

View File

@ -130,24 +130,34 @@ nsHTMLImageAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
/* wstring getName (); */ /* wstring getName (); */
NS_IMETHODIMP nsHTMLImageAccessible::GetName(nsAString& aName) NS_IMETHODIMP nsHTMLImageAccessible::GetName(nsAString& aName)
{ {
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode)); aName.Truncate();
if (!content) { if (IsDefunct())
return NS_ERROR_FAILURE; // Node has been shut down return NS_ERROR_FAILURE;
}
if (!content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::alt, nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
aName)) { NS_ASSERTION(content, "Image node always supports nsIContent");
if (mRoleMapEntry) {
// No alt attribute means AT can repair if there is no accessible name
// alt="" with no title or aria-labelledby means image is presentational and
// AT should leave accessible name empty
PRBool hasAltAttrib =
content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::alt, aName);
if (aName.IsEmpty()) {
if (content->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::aria_labelledby)) {
// Use HTML label or DHTML accessibility's labelledby attribute for name // Use HTML label or DHTML accessibility's labelledby attribute for name
// GetHTMLName will also try title attribute as a last resort // GetHTMLName will also try title attribute as a last resort
return GetHTMLName(aName, PR_FALSE); GetHTMLName(aName, PR_FALSE);
}
if (aName.IsEmpty()) { // No name from alt or aria-labelledby
content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::title, aName);
if (!hasAltAttrib && aName.IsEmpty()) {
// Still no accessible name and no alt attribute is present.
// SetIsVoid() is different from empty string -- this means a name was not
// provided by author and AT repair of the name is allowed.
aName.SetIsVoid(PR_TRUE);
} }
if (!content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::title,
aName)) {
aName.SetIsVoid(PR_TRUE); // No alt or title
} }
} }
return NS_OK; return NS_OK;
} }
@ -325,6 +335,25 @@ nsHTMLImageAccessible::Shutdown()
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// nsHTMLImageAccessible // nsHTMLImageAccessible
nsresult
nsHTMLImageAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
{
if (IsDefunct())
return NS_ERROR_FAILURE;
nsresult rv = nsLinkableAccessible::GetAttributesInternal(aAttributes);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIContent> content(do_QueryInterface(mDOMNode));
nsAutoString src;
content->GetAttr(kNameSpaceID_None, nsAccessibilityAtoms::src, src);
if (!src.IsEmpty())
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::src, src);
return NS_OK;
}
already_AddRefed<nsIDOMHTMLCollection> already_AddRefed<nsIDOMHTMLCollection>
nsHTMLImageAccessible::GetAreaCollection() nsHTMLImageAccessible::GetAreaCollection()
{ {

View File

@ -77,6 +77,9 @@ public:
// nsIAccessibleImage // nsIAccessibleImage
NS_DECL_NSIACCESSIBLEIMAGE NS_DECL_NSIACCESSIBLEIMAGE
// nsAccessible
virtual nsresult GetAttributesInternal(nsIPersistentProperties *aAttributes);
protected: protected:
// nsAccessible // nsAccessible
virtual void CacheChildren(); virtual void CacheChildren();

View File

@ -92,6 +92,9 @@ nsHTMLTableCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttri
NS_ENSURE_STATE(shell); NS_ENSURE_STATE(shell);
nsIFrame *frame = shell->GetPrimaryFrameFor(content); nsIFrame *frame = shell->GetPrimaryFrameFor(content);
NS_ASSERTION(frame, "The frame cannot be obtaied for HTML table cell.");
NS_ENSURE_STATE(frame);
nsITableCellLayout *cellLayout = nsnull; nsITableCellLayout *cellLayout = nsnull;
CallQueryInterface(frame, &cellLayout); CallQueryInterface(frame, &cellLayout);
NS_ENSURE_STATE(cellLayout); NS_ENSURE_STATE(cellLayout);

View File

@ -120,7 +120,7 @@ __try {
if (NS_FAILED(rv)) if (NS_FAILED(rv))
return GetHRESULT(rv); return GetHRESULT(rv);
if (description.IsVoid()) if (description.IsEmpty())
return S_FALSE; return S_FALSE;
*aDescription = ::SysAllocStringLen(description.get(), *aDescription = ::SysAllocStringLen(description.get(),

View File

@ -99,6 +99,9 @@ CAccessibleText::get_attributes(long aOffset, long *aStartOffset,
long *aEndOffset, BSTR *aTextAttributes) long *aEndOffset, BSTR *aTextAttributes)
{ {
__try { __try {
if (!aStartOffset || !aEndOffset || !aTextAttributes)
return E_INVALIDARG;
*aStartOffset = 0; *aStartOffset = 0;
*aEndOffset = 0; *aEndOffset = 0;
*aTextAttributes = NULL; *aTextAttributes = NULL;

View File

@ -291,10 +291,21 @@ __try {
*pszName = NULL; *pszName = NULL;
nsCOMPtr<nsIAccessible> xpAccessible; nsCOMPtr<nsIAccessible> xpAccessible;
GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible)); GetXPAccessibleFor(varChild, getter_AddRefs(xpAccessible));
if (xpAccessible) { if (!xpAccessible)
nsAutoString name;
if (NS_FAILED(xpAccessible->GetName(name)))
return E_FAIL; return E_FAIL;
nsAutoString name;
nsresult rv = xpAccessible->GetName(name);
if (NS_FAILED(rv))
return GetHRESULT(rv);
if (name.IsVoid()) {
// Valid return value for the name:
// The name was not provided, e.g. no alt attribute for an image.
// A screen reader may choose to invent its own accessible name, e.g. from
// an image src attribute.
// See nsHTMLImageAccessible::GetName()
return S_OK;
}
*pszName = ::SysAllocStringLen(name.get(), name.Length()); *pszName = ::SysAllocStringLen(name.get(), name.Length());
if (!*pszName) if (!*pszName)
@ -303,7 +314,6 @@ __try {
#ifdef DEBUG_A11Y #ifdef DEBUG_A11Y
NS_ASSERTION(mIsInitialized, "Access node was not initialized"); NS_ASSERTION(mIsInitialized, "Access node was not initialized");
#endif #endif
}
} __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { } } __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return S_OK; return S_OK;

View File

@ -46,6 +46,8 @@ include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
_TEST_FILES =\ _TEST_FILES =\
moz.png \
test_aria_activedescendant.html \
test_bug368835.xul \ test_bug368835.xul \
test_bug420863.html \ test_bug420863.html \
test_groupattrs.xul \ test_groupattrs.xul \
@ -58,6 +60,7 @@ _TEST_FILES =\
test_nsIAccessibleHyperLink.html \ test_nsIAccessibleHyperLink.html \
test_nsIAccessibleHyperLink.xul \ test_nsIAccessibleHyperLink.xul \
test_nsIAccessibleHyperText.html \ test_nsIAccessibleHyperText.html \
test_nsIAccessibleImage.html \
test_bug428479.html \ test_bug428479.html \
$(NULL) $(NULL)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,76 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=429547
-->
<head>
<title>Table indexes chrome tests</title>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript">
const nsIAccessibleRetrieval = Components.interfaces.nsIAccessibleRetrieval;
const ELEMENT_NODE = Components.interfaces.nsIDOMNode.ELEMENT_NODE;
var gAccRetrieval = null;
var gContainerFocused = false;
function doTest()
{
var focusHandler = {
handleEvent: function handleEvent(aEvent) {
var target = aEvent.target;
if (target.nodeType == ELEMENT_NODE &&
target.getAttribute("id") == "container")
gContainerFocused = true;
}
};
var container = document.getElementById("container");
container.addEventListener("focus", focusHandler, false);
gAccRetrieval = Components.classes["@mozilla.org/accessibleRetrieval;1"].
getService(nsIAccessibleRetrieval);
var item2 = document.getElementById("item2");
var item2Acc = null;
try {
item2Acc = gAccRetrieval.getAccessibleFor(item2);
} catch (e) {}
ok (item2Acc,
"The element with ID and an ancestor with 'aria-activedescedant' attribute should be accessible.");
if (item2Acc)
item2Acc.takeFocus();
ok(gContainerFocused,
"Container with active descedant didn't recieved the focus.");
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(doTest);
</script>
</head>
<body>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=429547"
title="Support aria-activedescendant usage in nsIAccesible::TakeFocus()">
Mozilla Bug 429547
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<div aria-activedescendant="item1" id="container" tabindex="1">
<div id="item1">item1</div>
<div id="item2">item2</div>
<div id="item3">item3</div>
</div>
</body>
</html>

View File

@ -0,0 +1,171 @@
<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=429659
-->
<head>
<title>nsIAccessibleImage chrome tests</title>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript">
const nsIAccessibleImage = Components.interfaces.nsIAccessibleImage;
const nsIAccessibleCoordinateType =
Components.interfaces.nsIAccessibleCoordinateType;
var gAccRetrieval;
function testCords(aID, aImageAcc, aCordType, aXCoordinate, aYCoordinate,
aCoordTypeString)
{
var x = {}, y = {};
aImageAcc.getImagePosition(aCordType, x, y);
is(x.value, aXCoordinate,
"Wrong " + aCoordTypeString + " x offset for " + aID + "!");
is(y.value, aYCoordinate,
"Wrong " + aCoordTypeString + " y offset for " + aID + "!");
}
function testCoordinates(aID, aAcc, aXCoordinates, aYCoordinates, aWidth,
aHeight)
{
var imageAcc;
try {
imageAcc = aAcc.QueryInterface(nsIAccessibleImage);
} catch(e) {}
ok(imageAcc, "no image interface for " + aID + "!");
testCords(aID, imageAcc,
nsIAccessibleCoordinateType.COORDTYPE_SCREEN_RELATIVE,
aXCoordinates[0], aYCoordinates[0], "screen");
testCords(aID, imageAcc,
nsIAccessibleCoordinateType.COORDTYPE_WINDOW_RELATIVE,
aXCoordinates[1], aYCoordinates[1], "window");
testCords(aID, imageAcc,
nsIAccessibleCoordinateType.COORDTYPE_PARENT_RELATIVE,
aXCoordinates[2], aYCoordinates[2], "parent");
var width = {}, height = {};
imageAcc.getImageSize(width, height);
is(width.value, aWidth, "Wrong width for " + aID + "!");
is(height.value, aHeight, "wrong height for " + aID + "!");
}
function testThis(aID, aName, aSRC, aXCoordinates, aYCoordinates, aWidth,
aHeight)
{
var elem = document.getElementById(aID);
var acc;
try {
acc = gAccRetrieval.getAccessibleFor(elem);
} catch(e) {}
ok(acc, "No accessible for " + aID + "!");
is(acc.name, aName, "wrong name for " + aID + "!");
// test coordinates and size
testCoordinates(aID, acc, aXCoordinates, aYCoordinates, aWidth, aHeight);
// bug 429659: Make sure the SRC attribute is set for any image
var attributes;
try {
attributes = acc.attributes;
} catch(e) {}
ok(attributes, "no attributes on " + aID + "!");
is(attributes.getStringProperty("src"), aSRC,
"no correct src attribute for " + aID + "!");
}
function doTest()
{
gAccRetrieval = Components.classes["@mozilla.org/accessibleRetrieval;1"].
getService(Components.interfaces.nsIAccessibleRetrieval);
// Test non-linked image
var xCords = [16, 12, 8];
var yCords = [227, 223, 113];
testThis("nonLinkedImage", null, "moz.png", xCords, yCords, 89, 38);
// Test linked image
xCords = [16, 12, 0];
yCords = [289, 285, -27];
testThis("linkedImage", null, "moz.png", xCords, yCords, 93, 42);
// Test non-linked image with alt attribute
xCords = [16, 12, 8];
yCords = [356, 352, 242];
testThis("nonLinkedImageWithAlt", "MoFo", "moz.png", xCords, yCords, 89, 38);
// Test linked image with alt attribute
xCords = [16, 12, 0];
yCords = [418, 414, -27];
testThis("linkedImageWithAlt", "MoFo link", "moz.png", xCords, yCords, 93, 42);
// Test non-linked image with title attribute
xCords = [16, 12, 8];
yCords = [485, 481, 371];
testThis("nonLinkedImageWithTitle", "MoFo logo", "moz.png", xCords, yCords, 89, 38);
// Test linked image with title attribute
xCords = [16, 12, 0];
yCords = [547, 543, -27];
testThis("linkedImageWithTitle", "Link to MoFo", "moz.png", xCords, yCords, 93, 42);
// Test simple image with empty alt attribute
xCords = [16, 12, 8];
yCords = [614, 610, 500];
testThis("nonLinkedImageEmptyAlt", "", "moz.png", xCords, yCords, 89, 38);
// Test linked image with empty alt attribute
xCords = [16, 12, 0];
yCords = [676, 672, -27];
testThis("linkedImageEmptyAlt", "", "moz.png", xCords, yCords, 93, 42);
// Test simple image with empty alt attribute and title
xCords = [16, 12, 8];
yCords = [743, 739, 629];
testThis("nonLinkedImageEmptyAltAndTitle", "MozillaFoundation", "moz.png", xCords, yCords, 89, 38);
// Test linked image with empty alt attribute and title
xCords = [16, 12, 0];
yCords = [805, 801, -27];
testThis("linkedImageEmptyAltAndTitle", "Link to Mozilla Foundation", "moz.png", xCords, yCords, 93, 42);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(doTest);
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=429659">Mozilla Bug 429659</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
</pre>
<br>Simple image:<br>
<img id="nonLinkedImage" src="moz.png"/>
<br>Linked image:<br>
<a href="http://www.mozilla.org"><img id="linkedImage" src="moz.png"></a>
<br>Simple image with alt:<br>
<img id="nonLinkedImageWithAlt" src="moz.png" alt="MoFo"/>
<br>Linked image with alt:<br>
<a href="http://www.mozilla.org"><img id="linkedImageWithAlt" src="moz.png" alt="MoFo link"/></a>
<br>Simple image with title:<br>
<img id="nonLinkedImageWithTitle" src="moz.png" title="MoFo logo"/>
<br>Linked image with title:<br>
<a href="http://www.mozilla.org"><img id="linkedImageWithTitle" src="moz.png" title="Link to MoFo"/></a>
<br>Simple image with empty alt:<br>
<img id="nonLinkedImageEmptyAlt" src="moz.png" alt=""/>
<br>Linked image with empty alt:<br>
<a href="http://www.mozilla.org"><img id="linkedImageEmptyAlt" src="moz.png" alt=""/></a>
<br>Simple image with empty alt and title:<br>
<img id="nonLinkedImageEmptyAltAndTitle" src="moz.png" alt="" title="MozillaFoundation"/>
<br>Linked image with empty alt and title:<br>
<a href="http://www.mozilla.org"><img id="linkedImageEmptyAltAndTitle" src="moz.png" alt=""
title="Link to Mozilla Foundation"/></a>
</body>
</html>

View File

@ -16,4 +16,11 @@
</versionRange> </versionRange>
</emItem> </emItem>
</emItems> </emItems>
<pluginItems>
<pluginItem>
<match name="name" exp="Yahoo Application State Plugin"/>
<match name="description" exp="Yahoo Application State Plugin"/>
<match name="filename" exp="npYState.dll"/>
</pluginItem>
</pluginItems>
</blocklist> </blocklist>

View File

@ -80,7 +80,7 @@ pref("extensions.getAddons.search.url", "https://services.addons.mozilla.org/%LO
// Blocklist preferences // Blocklist preferences
pref("extensions.blocklist.enabled", true); pref("extensions.blocklist.enabled", true);
pref("extensions.blocklist.interval", 86400); pref("extensions.blocklist.interval", 86400);
pref("extensions.blocklist.url", "https://addons.mozilla.org/blocklist/1/%APP_ID%/%APP_VERSION%/"); pref("extensions.blocklist.url", "https://addons.mozilla.org/blocklist/2/%APP_ID%/%APP_VERSION%/%PRODUCT%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/");
pref("extensions.blocklist.detailsURL", "http://%LOCALE%.www.mozilla.com/%LOCALE%/blocklist/"); pref("extensions.blocklist.detailsURL", "http://%LOCALE%.www.mozilla.com/%LOCALE%/blocklist/");
// Dictionary download preference // Dictionary download preference
@ -213,7 +213,10 @@ pref("browser.urlbar.doubleClickSelectsAll", false);
#endif #endif
pref("browser.urlbar.autoFill", false); pref("browser.urlbar.autoFill", false);
pref("browser.urlbar.matchOnlyTyped", false); pref("browser.urlbar.matchOnlyTyped", false);
pref("browser.urlbar.matchOnWordBoundary", true); // 0: Match anywhere (e.g., middle of words)
// 1: Match on word boundaries and then try matching anywhere
// 2: Match only on word boundaries (e.g., after / or .)
pref("browser.urlbar.matchBehavior", 1);
pref("browser.urlbar.filter.javascript", true); pref("browser.urlbar.filter.javascript", true);
// the maximum number of results to show in autocomplete when doing richResults // the maximum number of results to show in autocomplete when doing richResults
@ -632,7 +635,7 @@ pref("urlclassifier.gethashtables", "goog-phish-shavar,goog-malware-shavar");
pref("urlclassifier.confirm-age", 2700); pref("urlclassifier.confirm-age", 2700);
// URL for checking the reason for a malware warning. // URL for checking the reason for a malware warning.
pref("browser.safebrowsing.malware.reportURL", "http://www.stopbadware.org/reports/container?source=@APP_UA_NAME@&version=@APP_VERSION@&reportname="); pref("browser.safebrowsing.malware.reportURL", "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");
#endif #endif

View File

@ -131,7 +131,8 @@
accesskey="&deleteCmd.accesskey;" accesskey="&deleteCmd.accesskey;"
command="cmd_delete"/> command="cmd_delete"/>
<menuseparator/> <menuseparator/>
<menuitem label="&selectAllCmd.label;" <menuitem id="menu_selectAll"
label="&selectAllCmd.label;"
key="key_selectAll" key="key_selectAll"
accesskey="&selectAllCmd.accesskey;" accesskey="&selectAllCmd.accesskey;"
command="cmd_selectAll"/> command="cmd_selectAll"/>

View File

@ -294,9 +294,12 @@
command="viewHistorySidebar"/> command="viewHistorySidebar"/>
<key id="key_fullZoomReduce" key="&fullZoomReduceCmd.commandkey;" command="cmd_fullZoomReduce" modifiers="accel"/> <key id="key_fullZoomReduce" key="&fullZoomReduceCmd.commandkey;" command="cmd_fullZoomReduce" modifiers="accel"/>
<key key="&fullZoomReduceCmd.commandkey2;" command="cmd_fullZoomReduce" modifiers="accel"/>
<key id="key_fullZoomEnlarge" key="&fullZoomEnlargeCmd.commandkey;" command="cmd_fullZoomEnlarge" modifiers="accel"/> <key id="key_fullZoomEnlarge" key="&fullZoomEnlargeCmd.commandkey;" command="cmd_fullZoomEnlarge" modifiers="accel"/>
<key key="&fullZoomEnlargeCmd.commandkey2;" command="cmd_fullZoomEnlarge" modifiers="accel"/> <key key="&fullZoomEnlargeCmd.commandkey2;" command="cmd_fullZoomEnlarge" modifiers="accel"/>
<key key="&fullZoomEnlargeCmd.commandkey3;" command="cmd_fullZoomEnlarge" modifiers="accel"/>
<key id="key_fullZoomReset" key="&fullZoomResetCmd.commandkey;" command="cmd_fullZoomReset" modifiers="accel"/> <key id="key_fullZoomReset" key="&fullZoomResetCmd.commandkey;" command="cmd_fullZoomReset" modifiers="accel"/>
<key key="&fullZoomResetCmd.commandkey2;" command="cmd_fullZoomReset" modifiers="accel"/>
<key id="key_switchTextDirection" key="&bidiSwitchTextDirectionItem.commandkey;" command="cmd_switchTextDirection" modifiers="accel,shift" /> <key id="key_switchTextDirection" key="&bidiSwitchTextDirectionItem.commandkey;" command="cmd_switchTextDirection" modifiers="accel,shift" />

View File

@ -2324,11 +2324,14 @@ function BrowserOnCommand(event) {
// This is the "Why is this site blocked" button. For malware, // This is the "Why is this site blocked" button. For malware,
// we can fetch a site-specific report, for phishing, we redirect // we can fetch a site-specific report, for phishing, we redirect
// to the generic page describing phishing protection. // to the generic page describing phishing protection.
var formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"]
.getService(Components.interfaces.nsIURLFormatter);
if (/e=malwareBlocked/.test(errorDoc.documentURI)) { if (/e=malwareBlocked/.test(errorDoc.documentURI)) {
// Get the stop badware "why is this blocked" report url, // Get the stop badware "why is this blocked" report url,
// append the current url, and go there. // append the current url, and go there.
try { try {
var reportURL = gPrefService.getCharPref("browser.safebrowsing.malware.reportURL"); var reportURL = formatter.formatURLPref("browser.safebrowsing.malware.reportURL");
reportURL += errorDoc.location.href; reportURL += errorDoc.location.href;
content.location = reportURL; content.location = reportURL;
} catch (e) { } catch (e) {
@ -2337,9 +2340,7 @@ function BrowserOnCommand(event) {
} }
else if (/e=phishingBlocked/.test(errorDoc.documentURI)) { else if (/e=phishingBlocked/.test(errorDoc.documentURI)) {
try { try {
content.location = Cc["@mozilla.org/toolkit/URLFormatterService;1"] content.location = formatter.formatURLPref("browser.safebrowsing.warning.infoURL");
.getService(Components.interfaces.nsIURLFormatter)
.formatURLPref("browser.safebrowsing.warning.infoURL");
} catch (e) { } catch (e) {
Components.utils.reportError("Couldn't get phishing info URL: " + e); Components.utils.reportError("Couldn't get phishing info URL: " + e);
} }
@ -6562,7 +6563,9 @@ IdentityHandler.prototype = {
// for certs that are trusted because of a security exception. // for certs that are trusted because of a security exception.
var tooltip = this._stringBundle.getFormattedString("identity.identified.verifier", var tooltip = this._stringBundle.getFormattedString("identity.identified.verifier",
[iData.caOrg]); [iData.caOrg]);
if (this._overrideService.hasMatchingOverride(lookupHost, iData.cert, {}, {})) if (this._overrideService.hasMatchingOverride(this._lastLocation.hostname,
this._lastLocation.port,
iData.cert, {}, {}))
tooltip = this._stringBundle.getString("identity.identified.verified_by_you"); tooltip = this._stringBundle.getString("identity.identified.verified_by_you");
} }
else if (newMode == this.IDENTITY_MODE_IDENTIFIED) { else if (newMode == this.IDENTITY_MODE_IDENTIFIED) {

View File

@ -191,7 +191,8 @@
<!-- Popup for site identity information --> <!-- Popup for site identity information -->
<panel id="identity-popup" position="after_start" hidden="true" noautofocus="true" <panel id="identity-popup" position="after_start" hidden="true" noautofocus="true"
onpopupshown="document.getElementById('identity-popup-more-info-button').focus();" onpopupshown="document.getElementById('identity-popup-more-info-button').focus();"
onpopuphidden="focusAndSelectUrlBar();" norestorefocus="true"> onpopuphidden="focusAndSelectUrlBar();" norestorefocus="true"
chromedir="&locale.dir;">
<hbox id="identity-popup-container" align="top"> <hbox id="identity-popup-container" align="top">
<image id="identity-popup-icon"/> <image id="identity-popup-icon"/>
<vbox id="identity-popup-content-box"> <vbox id="identity-popup-content-box">
@ -237,7 +238,7 @@
</vbox> </vbox>
</tooltip> </tooltip>
<toolbox id="navigator-toolbox" type="drag" class="toolbox-top" mode="icons" <toolbox id="navigator-toolbox" class="toolbox-top" mode="icons"
defaultmode="icons"> defaultmode="icons">
<!-- Menu --> <!-- Menu -->
<toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true" <toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
@ -321,7 +322,6 @@
showcommentcolumn="true" showcommentcolumn="true"
showimagecolumn="true" showimagecolumn="true"
enablehistory="true" enablehistory="true"
timeout="100"
maxrows="6" maxrows="6"
newlines="stripsurroundingwhitespace" newlines="stripsurroundingwhitespace"
oninput="URLBarOnInput(event);" oninput="URLBarOnInput(event);"
@ -337,6 +337,7 @@
We only add the identity-box button to the tab order when the location bar We only add the identity-box button to the tab order when the location bar
has focus, otherwise pressing F6 focuses it instead of the location bar --> has focus, otherwise pressing F6 focuses it instead of the location bar -->
<box id="identity-box" role="button" <box id="identity-box" role="button"
chromedir="&locale.dir;"
onclick="getIdentityHandler().handleIdentityButtonEvent(event);" onclick="getIdentityHandler().handleIdentityButtonEvent(event);"
onkeypress="getIdentityHandler().handleIdentityButtonEvent(event);"> onkeypress="getIdentityHandler().handleIdentityButtonEvent(event);">
<hbox align="center"> <hbox align="center">

View File

@ -217,12 +217,19 @@
<ul> <ul>
<li>Josh Aas</li> <li>Josh Aas</li>
<li>Robert Accettura</li> <li>Robert Accettura</li>
<li>Ehsan Akhgari</li>
<li>Sean Alamares</li>
<li>Harvey Anderson</li>
<li>Smokey Ardisson</li>
<li>Rob Arnold</li>
<li>Tomoya Asai</li> <li>Tomoya Asai</li>
<li>Dietrich Ayala</li> <li>Dietrich Ayala</li>
<li>Mitchell Baker</li> <li>Mitchell Baker</li>
<li>Adam Barea</li> <li>Rhian Baker</li>
<li>Jan Bambas</li>
<li>Jason Barnabe</li> <li>Jason Barnabe</li>
<li>David Baron</li> <li>David Baron</li>
<li>Colin Barrett</li>
<li>Christopher Beard</li> <li>Christopher Beard</li>
<li>Glen Beasley</li> <li>Glen Beasley</li>
<li>Juan Becerra</li> <li>Juan Becerra</li>
@ -231,185 +238,229 @@
<li>Mic Berman</li> <li>Mic Berman</li>
<li>Uri Bernstein</li> <li>Uri Bernstein</li>
<li>Christian Biesinger</li> <li>Christian Biesinger</li>
<li>Al Billings</li>
<li>Seth Bindernagel</li> <li>Seth Bindernagel</li>
<li>Chris Blizzard</li> <li>Chris Blizzard</li>
<li>Jamey Boje</li> <li>Jamey Boje</li>
<li>Nelson Bolyard</li> <li>Nelson Bolyard</li>
<li>Marco Bonardo</li>
<li>Carsten Book</li> <li>Carsten Book</li>
<li>Paul Booker</li> <li>Paul Booker</li>
<li>Dan Born</li>
<li>Ondřej Brablc</li>
<li>Catherine Brady</li>
<li>Dave Bragsalla</li>
<li>Igor Bukanov</li> <li>Igor Bukanov</li>
<li>Simon Bünzli</li> <li>Simon Bünzli</li>
<li>Lapo Calamandrei</li>
<li>Dave Camp</li>
<li>Rob Campbell</li> <li>Rob Campbell</li>
<li>Regis Caspar</li> <li>Regis Caspar</li>
<li>Marco Casteleijn</li> <li>Garrett Casto</li>
<li>Biswatosh Chakraborty</li>
<li>Tony Chang</li> <li>Tony Chang</li>
<li>Wan-Teh Chang</li> <li>Wan-Teh Chang</li>
<li>Emily Chen</li>
<li>Ginn Chen</li> <li>Ginn Chen</li>
<li>Pascal Chevrel</li> <li>Pascal Chevrel</li>
<li>Tony Chung</li>
<li>Bob Clary</li> <li>Bob Clary</li>
<li>Wil Clouser</li> <li>Wil Clouser</li>
<li>Mary Colvig</li> <li>Mary Colvig</li>
<li>Majken Connor</li> <li>Majken Connor</li>
<li>Mike Connor</li> <li>Mike Connor</li>
<li>Chris Cooper</li> <li>Chris Cooper</li>
<li>Michael Daumling</li> <li>Brian Crowder</li>
<li>John Daggett</li>
<li>Michael Davis</li>
<li>Neil Deakin</li> <li>Neil Deakin</li>
<li>Sherman Dickman</li> <li>Julie Deroche</li>
<li>Justin Dolske</li>
<li>Stephen Donner</li> <li>Stephen Donner</li>
<li>Asa Dotzler</li> <li>Asa Dotzler</li>
<li>Rafael Ebron</li> <li>Chris Double</li>
<li>Brendan Eich</li> <li>Brendan Eich</li>
<li>Ximon Eighteen</li>
<li>Kai Engert</li> <li>Kai Engert</li>
<li>Steve England</li> <li>Steve England</li>
<li>Madhava Enros</li>
<li>Eleka Etimad</li>
<li>Jason Evans</li>
<li>Alex Faaborg</li>
<li>Jane Finette</li>
<li>Mark Finkle</li>
<li>Darin Fisher</li> <li>Darin Fisher</li>
<li>Jayson Fittipaldi</li> <li>Jayson Fittipaldi</li>
<li>Justin Fitzhugh</li> <li>Justin Fitzhugh</li>
<li>Ryan Flint</li> <li>Ryan Flint</li>
<li>Justin Frankel</li> <li>Alix Franquet</li>
<li>Simon Fraser</li>
<li>Eli Friedman</li> <li>Eli Friedman</li>
<li>Alex Fritze</li>
<li>Lisa Gansky</li>
<li>Mike Gao</li>
<li>Steven Garrity</li> <li>Steven Garrity</li>
<li>Michael Glenn</li> <li>Kevin Gerich</li>
<li>Jay Goldman</li> <li>Taras Glek</li>
<li>Ben Goodger</li> <li>Aravind Gottipati</li>
<li>Dão Gottwald</li> <li>Dão Gottwald</li>
<li>Zak Greant</li> <li>Zak Greant</li>
<li>Pam Greene</li> <li>Matthew Gregan</li>
<li>Adam Guthrie</li> <li>Adam Guthrie</li>
<li>Vidar Haarr</li>
<li>Andrei Hajdukewycz</li> <li>Andrei Hajdukewycz</li>
<li>Mark Hammond</li> <li>Trevor Hardcastle</li>
<li>Basil Hashem</li> <li>Basil Hashem</li>
<li>Ian Hayward</li> <li>Ian Hayward</li>
<li>Ben Hearsum</li>
<li>Axel Hecht</li> <li>Axel Hecht</li>
<li>Frank Hecker</li> <li>Frank Hecker</li>
<li>Robert Helmer</li> <li>Robert Helmer</li>
<li>Jon Hicks</li> <li>Jon Hicks</li>
<li>Ian Hickson</li>
<li>Graydon Hoare</li> <li>Graydon Hoare</li>
<li>Chris Hofmann</li> <li>Chris Hofmann</li>
<li>Timothy Hogan</li>
<li>Daniel Holbert</li>
<li>Mike Hommey</li> <li>Mike Hommey</li>
<li>Joe Hughes</li> <li>Stephen Horlander</li>
<li>Ed Hume</li> <li>David Humphrey</li>
<li>Ivan Icin</li> <li>Takeshi Ichimaru</li>
<li>Chris Ilias</li>
<li>Eri Inoue </li>
<li>Joichi Ito</li> <li>Joichi Ito</li>
<li>Laurent Jouanneau</li>
<li>Gen Kanai</li> <li>Gen Kanai</li>
<li>Masanori Kaneko</li>
<li>Blake Kaplan</li> <li>Blake Kaplan</li>
<li>Michael Kaply</li> <li>Michael Kaply</li>
<li>Mitch Kapor</li> <li>Mitch Kapor</li>
<li>Peter Kasting</li> <li>Kazuyoshi Kato</li>
<li>Alfred Kayser</li> <li>Alfred Kayser</li>
<li>Paul Kim</li> <li>Paul Kim</li>
<li>Masatoshi Kimura</li> <li>Masatoshi Kimura</li>
<li>Ria Klaassen</li> <li>Ria Klaassen</li>
<li>Andrea Knight</li>
<li>Marcia Knous</li> <li>Marcia Knous</li>
<li>Dave Laundon</li> <li>Gary Kwong</li>
<li>David Lanham</li>
<li>Edward Lee</li>
<li>Raymond Lee</li> <li>Raymond Lee</li>
<li>Garrett LeSage</li>
<li>Aaron Leventhal</li> <li>Aaron Leventhal</li>
<li>Mark Liddell</li>
<li>Dave Liebreich</li>
<li>Anne-Julie Ligneau</li> <li>Anne-Julie Ligneau</li>
<li>John Lilly</li> <li>John Lilly</li>
<li>Zach Lipton</li> <li>Zach Lipton</li>
<li>Nian Liu</li> <li>Kai Liu</li>
<li>Reed Loden</li> <li>Reed Loden</li>
<li>Lars Lohn</li>
<li>Robert Longson</li> <li>Robert Longson</li>
<li>Scott MacGregor</li> <li>Bob Lord</li>
<li>Phil Machalski</li>
<li>Ere Maijala</li> <li>Ere Maijala</li>
<li>Gervase Markham</li> <li>Gervase Markham</li>
<li>Sean Martell</li> <li>Sean Martell</li>
<li>Jim Mathies</li>
<li>Heather Meeker</li> <li>Heather Meeker</li>
<li>Myk Melez</li> <li>Myk Melez</li>
<li>Federico Mena-Quintero</li>
<li>Mark Mentovai</li> <li>Mark Mentovai</li>
<li>Alex Menzies</li>
<li>Steven Michaud</li> <li>Steven Michaud</li>
<li>Ted Mielczarek</li>
<li>Bernd Mielke</li> <li>Bernd Mielke</li>
<li>Joey Minta</li> <li>Dave Miller</li>
<li>Dan Mills</li>
<li>Michael Monreal</li>
<li>Simon Montagu</li> <li>Simon Montagu</li>
<li>Mike Morgan</li> <li>Mike Morgan</li>
<li>Scooter Morris</li> <li>Dan Mosedale</li>
<li>Michael Moy</li>
<li>Masayuki Nakano</li> <li>Masayuki Nakano</li>
<li>Marria Nazif</li> <li>Marria Nazif</li>
<li>Ian Neal</li> <li>Kev Needham</li>
<li>Kaori Negoro</li> <li>Kaori Negoro</li>
<li>Johnathan Nightingale</li>
<li>Andreas Nilsson</li>
<li>Tristan Nitot</li> <li>Tristan Nitot</li>
<li>Alice Nodelman</li> <li>Alice Nodelman</li>
<li>Michal Novotny</li>
<li>Robert O'Callahan</li> <li>Robert O'Callahan</li>
<li>John O'Duinn</li>
<li>Jan Odvárko</li>
<li>Tomoyuki Okazaki</li>
<li>Jeremy Orem</li>
<li>Hideo Oshima</li>
<li>Mats Palmgren</li> <li>Mats Palmgren</li>
<li>Stuart Parmenter</li> <li>Stuart Parmenter</li>
<li>Jay Patel</li> <li>Jay Patel</li>
<li>Igor Pavlov</li> <li>Chris Pearce</li>
<li>Javier Pedemonte</li> <li>Javier Pedemonte</li>
<li>Alfred Peng</li> <li>Alfred Peng</li>
<li>Christian Persch</li> <li>Christian Persch</li>
<li>Kalle Persson</li>
<li>Ulisse Perusin</li>
<li>Olli Pettay</li> <li>Olli Pettay</li>
<li>Chase Phillips</li>
<li>Julien Pierre</li> <li>Julien Pierre</li>
<li>Mark Pilgrim</li>
<li>Mike Pinkerton</li>
<li>Alex Polvi</li> <li>Alex Polvi</li>
<li>Nickolay Ponomarev</li> <li>Nickolay Ponomarev</li>
<li>Dan Portillo</li>
<li>Karen Prescott</li> <li>Karen Prescott</li>
<li>Feng Qian</li> <li>Florian Quèze</li>
<li>Robert Rainwater</li>
<li>Brian Rakowski</li>
<li>Neil Rashbrook</li> <li>Neil Rashbrook</li>
<li>Bret Reckard</li>
<li>J. Paul Reed</li> <li>J. Paul Reed</li>
<li>Robert Relyea</li> <li>Robert Relyea</li>
<li>John Resig</li>
<li>Deb Richardson</li> <li>Deb Richardson</li>
<li>Tim Riley</li> <li>Tim Riley</li>
<li>Phil Ringnalda</li> <li>Phil Ringnalda</li>
<li>Julien Rivaud</li>
<li>David Rolnitzky</li> <li>David Rolnitzky</li>
<li>Asaf Romano</li> <li>Asaf Romano</li>
<li>Doron Rosenberg</li>
<li>Blake Ross</li>
<li>James Ross</li>
<li>Tim Rowley</li> <li>Tim Rowley</li>
<li>Cameron Roy</li>
<li>Jesse Ruderman</li> <li>Jesse Ruderman</li>
<li>Brian Ryner</li> <li>Brian Ryner</li>
<li>Alexander Sack</li> <li>Alexander Sack</li>
<li>Hideo Saito</li> <li>Hideo Saito</li>
<li>Eiko Sakuma</li>
<li>Ken Saunders</li> <li>Ken Saunders</li>
<li>Robert Sayre</li> <li>Robert Sayre</li>
<li>Fritz Schneider</li>
<li>Mike Schroepfer</li> <li>Mike Schroepfer</li>
<li>Phil Schwan</li> <li>Kurt Schultz</li>
<li>Justin Scott</li> <li>Justin Scott</li>
<li>Chris Seawood</li> <li>Hiroshi Sekiya</li>
<li>Leon Sha</li> <li>Tara Shahian</li>
<li>Melissa Shapiro</li>
<li>Gavin Sharp</li> <li>Gavin Sharp</li>
<li>Mike Shaver</li> <li>Mike Shaver</li>
<li>Eric Shepherd</li> <li>Eric Shepherd</li>
<li>Hiroshi Shimoda</li> <li>Atsushi Shimono</li>
<li>Jungshik Shin</li> <li>Jungshik Shin</li>
<li>Jonas Sicking</li> <li>Jonas Sicking</li>
<li>Damon Sicore</li>
<li>Roger B. Sidje</li> <li>Roger B. Sidje</li>
<li>Samuel Sidler</li>
<li>Henrik Skupin</li>
<li>John Slater</li>
<li>Benjamin Smedberg</li> <li>Benjamin Smedberg</li>
<li>Jon Smirl</li> <li>Andrew Smith</li>
<li>Mark Smith</li>
<li>Window Snyder</li>
<li>Josh Soref</li> <li>Josh Soref</li>
<li>Ian Spence</li>
<li>Seth Spitzer</li> <li>Seth Spitzer</li>
<li>Markus Stange</li>
<li>Jakub Steiner</li>
<li>Johnny Stenback</li> <li>Johnny Stenback</li>
<li>Luke Stone</li> <li>Brandon Sterne</li>
<li>Robert Strong</li> <li>Robert Strong</li>
<li>Annie Sullivan</li> <li>Vicky Sun</li>
<li>Amir Szekely</li> <li>Clint Talbert</li>
<li>Dave Townsend</li> <li>David Tenser</li>
<li>Chris Thomas</li> <li>Chris Thomas</li>
<li>Nick Thomas</li>
<li>Laura Thomson</li>
<li>Karl Tomlinson</li>
<li>Dave Townsend</li>
<li>Ben Turner</li> <li>Ben Turner</li>
<li>Doug Turner</li> <li>Doug Turner</li>
<li>Peter Van der Beken</li> <li>Peter Van der Beken</li>
<li>Peter van der Woude</li> <li>Peter van der Woude</li>
<li>Teune van Steeg</li>
<li>Ryan VanderMeulen</li>
<li>Daniel Veditz</li> <li>Daniel Veditz</li>
<li>Michael Ventnor</li> <li>Michael Ventnor</li>
<li>Joost Verburg</li>
<li>Jorge Villalobos</li>
<li>Alexei Volkov</li> <li>Alexei Volkov</li>
<li>Vladimir Vukicevic</li> <li>Vladimir Vukicevic</li>
<li>Håkan Waara</li> <li>Håkan Waara</li>
@ -417,12 +468,19 @@
<li>Tracy Walker</li> <li>Tracy Walker</li>
<li>Martijn Wargers</li> <li>Martijn Wargers</li>
<li>Jonathan Watt</li> <li>Jonathan Watt</li>
<li>Frédéric Wenzel</li>
<li>Steffen Wilberg</li> <li>Steffen Wilberg</li>
<li>Brett Wilson</li> <li>Shawn Wilsher</li>
<li>Dan Witte</li>
<li>Steve Won</li>
<li>Michael Wu</li> <li>Michael Wu</li>
<li>Masahiro Yamada</li>
<li>Satoko Takita Yamaguchi (Chibi)</li> <li>Satoko Takita Yamaguchi (Chibi)</li>
<li>Christine Yen</li>
<li>Kohei Yoshino</li> <li>Kohei Yoshino</li>
<li>Shigeru Yoshitake</li>
<li>Boris Zbarsky</li> <li>Boris Zbarsky</li>
<li>Matthew Zeier</li>
</ul> </ul>
&credit.translation; &credit.translation;

View File

@ -46,11 +46,16 @@
#include browserMountPoints.inc #include browserMountPoints.inc
<script type="application/javascript"><![CDATA[ <script type="application/javascript"><![CDATA[
// Bug 405696: Map Edit->Find command to the download manger's command
window.addEventListener("load", function(event) { window.addEventListener("load", function(event) {
// Bug 405696: Map Edit -> Find command to the download manager's command
var findMenuItem = document.getElementById("menu_find"); var findMenuItem = document.getElementById("menu_find");
findMenuItem.setAttribute("command", "cmd_findDownload"); findMenuItem.setAttribute("command", "cmd_findDownload");
findMenuItem.setAttribute("key", "key_findDownload"); findMenuItem.setAttribute("key", "key_findDownload");
// Bug 429614: Map Edit -> Select All command to download manager's command
let selectAllMenuItem = document.getElementById("menu_selectAll");
selectAllMenuItem.setAttribute("command", "cmd_selectAllDownloads");
selectAllMenuItem.setAttribute("key", "key_selectAllDownloads");
}, false); }, false);
]]></script> ]]></script>

View File

@ -204,12 +204,34 @@ function openUILinkIn( url, where, allowThirdPartyFixup, postData, referrerUrl )
saveURL(url, null, null, true, null, referrerUrl); saveURL(url, null, null, true, null, referrerUrl);
return; return;
} }
const Cc = Components.classes;
const Ci = Components.interfaces;
var w = getTopWin(); var w = getTopWin();
if (!w || where == "window") { if (!w || where == "window") {
openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no", url, var sa = Cc["@mozilla.org/supports-array;1"].
null, referrerUrl, postData, allowThirdPartyFixup); createInstance(Ci.nsISupportsArray);
var wuri = Cc["@mozilla.org/supports-string;1"].
createInstance(Ci.nsISupportsString);
wuri.data = url;
sa.AppendElement(wuri);
sa.AppendElement(null);
sa.AppendElement(referrerUrl);
sa.AppendElement(postData);
sa.AppendElement(allowThirdPartyFixup);
var ww = Cc["@mozilla.org/embedcomp/window-watcher;1"].
getService(Ci.nsIWindowWatcher);
ww.openWindow(w || window,
getBrowserURL(),
null,
"chrome,dialog=no,all",
sa);
return; return;
} }

View File

@ -50,6 +50,7 @@
#include "nsNetUtil.h" #include "nsNetUtil.h"
#include "nsSeamonkeyProfileMigrator.h" #include "nsSeamonkeyProfileMigrator.h"
#include "nsVoidArray.h" #include "nsVoidArray.h"
#include "nsIProfileMigrator.h"
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// nsSeamonkeyProfileMigrator // nsSeamonkeyProfileMigrator
@ -103,6 +104,15 @@ nsSeamonkeyProfileMigrator::Migrate(PRUint16 aItems, nsIProfileStartup* aStartup
COPY_DATA(CopyHistory, aReplace, nsIBrowserProfileMigrator::HISTORY); COPY_DATA(CopyHistory, aReplace, nsIBrowserProfileMigrator::HISTORY);
COPY_DATA(CopyPasswords, aReplace, nsIBrowserProfileMigrator::PASSWORDS); COPY_DATA(CopyPasswords, aReplace, nsIBrowserProfileMigrator::PASSWORDS);
COPY_DATA(CopyOtherData, aReplace, nsIBrowserProfileMigrator::OTHERDATA); COPY_DATA(CopyOtherData, aReplace, nsIBrowserProfileMigrator::OTHERDATA);
// Need to do startup before trying to copy bookmarks, since bookmarks
// import requires a profile. Can't do it earlier because services might
// end up creating the files we try to copy above.
if (aStartup) {
rv = aStartup->DoStartup();
NS_ENSURE_SUCCESS(rv, rv);
}
COPY_DATA(CopyBookmarks, aReplace, nsIBrowserProfileMigrator::BOOKMARKS); COPY_DATA(CopyBookmarks, aReplace, nsIBrowserProfileMigrator::BOOKMARKS);
if (aReplace && if (aReplace &&
@ -724,10 +734,25 @@ nsresult
nsSeamonkeyProfileMigrator::CopyBookmarks(PRBool aReplace) nsSeamonkeyProfileMigrator::CopyBookmarks(PRBool aReplace)
{ {
if (aReplace) { if (aReplace) {
// Initialize the default bookmarks
nsresult rv = InitializeBookmarks(mTargetProfile); nsresult rv = InitializeBookmarks(mTargetProfile);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
return CopyFile(FILE_NAME_BOOKMARKS, FILE_NAME_BOOKMARKS);
// Merge in the bookmarks from the source profile
nsCOMPtr<nsIFile> sourceFile;
mSourceProfile->Clone(getter_AddRefs(sourceFile));
sourceFile->Append(FILE_NAME_BOOKMARKS);
rv = ImportBookmarksHTML(sourceFile, PR_TRUE, PR_FALSE, EmptyString().get());
NS_ENSURE_SUCCESS(rv, rv);
// we need to set this pref so that on startup
// we don't blow away what we just imported
nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
NS_ENSURE_SUCCESS(rv, rv);
return pref->SetBoolPref("browser.places.importBookmarksHTML", PR_FALSE);
} }
return ImportNetscapeBookmarks(FILE_NAME_BOOKMARKS, return ImportNetscapeBookmarks(FILE_NAME_BOOKMARKS,
NS_LITERAL_STRING("sourceNameSeamonkey").get()); NS_LITERAL_STRING("sourceNameSeamonkey").get());
} }

View File

@ -467,14 +467,16 @@ BrowserGlue.prototype = {
var importer = Cc["@mozilla.org/browser/places/import-export-service;1"]. var importer = Cc["@mozilla.org/browser/places/import-export-service;1"].
getService(Ci.nsIPlacesImportExportService); getService(Ci.nsIPlacesImportExportService);
importer.importHTMLFromFile(bookmarksFile, true /* overwrite existing */); importer.importHTMLFromFile(bookmarksFile, true /* overwrite existing */);
} finally { } catch (err) {
// Report the error, but ignore it.
Cu.reportError(err);
}
prefBranch.setBoolPref("browser.places.importBookmarksHTML", false); prefBranch.setBoolPref("browser.places.importBookmarksHTML", false);
if (restoreDefaultBookmarks) if (restoreDefaultBookmarks)
prefBranch.setBoolPref("browser.bookmarks.restore_default_bookmarks", prefBranch.setBoolPref("browser.bookmarks.restore_default_bookmarks",
false); false);
} }
} }
}
// Initialize bookmark archiving on idle. // Initialize bookmark archiving on idle.
// Once a day, either on idle or shutdown, bookmarks are backed up. // Once a day, either on idle or shutdown, bookmarks are backed up.

View File

@ -22,6 +22,7 @@
* Joe Hughes <jhughes@google.com> * Joe Hughes <jhughes@google.com>
* Dietrich Ayala <dietrich@mozilla.com> * Dietrich Ayala <dietrich@mozilla.com>
* Asaf Romano <mano@mozilla.com> * Asaf Romano <mano@mozilla.com>
* Marco Bonardo <mak77@supereva.it>
* *
* Alternatively, the contents of this file may be used under the terms of * Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or * either the GNU General Public License Version 2 or later (the "GPL"), or
@ -70,9 +71,9 @@
* - "edit" - for editing a bookmark item or a folder. * - "edit" - for editing a bookmark item or a folder.
* @ type (String). Possible values: * @ type (String). Possible values:
* - "bookmark" * - "bookmark"
* @ bookmarkId (Integer) - the id of the bookmark item. * @ itemId (Integer) - the id of the bookmark item.
* - "folder" (also applies to livemarks) * - "folder" (also applies to livemarks)
* @ folderId (Integer) - the id of the folder. * @ itemId (Integer) - the id of the folder.
* @ hiddenRows (Strings array) - optional, list of rows to be hidden * @ hiddenRows (Strings array) - optional, list of rows to be hidden
* regardless of the item edited or added by the dialog. * regardless of the item edited or added by the dialog.
* Possible values: * Possible values:
@ -80,7 +81,7 @@
* - "location" * - "location"
* - "description" * - "description"
* - "keyword" * - "keyword"
* - "load in sidebar" * - "loadInSidebar"
* - "feedURI" * - "feedURI"
* - "siteURI" * - "siteURI"
* - "folder picker" - hides both the tree and the menu. * - "folder picker" - hides both the tree and the menu.
@ -115,9 +116,8 @@ var BookmarkPropertiesPanel = {
_action: null, _action: null,
_itemType: null, _itemType: null,
_folderId: null, _itemId: -1,
_bookmarkId: -1, _uri: null,
_bookmarkURI: null,
_loadBookmarkInSidebar: false, _loadBookmarkInSidebar: false,
_itemTitle: "", _itemTitle: "",
_itemDescription: "", _itemDescription: "",
@ -201,14 +201,14 @@ var BookmarkPropertiesPanel = {
if ("uri" in dialogInfo) { if ("uri" in dialogInfo) {
NS_ASSERT(dialogInfo.uri instanceof Ci.nsIURI, NS_ASSERT(dialogInfo.uri instanceof Ci.nsIURI,
"uri property should be a uri object"); "uri property should be a uri object");
this._bookmarkURI = dialogInfo.uri; this._uri = dialogInfo.uri;
} }
if (typeof(this._itemTitle) != "string") { if (typeof(this._itemTitle) != "string") {
if (this._bookmarkURI) { if (this._uri) {
this._itemTitle = this._itemTitle =
this._getURITitleFromHistory(this._bookmarkURI); this._getURITitleFromHistory(this._uri);
if (!this._itemTitle) if (!this._itemTitle)
this._itemTitle = this._bookmarkURI.spec; this._itemTitle = this._uri.spec;
} }
else else
this._itemTitle = this._strings.getString("newBookmarkDefault"); this._itemTitle = this._strings.getString("newBookmarkDefault");
@ -268,47 +268,45 @@ var BookmarkPropertiesPanel = {
switch (dialogInfo.type) { switch (dialogInfo.type) {
case "bookmark": case "bookmark":
NS_ASSERT("bookmarkId" in dialogInfo); NS_ASSERT("itemId" in dialogInfo);
this._action = ACTION_EDIT; this._action = ACTION_EDIT;
this._itemType = BOOKMARK_ITEM; this._itemType = BOOKMARK_ITEM;
this._bookmarkId = dialogInfo.bookmarkId; this._itemId = dialogInfo.itemId;
this._bookmarkURI = bookmarks.getBookmarkURI(this._bookmarkId); this._uri = bookmarks.getBookmarkURI(this._itemId);
this._itemTitle = bookmarks.getItemTitle(this._bookmarkId); this._itemTitle = bookmarks.getItemTitle(this._itemId);
// keyword // keyword
this._bookmarkKeyword = this._bookmarkKeyword =
bookmarks.getKeywordForBookmark(this._bookmarkId); bookmarks.getKeywordForBookmark(this._itemId);
// Load In Sidebar // Load In Sidebar
this._loadBookmarkInSidebar = this._loadBookmarkInSidebar =
annos.itemHasAnnotation(this._bookmarkId, LOAD_IN_SIDEBAR_ANNO); annos.itemHasAnnotation(this._itemId, LOAD_IN_SIDEBAR_ANNO);
break; break;
case "folder": case "folder":
NS_ASSERT("folderId" in dialogInfo); NS_ASSERT("itemId" in dialogInfo);
this._action = ACTION_EDIT; this._action = ACTION_EDIT;
this._folderId = dialogInfo.folderId; this._itemId = dialogInfo.itemId;
const livemarks = PlacesUtils.livemarks; const livemarks = PlacesUtils.livemarks;
if (livemarks.isLivemark(this._folderId)) { if (livemarks.isLivemark(this._itemId)) {
this._itemType = LIVEMARK_CONTAINER; this._itemType = LIVEMARK_CONTAINER;
this._feedURI = livemarks.getFeedURI(this._folderId); this._feedURI = livemarks.getFeedURI(this._itemId);
this._siteURI = livemarks.getSiteURI(this._folderId); this._siteURI = livemarks.getSiteURI(this._itemId);
} }
else else
this._itemType = BOOKMARK_FOLDER; this._itemType = BOOKMARK_FOLDER;
this._itemTitle = bookmarks.getItemTitle(this._folderId); this._itemTitle = bookmarks.getItemTitle(this._itemId);
break; break;
} }
// Description // Description
// XXXmano: unify the two id fields if (annos.itemHasAnnotation(this._itemId, DESCRIPTION_ANNO)) {
var itemId = dialogInfo.type == "bookmark" ? this._bookmarkId : this._folderId; this._itemDescription = annos.getItemAnnotation(this._itemId,
if (annos.itemHasAnnotation(itemId, DESCRIPTION_ANNO)) {
this._itemDescription = annos.getItemAnnotation(itemId,
DESCRIPTION_ANNO); DESCRIPTION_ANNO);
} }
} }
@ -339,7 +337,6 @@ var BookmarkPropertiesPanel = {
onDialogLoad: function BPP_onDialogLoad() { onDialogLoad: function BPP_onDialogLoad() {
this._determineItemInfo(); this._determineItemInfo();
this._populateProperties(); this._populateProperties();
this._forceHideRows();
this.validateChanges(); this.validateChanges();
this._folderMenuList = this._element("folderMenuList"); this._folderMenuList = this._element("folderMenuList");
@ -453,30 +450,35 @@ var BookmarkPropertiesPanel = {
}, },
/** /**
* Hides fields which were explicitly set hidden by the the dialog opener * Show or hides fields based on item type.
* (see documentation at the top of this file).
*/ */
_forceHideRows: function BPP__forceHideRows() { _showHideRows: function BPP__showHideRows() {
var hiddenRows = window.arguments[0].hiddenRows; var hiddenRows = window.arguments[0].hiddenRows || new Array();
if (!hiddenRows)
return;
if (hiddenRows.indexOf("title") != -1) var isBookmark = this._itemType == BOOKMARK_ITEM;
this._element("namePicker").hidden = true; var isLivemark = this._itemType == LIVEMARK_CONTAINER;
if (hiddenRows.indexOf("location") != -1)
this._element("locationRow").hidden = true; var isQuery = false;
if (hiddenRows.indexOf("keyword") != -1) if (this._uri)
this._element("keywordRow").hidden = true; isQuery = this._uri.schemeIs("place");
if (hiddenRows.indexOf("description")!= -1)
this._element("descriptionRow").hidden = true; this._element("namePicker").hidden =
if (hiddenRows.indexOf("folder picker") != -1) hiddenRows.indexOf("title") != -1;
this._element("folderRow").hidden = true; this._element("locationRow").hidden =
if (hiddenRows.indexOf("feedURI") != -1) hiddenRows.indexOf("location") != -1 || isQuery || !isBookmark;
this._element("livemarkFeedLocationRow").hidden = true; this._element("keywordRow").hidden =
if (hiddenRows.indexOf("siteURI") != -1) hiddenRows.indexOf("location") != -1 || isQuery || !isBookmark;
this._element("livemarkSiteLocationRow").hidden = true; this._element("descriptionRow").hidden =
if (hiddenRows.indexOf("load in sidebar") != -1) hiddenRows.indexOf("description")!= -1
this._element("loadInSidebarCheckbox").hidden = true; this._element("folderRow").hidden =
hiddenRows.indexOf("folder picker") != -1 || isQuery ||
isLivemark || this._action == ACTION_EDIT;
this._element("livemarkFeedLocationRow").hidden =
hiddenRows.indexOf("feedURI") != -1 || !isLivemark;
this._element("livemarkSiteLocationRow").hidden =
hiddenRows.indexOf("siteURI") != -1 || !isLivemark;
this._element("loadInSidebarCheckbox").hidden =
hiddenRows.indexOf("loadInSidebar") != -1 || isQuery || !isBookmark;
}, },
/** /**
@ -490,8 +492,8 @@ var BookmarkPropertiesPanel = {
this._element("descriptionTextfield").value = this._itemDescription; this._element("descriptionTextfield").value = this._itemDescription;
if (this._itemType == BOOKMARK_ITEM) { if (this._itemType == BOOKMARK_ITEM) {
if (this._bookmarkURI) if (this._uri)
this._element("editURLBar").value = this._bookmarkURI.spec; this._element("editURLBar").value = this._uri.spec;
if (typeof(this._bookmarkKeyword) == "string") if (typeof(this._bookmarkKeyword) == "string")
this._element("keywordTextfield").value = this._bookmarkKeyword; this._element("keywordTextfield").value = this._bookmarkKeyword;
@ -499,11 +501,6 @@ var BookmarkPropertiesPanel = {
if (this._loadBookmarkInSidebar) if (this._loadBookmarkInSidebar)
this._element("loadInSidebarCheckbox").checked = true; this._element("loadInSidebarCheckbox").checked = true;
} }
else {
this._element("locationRow").hidden = true;
this._element("keywordRow").hidden = true;
this._element("loadInSidebarCheckbox").hidden = true;
}
if (this._itemType == LIVEMARK_CONTAINER) { if (this._itemType == LIVEMARK_CONTAINER) {
if (this._feedURI) if (this._feedURI)
@ -511,13 +508,8 @@ var BookmarkPropertiesPanel = {
if (this._siteURI) if (this._siteURI)
this._element("feedSiteLocationTextfield").value = this._siteURI.spec; this._element("feedSiteLocationTextfield").value = this._siteURI.spec;
} }
else {
this._element("livemarkFeedLocationRow").hidden = true;
this._element("livemarkSiteLocationRow").hidden = true;
}
if (this._action == ACTION_EDIT) this._showHideRows();
this._element("folderRow").hidden = true;
}, },
_createMicrosummaryMenuItem: _createMicrosummaryMenuItem:
@ -554,15 +546,15 @@ var BookmarkPropertiesPanel = {
var namePicker = this._element("namePicker"); var namePicker = this._element("namePicker");
const annos = PlacesUtils.annotations; const annos = PlacesUtils.annotations;
if (annos.itemHasAnnotation(this._bookmarkId, STATIC_TITLE_ANNO)) { if (annos.itemHasAnnotation(this._itemId, STATIC_TITLE_ANNO)) {
userEnteredNameField.label = annos.getItemAnnotation(this._bookmarkId, userEnteredNameField.label = annos.getItemAnnotation(this._itemId,
STATIC_TITLE_ANNO); STATIC_TITLE_ANNO);
} }
else else
userEnteredNameField.label = this._itemTitle; userEnteredNameField.label = this._itemTitle;
// Non-bookmark items always use the item-title itself // Non-bookmark items always use the item-title itself
if (this._itemType != BOOKMARK_ITEM || !this._bookmarkURI) { if (this._itemType != BOOKMARK_ITEM || !this._uri) {
namePicker.selectedItem = userEnteredNameField; namePicker.selectedItem = userEnteredNameField;
return; return;
} }
@ -570,8 +562,8 @@ var BookmarkPropertiesPanel = {
var itemToSelect = userEnteredNameField; var itemToSelect = userEnteredNameField;
try { try {
this._microsummaries = this._microsummaries =
PlacesUIUtils.microsummaries.getMicrosummaries(this._bookmarkURI, PlacesUIUtils.microsummaries.getMicrosummaries(this._uri,
this._bookmarkId); this._itemId);
} }
catch(ex) { catch(ex) {
// getMicrosummaries will throw an exception if the page to which the URI // getMicrosummaries will throw an exception if the page to which the URI
@ -594,7 +586,7 @@ var BookmarkPropertiesPanel = {
if (this._action == ACTION_EDIT && if (this._action == ACTION_EDIT &&
PlacesUIUtils.microsummaries PlacesUIUtils.microsummaries
.isMicrosummary(this._bookmarkId, microsummary)) .isMicrosummary(this._itemId, microsummary))
itemToSelect = menuItem; itemToSelect = menuItem;
menupopup.appendChild(menuItem); menupopup.appendChild(menuItem);
@ -800,11 +792,7 @@ var BookmarkPropertiesPanel = {
* was open. * was open.
*/ */
_saveChanges: function BPP__saveChanges() { _saveChanges: function BPP__saveChanges() {
var itemId; var itemId = this._itemId;
if (this._itemType == BOOKMARK_ITEM)
itemId = this._bookmarkId;
else
itemId = this._folderId;
var transactions = []; var transactions = [];
@ -824,7 +812,7 @@ var BookmarkPropertiesPanel = {
if (this._itemType == BOOKMARK_ITEM) { if (this._itemType == BOOKMARK_ITEM) {
// location // location
var url = PlacesUIUtils.createFixedURI(this._element("editURLBar").value); var url = PlacesUIUtils.createFixedURI(this._element("editURLBar").value);
if (!this._bookmarkURI.equals(url)) if (!this._uri.equals(url))
transactions.push(PlacesUIUtils.ptm.editBookmarkURI(itemId, url)); transactions.push(PlacesUIUtils.ptm.editBookmarkURI(itemId, url));
// keyword transactions // keyword transactions
@ -864,7 +852,7 @@ var BookmarkPropertiesPanel = {
var feedURI = PlacesUIUtils.createFixedURI(feedURIString); var feedURI = PlacesUIUtils.createFixedURI(feedURIString);
if (!this._feedURI.equals(feedURI)) { if (!this._feedURI.equals(feedURI)) {
transactions.push( transactions.push(
PlacesUIUtils.ptm.editLivemarkFeedURI(this._folderId, feedURI)); PlacesUIUtils.ptm.editLivemarkFeedURI(this._itemId, feedURI));
} }
// Site Location is empty, we can set its URI to null // Site Location is empty, we can set its URI to null
@ -876,7 +864,7 @@ var BookmarkPropertiesPanel = {
if ((!newSiteURI && this._siteURI) || if ((!newSiteURI && this._siteURI) ||
(newSiteURI && (!this._siteURI || !this._siteURI.equals(newSiteURI)))) { (newSiteURI && (!this._siteURI || !this._siteURI.equals(newSiteURI)))) {
transactions.push( transactions.push(
PlacesUIUtils.ptm.editLivemarkSiteURI(this._folderId, newSiteURI)); PlacesUIUtils.ptm.editLivemarkSiteURI(this._itemId, newSiteURI));
} }
} }
@ -940,7 +928,7 @@ var BookmarkPropertiesPanel = {
} }
if (this._charSet) if (this._charSet)
PlacesUtils.history.setCharsetForURI(this._bookmarkURI, this._charSet); PlacesUtils.history.setCharsetForURI(this._uri, this._charSet);
var transactions = [PlacesUIUtils.ptm.createItem(uri, aContainer, aIndex, var transactions = [PlacesUIUtils.ptm.createItem(uri, aContainer, aIndex,
title, keyword, title, keyword,
@ -1111,14 +1099,8 @@ var BookmarkPropertiesPanel = {
if (!selectedNode) if (!selectedNode)
return; return;
var folderId = selectedNode.itemId; var folderId = PlacesUtils.getConcreteItemId(selectedNode);
// Don't set the selected item if the static item for the folder is if (this._getFolderIdFromMenuList() == folderId)
// already selected
var oldSelectedItem = this._folderMenuList.selectedItem;
if ((oldSelectedItem.id == "toolbarFolderItem" &&
folderId == PlacesUtils.toolbarFolderId) ||
(oldSelectedItem.id == "bookmarksRootItem" &&
folderId == PlacesUtils.bookmarksMenuFolderId))
return; return;
var folderItem = this._getFolderMenuItem(folderId); var folderItem = this._getFolderMenuItem(folderId);

View File

@ -77,16 +77,33 @@ const REMOVE_PAGES_MAX_SINGLEREMOVES = 10;
* is provided for informational purposes only! * is provided for informational purposes only!
* @param [optional] aIsTag * @param [optional] aIsTag
* Indicates if parent container is a tag * Indicates if parent container is a tag
* @param [optional] aDropNearItemId
* When defined we will calculate index based on this itemId
* @constructor * @constructor
*/ */
function InsertionPoint(aItemId, aIndex, aOrientation, aIsTag) { function InsertionPoint(aItemId, aIndex, aOrientation, aIsTag,
aDropNearItemId) {
this.itemId = aItemId; this.itemId = aItemId;
this.index = aIndex; this._index = aIndex;
this.orientation = aOrientation; this.orientation = aOrientation;
this.isTag = aIsTag; this.isTag = aIsTag;
this.dropNearItemId = aDropNearItemId;
}
InsertionPoint.prototype = {
set index(val) {
return this._index = val;
},
get index() {
if (this.dropNearItemId > 0) {
// If dropNearItemId is set up we must calculate the real index of
// the item near which we will drop.
var index = PlacesUtils.bookmarks.getItemIndex(this.dropNearItemId);
return this.orientation == Ci.nsITreeView.DROP_BEFORE ? index : index + 1;
}
return this._index;
} }
InsertionPoint.prototype.toString = function IP_toString() {
return "[object InsertionPoint(folder:" + this.itemId + ",index:" + this.index + ",orientation:" + this.orientation + ",isTag:" + this.isTag + ")]";
}; };
/** /**
@ -147,6 +164,8 @@ PlacesController.prototype = {
var selectedNode = this._view.selectedNode; var selectedNode = this._view.selectedNode;
if (selectedNode) { if (selectedNode) {
if (PlacesUtils.nodeIsFolder(selectedNode) || if (PlacesUtils.nodeIsFolder(selectedNode) ||
(PlacesUtils.nodeIsQuery(selectedNode) &&
selectedNode.itemId != -1) ||
(PlacesUtils.nodeIsBookmark(selectedNode) && (PlacesUtils.nodeIsBookmark(selectedNode) &&
!PlacesUtils.nodeIsLivemarkItem(selectedNode))) !PlacesUtils.nodeIsLivemarkItem(selectedNode)))
return true; return true;
@ -266,7 +285,7 @@ PlacesController.prototype = {
* @param aIsMoveCommand * @param aIsMoveCommand
* True if the command for which this method is called only moves the * True if the command for which this method is called only moves the
* selected items to another container, false otherwise. * selected items to another container, false otherwise.
* @returns true if the there's a selection which has no nodes that cannot be removed, * @returns true if all nodes in the selection can be removed,
* false otherwise. * false otherwise.
*/ */
_hasRemovableSelection: function PC__hasRemovableSelection(aIsMoveCommand) { _hasRemovableSelection: function PC__hasRemovableSelection(aIsMoveCommand) {
@ -278,17 +297,8 @@ PlacesController.prototype = {
if (nodes[i] == root) if (nodes[i] == root)
return false; return false;
// Disallow removing shortcuts from the left pane if (PlacesUtils.nodeIsFolder(nodes[i]) &&
var nodeItemId = nodes[i].itemId; !PlacesControllerDragHelper.canMoveContainerNode(nodes[i]))
if (PlacesUtils.annotations
.itemHasAnnotation(nodeItemId, ORGANIZER_QUERY_ANNO))
return false;
// Disallow removing the toolbar, menu and unfiled-bookmarks folders
if (!aIsMoveCommand &&
(nodeItemId == PlacesUtils.toolbarFolderId ||
nodeItemId == PlacesUtils.unfiledBookmarksFolderId ||
nodeItemId == PlacesUtils.bookmarksMenuFolderId))
return false; return false;
// We don't call nodeIsReadOnly here, because nodeIsReadOnly means that // We don't call nodeIsReadOnly here, because nodeIsReadOnly means that
@ -383,12 +393,12 @@ PlacesController.prototype = {
* "link" node is a URI * "link" node is a URI
* "bookmark" node is a bookamrk * "bookmark" node is a bookamrk
* "livemarkChild" node is a child of a livemark * "livemarkChild" node is a child of a livemark
* "tagChild" node is a child of a tag
* "folder" node is a folder * "folder" node is a folder
* "query" node is a query * "query" node is a query
* "dynamiccontainer" node is a dynamic container * "dynamiccontainer" node is a dynamic container
* "separator" node is a separator line * "separator" node is a separator line
* "host" node is a host * "host" node is a host
* "mutable" node can have items inserted or reordered
* *
* @returns an array of objects corresponding the selected nodes. Each * @returns an array of objects corresponding the selected nodes. Each
* object has each of the properties above set if its corresponding * object has each of the properties above set if its corresponding
@ -446,25 +456,22 @@ PlacesController.prototype = {
uri = PlacesUtils._uri(node.uri); uri = PlacesUtils._uri(node.uri);
if (PlacesUtils.nodeIsBookmark(node)) { if (PlacesUtils.nodeIsBookmark(node)) {
nodeData["bookmark"] = true; nodeData["bookmark"] = true;
PlacesUtils.nodeIsTagQuery(node.parent)
var mss = PlacesUIUtils.microsummaries; var mss = PlacesUIUtils.microsummaries;
if (mss.hasMicrosummary(node.itemId)) if (mss.hasMicrosummary(node.itemId))
nodeData["microsummary"] = true; nodeData["microsummary"] = true;
else if (node.parent &&
PlacesUtils.nodeIsLivemarkContainer(node.parent)) var parentNode = node.parent;
if (parentNode) {
if (PlacesUtils.nodeIsTagQuery(parentNode))
nodeData["tagChild"] = true;
else if (PlacesUtils.nodeIsLivemarkContainer(parentNode))
nodeData["livemarkChild"] = true; nodeData["livemarkChild"] = true;
} }
}
break; break;
} }
// Mutability is whether or not a container can have selected items
// inserted or reordered. It does _not_ dictate whether or not the
// container can have items removed from it, since some containers that
// aren't reorderable can have items removed from them, e.g. a history
// list.
if (!PlacesUtils.nodeIsReadOnly(node) &&
!PlacesUtils.isReadonlyFolder(node.parent || root))
nodeData["mutable"] = true;
// annotations // annotations
if (uri) { if (uri) {
var names = PlacesUtils.annotations.getPageAnnotationNames(uri, {}); var names = PlacesUtils.annotations.getPageAnnotationNames(uri, {});
@ -509,8 +516,12 @@ PlacesController.prototype = {
} }
} }
if (aMenuItem.hasAttribute("selection")) { var selectionAttr = aMenuItem.getAttribute("selection");
var showRules = aMenuItem.getAttribute("selection").split("|"); if (selectionAttr) {
if (selectionAttr == "any")
return true;
var showRules = selectionAttr.split("|");
var anyMatched = false; var anyMatched = false;
function metaDataNodeMatches(metaDataNode, rules) { function metaDataNodeMatches(metaDataNode, rules) {
for (var i=0; i < rules.length; i++) { for (var i=0; i < rules.length; i++) {
@ -553,9 +564,11 @@ PlacesController.prototype = {
* selection attribute. A menu-item would be hidden if at least one of the * selection attribute. A menu-item would be hidden if at least one of the
* given rules apply to one of the selected nodes. The rules should be * given rules apply to one of the selected nodes. The rules should be
* separated with the | character. * separated with the | character.
* 5) The visibility state of a menu-item is unchanged if none of these * 5) The "hideifnoinsetionpoint" attribute may be set on a menu-item to
* true if it should be hidden when there's no insertion point
* 6) The visibility state of a menu-item is unchanged if none of these
* attribute are set. * attribute are set.
* 6) These attributes should not be set on separators for which the * 7) These attributes should not be set on separators for which the
* visibility state is "auto-detected." * visibility state is "auto-detected."
* @param aPopup * @param aPopup
* The menupopup to build children into. * The menupopup to build children into.
@ -563,6 +576,8 @@ PlacesController.prototype = {
*/ */
buildContextMenu: function PC_buildContextMenu(aPopup) { buildContextMenu: function PC_buildContextMenu(aPopup) {
var metadata = this._buildSelectionMetadata(); var metadata = this._buildSelectionMetadata();
var ip = this._view.insertionPoint;
var noIp = !ip || ip.isTag;
var separator = null; var separator = null;
var visibleItemsBeforeSep = false; var visibleItemsBeforeSep = false;
@ -570,7 +585,9 @@ PlacesController.prototype = {
for (var i = 0; i < aPopup.childNodes.length; ++i) { for (var i = 0; i < aPopup.childNodes.length; ++i) {
var item = aPopup.childNodes[i]; var item = aPopup.childNodes[i];
if (item.localName != "menuseparator") { if (item.localName != "menuseparator") {
item.hidden = !this._shouldShowMenuItem(item, metadata); item.hidden = (item.getAttribute("hideifnoinsetionpoint") == "true" && noIp) ||
!this._shouldShowMenuItem(item, metadata);
if (!item.hidden) { if (!item.hidden) {
visibleItemsBeforeSep = true; visibleItemsBeforeSep = true;
anyVisible = true; anyVisible = true;
@ -631,9 +648,10 @@ PlacesController.prototype = {
return; return;
if (PlacesUtils.nodeIsFolder(node)) if (PlacesUtils.nodeIsFolder(node))
PlacesUIUtils.showFolderProperties(node.itemId); PlacesUIUtils.showItemProperties(node.itemId, "folder");
else if (PlacesUtils.nodeIsBookmark(node)) else if (PlacesUtils.nodeIsBookmark(node) ||
PlacesUIUtils.showBookmarkProperties(node.itemId); PlacesUtils.nodeIsQuery(node))
PlacesUIUtils.showItemProperties(node.itemId, "bookmark");
}, },
/** /**
@ -866,6 +884,15 @@ PlacesController.prototype = {
transactions.push(PlacesUIUtils.ptm.untagURI(uri, [tagItemId])); transactions.push(PlacesUIUtils.ptm.untagURI(uri, [tagItemId]));
continue; continue;
} }
else if (PlacesUtils.nodeIsQuery(node.parent) &&
asQuery(node.parent).queryOptions.queryType ==
Ci.nsINavHistoryQueryOptions.QUERY_TYPE_HISTORY &&
node.uri) {
// remove page from history, history deletes are not undoable
var bhist = PlacesUtils.history.QueryInterface(Ci.nsIBrowserHistory);
bhist.removePage(PlacesUtils._uri(node.uri));
continue;
}
transactions.push(PlacesUIUtils.ptm.removeItem(node.itemId)); transactions.push(PlacesUIUtils.ptm.removeItem(node.itemId));
} }
@ -990,6 +1017,7 @@ PlacesController.prototype = {
* elsewhere. * elsewhere.
*/ */
getTransferData: function PC_getTransferData(dragAction) { getTransferData: function PC_getTransferData(dragAction) {
var copy = dragAction == Ci.nsIDragService.DRAGDROP_ACTION_COPY;
var result = this._view.getResult(); var result = this._view.getResult();
var oldViewer = result.viewer; var oldViewer = result.viewer;
try { try {
@ -1009,7 +1037,7 @@ PlacesController.prototype = {
var data = new TransferData(); var data = new TransferData();
function addData(type, overrideURI) { function addData(type, overrideURI) {
data.addDataForFlavour(type, PlacesUIUtils._wrapString( data.addDataForFlavour(type, PlacesUIUtils._wrapString(
PlacesUtils.wrapNode(node, type, overrideURI))); PlacesUtils.wrapNode(node, type, overrideURI, copy)));
} }
function addURIData(overrideURI) { function addURIData(overrideURI) {
@ -1077,7 +1105,8 @@ PlacesController.prototype = {
uri) + suffix); uri) + suffix);
var placeSuffix = i < (nodes.length - 1) ? "," : ""; var placeSuffix = i < (nodes.length - 1) ? "," : "";
return PlacesUtils.wrapNode(node, type, overrideURI) + placeSuffix; var resolveShortcuts = !PlacesControllerDragHelper.canMoveContainerNode(node);
return PlacesUtils.wrapNode(node, type, overrideURI, resolveShortcuts) + placeSuffix;
} }
// all items wrapped as TYPE_X_MOZ_PLACE // all items wrapped as TYPE_X_MOZ_PLACE
@ -1241,7 +1270,7 @@ var PlacesControllerDragHelper = {
/** /**
* @returns The current active drag session. Returns null if there is none. * @returns The current active drag session. Returns null if there is none.
*/ */
getSession: function VO__getSession() { getSession: function PCDH__getSession() {
var dragService = Cc["@mozilla.org/widget/dragservice;1"]. var dragService = Cc["@mozilla.org/widget/dragservice;1"].
getService(Ci.nsIDragService); getService(Ci.nsIDragService);
return dragService.getCurrentSession(); return dragService.getCurrentSession();
@ -1301,6 +1330,71 @@ var PlacesControllerDragHelper = {
return true; return true;
}, },
/**
* Determines if a container node can be moved.
*
* @param aNode
* A bookmark folder node.
* @param [optional] aInsertionPoint
* The insertion point of the drop target.
* @returns True if the container can be moved.
*/
canMoveContainerNode:
function PCDH_canMoveContainerNode(aNode, aInsertionPoint) {
// can't move query root
if (!aNode.parent)
return false;
var targetId = aInsertionPoint ? aInsertionPoint.itemId : -1;
var parentId = PlacesUtils.getConcreteItemId(aNode.parent);
var concreteId = PlacesUtils.getConcreteItemId(aNode);
// can't move tag containers
if (PlacesUtils.nodeIsTagQuery(aNode))
return false;
// check is child of a read-only container
if (PlacesUtils.nodeIsReadOnly(aNode.parent))
return false;
// check for special folders, etc
if (!this.canMoveContainer(aNode.itemId, parentId))
return false;
return true;
},
/**
* Determines if a container node can be moved.
*
* @param aId
* A bookmark folder id.
* @param [optional] aParentId
* The parent id of the folder.
* @returns True if the container can be moved to the target.
*/
canMoveContainer:
function PCDH_canMoveContainer(aId, aParentId) {
if (aId == -1)
return false;
// Disallow moving of roots and special folders
const ROOTS = [PlacesUtils.placesRootId, PlacesUtils.bookmarksMenuFolderId,
PlacesUtils.tagsFolderId, PlacesUtils.unfiledBookmarksFolderId,
PlacesUtils.toolbarFolderId];
if (ROOTS.indexOf(aId) != -1)
return false;
// Get parent id if necessary
if (aParentId == null || aParentId == -1)
aParentId = PlacesUtils.bookmarks.getFolderIdForItem(aId);
if(PlacesUtils.bookmarks.getFolderReadonly(aParentId))
return false;
return true;
},
/** /**
* Creates a Transferable object that can be filled with data of types * Creates a Transferable object that can be filled with data of types
* supported by a view. * supported by a view.
@ -1327,6 +1421,8 @@ var PlacesControllerDragHelper = {
*/ */
onDrop: function PCDH_onDrop(insertionPoint) { onDrop: function PCDH_onDrop(insertionPoint) {
var session = this.getSession(); var session = this.getSession();
// XXX dragAction is not valid, so we also set copy below by checking
// whether the dropped item is moveable, before creating the transaction
var copy = session.dragAction & Ci.nsIDragService.DRAGDROP_ACTION_COPY; var copy = session.dragAction & Ci.nsIDragService.DRAGDROP_ACTION_COPY;
var transactions = []; var transactions = [];
var xferable = this._initTransferable(session); var xferable = this._initTransferable(session);
@ -1344,13 +1440,13 @@ var PlacesControllerDragHelper = {
// There's only ever one in the D&D case. // There's only ever one in the D&D case.
var unwrapped = PlacesUtils.unwrapNodes(data.value.data, var unwrapped = PlacesUtils.unwrapNodes(data.value.data,
flavor.value)[0]; flavor.value)[0];
var index = insertionPoint.index; var index = insertionPoint.index;
// Adjust insertion index to prevent reversal of dragged items. When you // Adjust insertion index to prevent reversal of dragged items. When you
// drag multiple elts upward: need to increment index or each successive // drag multiple elts upward: need to increment index or each successive
// elt will be inserted at the same index, each above the previous. // elt will be inserted at the same index, each above the previous.
if ((index != -1) && ((index < unwrapped.index) || if (index != -1 && index < unwrapped.index) {
(unwrapped.folder && (index < unwrapped.folder.index)))) {
index = index + movedCount; index = index + movedCount;
movedCount++; movedCount++;
} }
@ -1362,6 +1458,12 @@ var PlacesControllerDragHelper = {
transactions.push(PlacesUIUtils.ptm.tagURI(uri,[tagItemId])); transactions.push(PlacesUIUtils.ptm.tagURI(uri,[tagItemId]));
} }
else { else {
if (!this.canMoveContainer(unwrapped.id, null))
copy = true;
else if (unwrapped.concreteId &&
!this.canMoveContainer(unwrapped.concreteId, null))
copy = true;
transactions.push(PlacesUIUtils.makeTransaction(unwrapped, transactions.push(PlacesUIUtils.makeTransaction(unwrapped,
flavor.value, insertionPoint.itemId, flavor.value, insertionPoint.itemId,
index, copy)); index, copy));

View File

@ -67,21 +67,25 @@ var gEditItemOverlay = {
}, },
_showHideRows: function EIO__showHideRows() { _showHideRows: function EIO__showHideRows() {
var isBookmark = this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK; var isBookmark = this._itemId != -1 &&
this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK;
var isQuery = false;
if (this._uri)
isQuery = this._uri.schemeIs("place");
this._element("nameRow").collapsed = this._hiddenRows.indexOf("name") != -1; this._element("nameRow").collapsed = this._hiddenRows.indexOf("name") != -1;
this._element("folderRow").collapsed = this._element("folderRow").collapsed =
this._hiddenRows.indexOf("folderPicker") != -1; this._hiddenRows.indexOf("folderPicker") != -1 || this._readOnly;
this._element("tagsRow").collapsed = !isBookmark ||
this._hiddenRows.indexOf("tags") != -1; this._element("tagsRow").collapsed = !this._uri ||
this._hiddenRows.indexOf("tags") != -1 || isQuery;
this._element("descriptionRow").collapsed = this._element("descriptionRow").collapsed =
this._hiddenRows.indexOf("description") != -1 || this._hiddenRows.indexOf("description") != -1 || this._readOnly;
this._readOnly;
this._element("keywordRow").collapsed = !isBookmark || this._readOnly || this._element("keywordRow").collapsed = !isBookmark || this._readOnly ||
this._hiddenRows.indexOf("keyword") != -1; this._hiddenRows.indexOf("keyword") != -1 || isQuery;
this._element("locationRow").collapsed = !isBookmark || this._element("locationRow").collapsed = !isBookmark || isQuery ||
this._hiddenRows.indexOf("location") != -1; this._hiddenRows.indexOf("location") != -1;
this._element("loadInSidebarCheckbox").collapsed = !isBookmark || this._element("loadInSidebarCheckbox").collapsed = !isBookmark || isQuery ||
this._readOnly || this._hiddenRows.indexOf("loadInSidebar") != -1; this._readOnly || this._hiddenRows.indexOf("loadInSidebar") != -1;
this._element("feedLocationRow").collapsed = !this._isLivemark || this._element("feedLocationRow").collapsed = !this._isLivemark ||
this._hiddenRows.indexOf("feedLocation") != -1; this._hiddenRows.indexOf("feedLocation") != -1;
@ -91,8 +95,10 @@ var gEditItemOverlay = {
/** /**
* Initialize the panel * Initialize the panel
* @param aItemId * @param aFor
* a places-itemId of a bookmark, folder or a live bookmark. * Either a places-itemId (of a bookmark, folder or a live bookmark),
* or a URI object (in which case, the panel would be initialized in
* read-only mode).
* @param [optional] aInfo * @param [optional] aInfo
* JS object which stores additional info for the panel * JS object which stores additional info for the panel
* initialization. The following properties may bet set: * initialization. The following properties may bet set:
@ -103,21 +109,57 @@ var gEditItemOverlay = {
* * forceReadOnly - set this flag to initialize the panel to its * * forceReadOnly - set this flag to initialize the panel to its
* read-only (view) mode even if the given item is editable. * read-only (view) mode even if the given item is editable.
*/ */
initPanel: function EIO_initPanel(aItemId, aInfo) { initPanel: function EIO_initPanel(aFor, aInfo) {
const bms = PlacesUtils.bookmarks;
this._folderMenuList = this._element("folderMenuList"); this._folderMenuList = this._element("folderMenuList");
this._folderTree = this._element("folderTree"); this._folderTree = this._element("folderTree");
this._itemId = aItemId;
this._itemType = bms.getItemType(this._itemId);
this._determineInfo(aInfo);
var container = bms.getFolderIdForItem(this._itemId); this._determineInfo(aInfo);
if (aFor instanceof Ci.nsIURI) {
this._itemId = -1;
this._uri = aFor;
this._readOnly = true;
}
else {
this._itemId = aFor;
var container = PlacesUtils.bookmarks.getFolderIdForItem(this._itemId);
this._itemType = PlacesUtils.bookmarks.getItemType(this._itemId);
if (this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK) { if (this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK) {
this._uri = bms.getBookmarkURI(this._itemId); this._uri = PlacesUtils.bookmarks.getBookmarkURI(this._itemId);
this._isLivemark = false;
if (!this._readOnly) // If readOnly wasn't forced through aInfo if (!this._readOnly) // If readOnly wasn't forced through aInfo
this._readOnly = PlacesUtils.livemarks.isLivemark(container); this._readOnly = PlacesUtils.livemarks.isLivemark(container);
this._initTextField("keywordField",
PlacesUtils.bookmarks
.getKeywordForBookmark(this._itemId));
// Load In Sidebar checkbox
this._element("loadInSidebarCheckbox").checked =
PlacesUtils.annotations.itemHasAnnotation(this._itemId,
LOAD_IN_SIDEBAR_ANNO);
}
else {
if (!this._readOnly) // If readOnly wasn't forced through aInfo
this._readOnly = false;
this._uri = null;
this._isLivemark = PlacesUtils.livemarks.isLivemark(this._itemId);
if (this._isLivemark) {
var feedURI = PlacesUtils.livemarks.getFeedURI(this._itemId);
var siteURI = PlacesUtils.livemarks.getSiteURI(this._itemId);
this._initTextField("feedLocationField", feedURI.spec);
this._initTextField("siteLocationField", siteURI ? siteURI.spec : "");
}
}
// folder picker
this._initFolderMenuList(container);
// description field
this._initTextField("descriptionField",
PlacesUIUtils.getItemDescription(this._itemId));
}
if (this._itemId == -1 ||
this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK) {
this._isLivemark = false;
this._initTextField("locationField", this._uri.spec); this._initTextField("locationField", this._uri.spec);
this._initTextField("tagsField", this._initTextField("tagsField",
@ -127,42 +169,16 @@ var gEditItemOverlay = {
// tags selector // tags selector
this._rebuildTagsSelectorList(); this._rebuildTagsSelectorList();
this._initTextField("keywordField",
bms.getKeywordForBookmark(this._itemId));
// Load In Sidebar checkbox
this._element("loadInSidebarCheckbox").checked =
PlacesUtils.annotations.itemHasAnnotation(this._itemId,
LOAD_IN_SIDEBAR_ANNO);
} }
else {
if (!this._readOnly) // If readOnly wasn't forced through aInfo
this._readOnly = false;
this._isLivemark = PlacesUtils.livemarks.isLivemark(this._itemId);
if (this._isLivemark) {
var feedURI = PlacesUtils.livemarks.getFeedURI(this._itemId);
var siteURI = PlacesUtils.livemarks.getSiteURI(this._itemId);
this._initTextField("feedLocationField", feedURI.spec);
this._initTextField("siteLocationField", siteURI ? siteURI.spec : "");
}
this._uri = null;
}
// folder picker
this._initFolderMenuList(container);
// name picker // name picker
this._initNamePicker(); this._initNamePicker();
// description field
this._initTextField("descriptionField",
PlacesUIUtils.getItemDescription(this._itemId));
this._showHideRows(); this._showHideRows();
// observe changes // observe changes
if (!this._observersAdded) { if (!this._observersAdded) {
if (this._itemId != -1)
PlacesUtils.bookmarks.addObserver(this, false); PlacesUtils.bookmarks.addObserver(this, false);
window.addEventListener("unload", this, false); window.addEventListener("unload", this, false);
this._observersAdded = true; this._observersAdded = true;
@ -309,13 +325,14 @@ var gEditItemOverlay = {
}, },
_getItemStaticTitle: function EIO__getItemStaticTitle() { _getItemStaticTitle: function EIO__getItemStaticTitle() {
if (this._itemId == -1)
return PlacesUtils.history.getPageTitle(this._uri);
const annos = PlacesUtils.annotations; const annos = PlacesUtils.annotations;
if (annos.itemHasAnnotation(this._itemId, STATIC_TITLE_ANNO)) if (annos.itemHasAnnotation(this._itemId, STATIC_TITLE_ANNO))
return annos.getItemAnnotation(this._itemId, STATIC_TITLE_ANNO); return annos.getItemAnnotation(this._itemId, STATIC_TITLE_ANNO);
var title = PlacesUtils.bookmarks.getItemTitle(this._itemId);
if (title === null) return PlacesUtils.bookmarks.getItemTitle(this._itemId);
return PlacesUtils.history.getPageTitle(this._uri);
return title;
}, },
_initNamePicker: function EIO_initNamePicker() { _initNamePicker: function EIO_initNamePicker() {
@ -337,7 +354,8 @@ var gEditItemOverlay = {
var itemToSelect = userEnteredNameField; var itemToSelect = userEnteredNameField;
try { try {
if (this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK && if (this._itemId != -1 &&
this._itemType == Ci.nsINavBookmarksService.TYPE_BOOKMARK &&
!this._readOnly) !this._readOnly)
this._microsummaries = PlacesUIUtils.microsummaries this._microsummaries = PlacesUIUtils.microsummaries
.getMicrosummaries(this._uri, -1); .getMicrosummaries(this._uri, -1);
@ -433,7 +451,9 @@ var gEditItemOverlay = {
} }
if (this._observersAdded) { if (this._observersAdded) {
if (this._itemId != -1)
PlacesUtils.bookmarks.removeObserver(this); PlacesUtils.bookmarks.removeObserver(this);
this._observersAdded = false; this._observersAdded = false;
} }
if (this._microsummaries) { if (this._microsummaries) {
@ -441,6 +461,7 @@ var gEditItemOverlay = {
this._microsummaries = null; this._microsummaries = null;
} }
this._itemId = -1; this._itemId = -1;
this._uri = null;
}, },
onTagsFieldBlur: function EIO_onTagsFieldBlur() { onTagsFieldBlur: function EIO_onTagsFieldBlur() {

View File

@ -68,20 +68,6 @@ function HistorySidebarInit()
} }
function initContextMenu() { function initContextMenu() {
// Force-hide items in the context menu which never apply to this view
var alwaysHideElements = ["placesContext_new:bookmark",
"placesContext_new:folder",
"placesContext_new:separator",
"placesContext_cut",
"placesContext_paste",
"placesContext_sortBy:name"];
for (var i=0; i < alwaysHideElements.length; i++) {
var elt = document.getElementById(alwaysHideElements[i]);
elt.removeAttribute("selection");
elt.removeAttribute("forcehideselection");
elt.hidden = true;
}
// Insert "Bookmark This Link" right before the copy item // Insert "Bookmark This Link" right before the copy item
document.getElementById("placesContext") document.getElementById("placesContext")
.insertBefore(document.getElementById("addBookmarkContextItem"), .insertBefore(document.getElementById("addBookmarkContextItem"),

View File

@ -147,7 +147,7 @@
newMarginTop = scrollBoxObject.height; newMarginTop = scrollBoxObject.height;
// set the new marginTop based on arrowscrollbox // set the new marginTop based on arrowscrollbox
newMarginTop += scrollBoxObject.y - this.boxObject.y; newMarginTop += scrollBoxObject.y - this._scrollBox.boxObject.y;
this._indicatorBar.firstChild.style.marginTop = newMarginTop + "px"; this._indicatorBar.firstChild.style.marginTop = newMarginTop + "px";
this._indicatorBar.hidden = false; this._indicatorBar.hidden = false;
]]></body> ]]></body>
@ -181,6 +181,8 @@
this._overFolder.closeMenuTimer = this._overFolder this._overFolder.closeMenuTimer = this._overFolder
.setTimer(this._overFolder.hoverTime); .setTimer(this._overFolder.hoverTime);
} }
this._rootView._draggedNode = null;
]]></body> ]]></body>
</method> </method>
@ -189,9 +191,10 @@
<parameter name="aXferData"/> <parameter name="aXferData"/>
<parameter name="aDragAction"/> <parameter name="aDragAction"/>
<body><![CDATA[ <body><![CDATA[
// Force a copy action if parent node is a query // Force a copy action if parent node is a query or not-removable
if (aEvent.ctrlKey || if (aEvent.ctrlKey ||
PlacesUtils.nodeIsQuery(aEvent.target.node.parent)) PlacesUtils.nodeIsQuery(aEvent.target.node.parent) ||
PlacesControllerDragHelper.canMoveContainerNode(aEvent.target.node))
aDragAction.action = Ci.nsIDragService.DRAGDROP_ACTION_COPY; aDragAction.action = Ci.nsIDragService.DRAGDROP_ACTION_COPY;
// activate the view and cache the dragged node // activate the view and cache the dragged node
@ -895,8 +898,9 @@
<property name="insertionPoint"> <property name="insertionPoint">
<getter><![CDATA[ <getter><![CDATA[
// By default, the insertion point is at the top level, at the end. // By default, the insertion point is at the top level, at the end.
var index = -1; var index = PlacesUtils.bookmarks.DEFAULT_INDEX;
var folderId = 0; var folderId = 0;
var orientation = Ci.nsITreeView.DROP_BEFORE;
var isTag = false; var isTag = false;
if (PlacesUtils.nodeIsFolder(this._resultNode)) { if (PlacesUtils.nodeIsFolder(this._resultNode)) {
@ -906,20 +910,21 @@
var selectedNode = this.selectedNode; var selectedNode = this.selectedNode;
if (selectedNode) { if (selectedNode) {
if (PlacesUtils.nodeIsFolder(selectedNode)) { var popupNode = document.popupNode;
// If there is a folder selected, the insertion point is the if (popupNode == popupNode.parentNode._emptyMenuItem) {
// end of the folder. // If (empty) menuitem is selected the insertion point
// is inside the folder, at the end.
folderId = PlacesUtils.getConcreteItemId(selectedNode); folderId = PlacesUtils.getConcreteItemId(selectedNode);
orientation = Ci.nsITreeView.DROP_ON;
} }
else { else {
// If there is another type of node selected, the insertion point // In all other cases the insertion point is before that node.
// is after that node.
folderId = PlacesUtils.getConcreteItemId(selectedNode.parent); folderId = PlacesUtils.getConcreteItemId(selectedNode.parent);
index = PlacesUtils.getIndexOfNode(selectedNode); index = PlacesUtils.getIndexOfNode(selectedNode);
isTag = PlacesUtils.nodeIsTagQuery(selectedNode.parent); isTag = PlacesUtils.nodeIsTagQuery(selectedNode.parent);
} }
} }
return new InsertionPoint(folderId, index, 1, isTag); return new InsertionPoint(folderId, index, orientation, isTag);
]]></getter> ]]></getter>
</property> </property>

View File

@ -104,6 +104,10 @@ var PlacesOrganizer = {
var historyMenuForward = document.getElementById("historyMenuForward"); var historyMenuForward = document.getElementById("historyMenuForward");
historyMenuForward.removeAttribute("key"); historyMenuForward.removeAttribute("key");
#endif #endif
// remove the "Properties" context-menu item, we've our own details pane
document.getElementById("placesContext")
.removeChild(document.getElementById("placesContext_show:info"));
}, },
QueryInterface: function PO_QueryInterface(aIID) { QueryInterface: function PO_QueryInterface(aIID) {
@ -208,8 +212,10 @@ var PlacesOrganizer = {
options.excludeItems = false; options.excludeItems = false;
var placeURI = PlacesUtils.history.queriesToQueryString(queries, queries.length, options); var placeURI = PlacesUtils.history.queriesToQueryString(queries, queries.length, options);
// update the right-pane contents // Update the right-pane contents.
if (this._content.place != placeURI) // We must update also if the user clears the search box, in that case
// we are called with resetSearchBox == false.
if (this._content.place != placeURI || !resetSearchBox)
this._content.place = placeURI; this._content.place = placeURI;
// This just updates the back/forward buttons, it doesn't call us back // This just updates the back/forward buttons, it doesn't call us back
@ -224,6 +230,7 @@ var PlacesOrganizer = {
} }
this._setSearchScopeForNode(node); this._setSearchScopeForNode(node);
this._fillDetailsPane(node);
}, },
/** /**
@ -305,6 +312,18 @@ var PlacesOrganizer = {
} }
}, },
/**
* Handle focus changes on the trees.
* When moving focus between panes we should update the details pane contents.
* @param aEvent
* The mouse event.
*/
onTreeFocus: function PO_onTreeFocus(aEvent) {
var currentView = aEvent.currentTarget;
var selectedNode = currentView.selectedNode;
this._fillDetailsPane(selectedNode);
},
openFlatContainer: function PO_openFlatContainerFlatContainer(aContainer) { openFlatContainer: function PO_openFlatContainerFlatContainer(aContainer) {
if (aContainer.itemId != -1) if (aContainer.itemId != -1)
this._places.selectItems([aContainer.itemId]); this._places.selectItems([aContainer.itemId]);
@ -572,9 +591,10 @@ var PlacesOrganizer = {
*/ */
var infoBox = document.getElementById("infoBox"); var infoBox = document.getElementById("infoBox");
var infoBoxExpander = document.getElementById("infoBoxExpander"); var infoBoxExpander = document.getElementById("infoBoxExpander");
if ((PlacesUtils.nodeIsFolder(aNode) && if (aNode.itemId != -1 &&
((PlacesUtils.nodeIsFolder(aNode) &&
!PlacesUtils.nodeIsLivemarkContainer(aNode)) || !PlacesUtils.nodeIsLivemarkContainer(aNode)) ||
PlacesUtils.nodeIsLivemarkItem(aNode)) { PlacesUtils.nodeIsLivemarkItem(aNode))) {
if (infoBox.getAttribute("minimal") == "true") if (infoBox.getAttribute("minimal") == "true")
infoBox.setAttribute("wasminimal", "true"); infoBox.setAttribute("wasminimal", "true");
infoBox.removeAttribute("minimal"); infoBox.removeAttribute("minimal");
@ -599,6 +619,13 @@ var PlacesOrganizer = {
}, },
onContentTreeSelect: function PO_onContentTreeSelect() { onContentTreeSelect: function PO_onContentTreeSelect() {
this._fillDetailsPane(this._content.selectedNode);
},
_fillDetailsPane: function PO__fillDetailsPane(aSelectedNode) {
var infoBox = document.getElementById("infoBox");
var detailsDeck = document.getElementById("detailsDeck");
// If a textbox within a panel is focused, force-blur it so its contents // If a textbox within a panel is focused, force-blur it so its contents
// are saved // are saved
if (gEditItemOverlay.itemId != -1) { if (gEditItemOverlay.itemId != -1) {
@ -607,39 +634,33 @@ var PlacesOrganizer = {
focusedElement instanceof HTMLTextAreaElement) && focusedElement instanceof HTMLTextAreaElement) &&
/^editBMPanel.*/.test(focusedElement.parentNode.parentNode.id)) /^editBMPanel.*/.test(focusedElement.parentNode.parentNode.id))
focusedElement.blur(); focusedElement.blur();
// don't update the panel if we are already editing this node
if (aSelectedNode && gEditItemOverlay.itemId == aSelectedNode.itemId &&
detailsDeck.selectedIndex == 1)
return;
} }
var infoBox = document.getElementById("infoBox"); if (aSelectedNode && !PlacesUtils.nodeIsSeparator(aSelectedNode)) {
var detailsDeck = document.getElementById("detailsDeck");
detailsDeck.selectedIndex = 1; detailsDeck.selectedIndex = 1;
var selectedNode = this._content.selectedNode;
if (selectedNode) {
infoBox.hidden = false; infoBox.hidden = false;
if (selectedNode.itemId != -1 &&
!PlacesUtils.nodeIsSeparator(selectedNode)) {
if (this._paneDisabled) {
this._setDetailsFieldsDisabledState(false);
this._paneDisabled = false;
}
// Using the concrete itemId is arguably wrong. The bookmarks API // Using the concrete itemId is arguably wrong. The bookmarks API
// does allow setting properties for folder shortcuts as well, but since // does allow setting properties for folder shortcuts as well, but since
// the UI does not distinct between the couple, we better just show // the UI does not distinct between the couple, we better just show
// the concrete item properties. // the concrete item properties.
if (selectedNode.type == if (aSelectedNode.type ==
Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT) { Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT) {
gEditItemOverlay.initPanel(asQuery(selectedNode).folderItemId, gEditItemOverlay.initPanel(asQuery(aSelectedNode).folderItemId,
{ hiddenRows: ["folderPicker"], { hiddenRows: ["folderPicker"],
forceReadOnly: true }); forceReadOnly: true });
} }
else { else {
gEditItemOverlay.initPanel(selectedNode.itemId, var itemId = PlacesUtils.getConcreteItemId(aSelectedNode);
gEditItemOverlay.initPanel(itemId != -1 ? itemId :
PlacesUtils._uri(aSelectedNode.uri),
{ hiddenRows: ["folderPicker"] }); { hiddenRows: ["folderPicker"] });
} }
this._detectAndSetDetailsPaneMinimalState(aSelectedNode);
this._detectAndSetDetailsPaneMinimalState(selectedNode);
return;
}
} }
else { else {
detailsDeck.selectedIndex = 0; detailsDeck.selectedIndex = 0;
@ -664,13 +685,6 @@ var PlacesOrganizer = {
} }
} }
} }
// Nothing to do if the pane was already disabled
if (!this._paneDisabled) {
gEditItemOverlay.uninitPanel();
this._setDetailsFieldsDisabledState(true);
this._paneDisabled = true;
}
}, },
// NOT YET USED // NOT YET USED
@ -716,13 +730,12 @@ var PlacesOrganizer = {
saveSearch: function PO_saveSearch() { saveSearch: function PO_saveSearch() {
// Get the place: uri for the query. // Get the place: uri for the query.
// If the advanced query builder is showing, use that. // If the advanced query builder is showing, use that.
var queries = PlacesQueryBuilder.queries;
var options = this.getCurrentOptions(); var options = this.getCurrentOptions();
#ifndef PLACES_QUERY_BUILDER #ifdef PLACES_QUERY_BUILDER
var query = PlacesUtils.history.getNewQuery(); var queries = PlacesQueryBuilder.queries;
query.searchTerms = PlacesSearchBox.value; #else
queries.push(query); var queries = this.getCurrentQueries();
#endif #endif
var placeSpec = PlacesUtils.history.queriesToQueryString(queries, var placeSpec = PlacesUtils.history.queriesToQueryString(queries,
@ -1424,14 +1437,6 @@ var PlacesQueryBuilder = {
// update collection type and get folders // update collection type and get folders
var folders = []; var folders = [];
switch (id) { switch (id) {
case "scopeBarToolbar":
PlacesSearchBox.filterCollection = "collection";
folders.push(PlacesUtils.toolbarFolderId);
break;
case "scopeBarMenu":
PlacesSearchBox.filterCollection = "collection";
folders.push(PlacesUtils.bookmarksMenuFolderId);
break;
case "scopeBarHistory": case "scopeBarHistory":
PlacesSearchBox.filterCollection = "history"; PlacesSearchBox.filterCollection = "history";
folders = []; folders = [];

View File

@ -181,10 +181,13 @@
<popupset id="placesPopupset"> <popupset id="placesPopupset">
<popup id="placesContext"/> <popup id="placesContext"/>
<popup id="placesColumnsContext"
onpopupshowing="ViewMenu.fillWithColumns(event, null, null, 'checkbox', null);"
oncommand="ViewMenu.showHideColumn(event.target); event.stopPropagation();"/>
</popupset> </popupset>
<toolbox id="placesToolbox"> <toolbox id="placesToolbox">
<toolbar class="chromeclass-toolbar" id="placesToolbar" align="center"> <toolbar class="chromeclass-toolbar" id="placesToolbar" align="center" chromedir="&locale.dir;">
<toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional" <toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
command="OrganizerCommand:Back" command="OrganizerCommand:Back"
tooltiptext="&backButton.tooltip;" tooltiptext="&backButton.tooltip;"
@ -398,6 +401,7 @@
hidecolumnpicker="true" context="placesContext" hidecolumnpicker="true" context="placesContext"
onselect="PlacesOrganizer.onPlaceSelected(true);" onselect="PlacesOrganizer.onPlaceSelected(true);"
onclick="PlacesOrganizer.onTreeClick(event);" onclick="PlacesOrganizer.onTreeClick(event);"
onfocus="PlacesOrganizer.onTreeFocus(event);"
seltype="single" seltype="single"
persist="width" persist="width"
width="200" width="200"
@ -449,6 +453,7 @@
</vbox> </vbox>
<vbox flex="1"> <vbox flex="1">
<tree id="placeContent" class="placesTree" context="placesContext" <tree id="placeContent" class="placesTree" context="placesContext"
hidecolumnpicker="true"
flex="1" type="places" flex="1" type="places"
flatList="true" flatList="true"
enableColumnDrag="true" enableColumnDrag="true"
@ -456,8 +461,9 @@
ondblclick="PlacesOrganizer.openSelectedNode(event);" ondblclick="PlacesOrganizer.openSelectedNode(event);"
onopenflatcontainer="PlacesOrganizer.openFlatContainer(aContainer);" onopenflatcontainer="PlacesOrganizer.openFlatContainer(aContainer);"
onselect="PlacesOrganizer.onContentTreeSelect();" onselect="PlacesOrganizer.onContentTreeSelect();"
onfocus="PlacesOrganizer.onTreeFocus(event);"
onclick="PlacesOrganizer.onTreeClick(event);"> onclick="PlacesOrganizer.onTreeClick(event);">
<treecols id="placeContentColumns"> <treecols id="placeContentColumns" context="placesColumnsContext">
<treecol label="&col.name.label;" id="placesContentTitle" anonid="title" flex="5" primary="true" ordinal="1" <treecol label="&col.name.label;" id="placesContentTitle" anonid="title" flex="5" primary="true" ordinal="1"
persist="width hidden ordinal sortActive sortDirection"/> persist="width hidden ordinal sortActive sortDirection"/>
<splitter class="tree-splitter"/> <splitter class="tree-splitter"/>

View File

@ -137,45 +137,49 @@
command="placesCmd_new:bookmark" command="placesCmd_new:bookmark"
label="&cmd.new_bookmark.label;" label="&cmd.new_bookmark.label;"
accesskey="&cmd.new_bookmark.accesskey;" accesskey="&cmd.new_bookmark.accesskey;"
selection="mutable"/> selection="any"
hideifnoinsetionpoint="true"/>
<menuitem id="placesContext_new:folder" <menuitem id="placesContext_new:folder"
command="placesCmd_new:folder" command="placesCmd_new:folder"
label="&cmd.new_folder.label;" label="&cmd.new_folder.label;"
accesskey="&cmd.context_new_folder.accesskey;" accesskey="&cmd.context_new_folder.accesskey;"
selection="mutable"/> selection="any"
hideifnoinsetionpoint="true"/>
<menuitem id="placesContext_new:separator" <menuitem id="placesContext_new:separator"
command="placesCmd_new:separator" command="placesCmd_new:separator"
label="&cmd.new_separator.label;" label="&cmd.new_separator.label;"
accesskey="&cmd.new_separator.accesskey;" accesskey="&cmd.new_separator.accesskey;"
closemenu="single" closemenu="single"
selection="mutable"/> selection="any"
hideifnoinsetionpoint="true"/>
<menuseparator id="placesContext_newSeparator"/> <menuseparator id="placesContext_newSeparator"/>
<menuitem id="placesContext_cut" <menuitem id="placesContext_cut"
command="cmd_cut" command="cmd_cut"
label="&cutCmd.label;" label="&cutCmd.label;"
accesskey="&cutCmd.accesskey;" accesskey="&cutCmd.accesskey;"
closemenu="single" closemenu="single"
selection="separator|link|folder|mixed|query" selection="bookmark|folder|separator|query"
forcehideselection="livemarkChild"/> forcehideselection="tagChild|livemarkChild"/>
<menuitem id="placesContext_copy" <menuitem id="placesContext_copy"
command="cmd_copy" command="cmd_copy"
label="&copyCmd.label;" label="&copyCmd.label;"
closemenu="single" closemenu="single"
accesskey="&copyCmd.accesskey;" accesskey="&copyCmd.accesskey;"
selection="separator|link|folder|query"/> selection="any"/>
<menuitem id="placesContext_paste" <menuitem id="placesContext_paste"
command="cmd_paste" command="cmd_paste"
label="&pasteCmd.label;" label="&pasteCmd.label;"
closemenu="single" closemenu="single"
accesskey="&pasteCmd.accesskey;" accesskey="&pasteCmd.accesskey;"
selection="mutable|query"/> selection="any"
hideifnoinsetionpoint="true"/>
<menuseparator id="placesContext_editSeparator"/> <menuseparator id="placesContext_editSeparator"/>
<menuitem id="placesContext_delete" <menuitem id="placesContext_delete"
command="cmd_delete" command="cmd_delete"
label="&deleteCmd.label;" label="&deleteCmd.label;"
accesskey="&deleteCmd.accesskey;" accesskey="&deleteCmd.accesskey;"
closemenu="single" closemenu="single"
selection="host|separator|link|folder|day|query" selection="any"
forcehideselection="livemarkChild"/> forcehideselection="livemarkChild"/>
<menuseparator id="placesContext_deleteSeparator"/> <menuseparator id="placesContext_deleteSeparator"/>
<menuitem id="placesContext_reload" <menuitem id="placesContext_reload"
@ -195,13 +199,13 @@
label="&cmd.sortby_name.label;" label="&cmd.sortby_name.label;"
accesskey="&cmd.context_sortby_name.accesskey;" accesskey="&cmd.context_sortby_name.accesskey;"
closemenu="single" closemenu="single"
selection="mutable"/> selection="folder"/>
<menuseparator id="placesContext_sortSeparator"/> <menuseparator id="placesContext_sortSeparator"/>
<menuitem id="placesContext_show:info" <menuitem id="placesContext_show:info"
command="placesCmd_show:info" command="placesCmd_show:info"
label="&cmd.properties.label;" label="&cmd.properties.label;"
accesskey="&cmd.properties.accesskey;" accesskey="&cmd.properties.accesskey;"
selection="bookmark|folder" selection="bookmark|folder|query"
forcehideselection="livemarkChild"/> forcehideselection="livemarkChild"/>
</popup> </popup>

View File

@ -384,26 +384,28 @@
<property name="insertionPoint"> <property name="insertionPoint">
<getter><![CDATA[ <getter><![CDATA[
// By default, the insertion point is at the top level, at the end. // By default, the insertion point is at the top level, at the end.
var index = -1; var index = PlacesUtils.bookmarks.DEFAULT_INDEX;
var folderId = PlacesUtils.getConcreteItemId(this._result.root); var folderId = PlacesUtils.getConcreteItemId(this._result.root);
var orientation = Ci.nsITreeView.DROP_BEFORE;
var isTag = false; var isTag = false;
var selectedNode = this.selectedNode; var selectedNode = this.selectedNode;
if (selectedNode) { if (selectedNode) {
if (PlacesUtils.nodeIsFolder(selectedNode)) { var popupNode = document.popupNode;
// If there is a folder selected, the insertion point is the if (popupNode == popupNode.parentNode._emptyMenuItem) {
// end of the folder. // If (empty) menuitem is selected the insertion point
// is inside the folder, at the end.
folderId = PlacesUtils.getConcreteItemId(selectedNode); folderId = PlacesUtils.getConcreteItemId(selectedNode);
orientation = Ci.nsITreeView.DROP_ON;
} }
else { else {
// If there is another type of node selected, the insertion point // In all other cases the insertion point is before that node.
// is after that node.
folderId = PlacesUtils.getConcreteItemId(selectedNode.parent); folderId = PlacesUtils.getConcreteItemId(selectedNode.parent);
index = PlacesUtils.getIndexOfNode(selectedNode); index = PlacesUtils.getIndexOfNode(selectedNode);
isTag = PlacesUtils.nodeIsTagQuery(selectedNode.parent); isTag = PlacesUtils.nodeIsTagQuery(selectedNode.parent);
} }
} }
return new InsertionPoint(folderId, index, 1, isTag); return new InsertionPoint(folderId, index, orientation, isTag);
]]></getter> ]]></getter>
</property> </property>
@ -449,7 +451,7 @@
if (this._self._result != val) { if (this._self._result != val) {
this._self._containerNodesMap = []; this._self._containerNodesMap = [];
this._self._result = val; this._self._result = val;
if (val) // this calls _rebuild through invalidateContainer if (val) // this calls _rebuild through invalidateContainer
val.root.containerOpen = true; val.root.containerOpen = true;
} }
return val; return val;
@ -916,6 +918,8 @@
if (this._overFolder.node) if (this._overFolder.node)
this._overFolder.closeTimer = this._setTimer(this._overFolder.hoverTime); this._overFolder.closeTimer = this._setTimer(this._overFolder.hoverTime);
PlacesControllerDragHelper.currentDropTarget = null; PlacesControllerDragHelper.currentDropTarget = null;
this._self._draggedNode = null;
}, },
getSupportedFlavours: function TBV_DO_getSupportedFlavours() { getSupportedFlavours: function TBV_DO_getSupportedFlavours() {

View File

@ -440,7 +440,7 @@
return this._cachedInsertionPoint = null; return this._cachedInsertionPoint = null;
} }
var orientation = Ci.nsITreeView.DROP_AFTER; var orientation = Ci.nsITreeView.DROP_BEFORE;
// If there is no selection, insert at the end of the container. // If there is no selection, insert at the end of the container.
if (!this.hasSelection) { if (!this.hasSelection) {
var index = this.view.rowCount - 1; var index = this.view.rowCount - 1;
@ -451,9 +451,9 @@
// This is a two-part process. The first part is determining the drop // This is a two-part process. The first part is determining the drop
// orientation. // orientation.
// * The default orientation is to drop _after_ the selected item. // * The default orientation is to drop _before_ the selected item.
// * If the selected item is an open container, the default // * If the selected item is a container, the default orientation
// orientation is to drop _into_ that container. // is to drop _into_ that container.
// //
// Warning: It may be tempting to use tree indexes in this code, but // Warning: It may be tempting to use tree indexes in this code, but
// you must not, since the tree is nested and as your tree // you must not, since the tree is nested and as your tree
@ -468,18 +468,18 @@
var min = { }, max = { }; var min = { }, max = { };
selection.getRangeAt(rc - 1, min, max); selection.getRangeAt(rc - 1, min, max);
// If the sole selection is an open container, insert into it rather // If the sole selection is a container, and we are not in
// than adjacent to it. Note that this only applies to _single_ // a flatlist, insert into it.
// selections - if the last element within a multi-selection is an // Note that this only applies to _single_ selections,
// open folder, insert _adajacent_ to the selection. // if the last element within a multi-selection is a
// container, insert _adjacent_ to the selection.
// //
// If the sole selection is the bookmarks toolbar folder, we insert // If the sole selection is the bookmarks toolbar folder, we insert
// into it even if it is not opened // into it even if it is not opened
var itemId = var itemId =
PlacesUtils.getConcreteItemId(resultView.nodeForTreeIndex(max.value)); PlacesUtils.getConcreteItemId(resultView.nodeForTreeIndex(max.value));
if (selection.count == 1 && resultView.isContainer(max.value) && if (selection.count == 1 && resultView.isContainer(max.value) &&
(resultView.isContainerOpen(max.value) || !this.flatList)
itemId == PlacesUtils.bookmarksMenuFolderId))
orientation = Ci.nsITreeView.DROP_ON; orientation = Ci.nsITreeView.DROP_ON;
this._cachedInsertionPoint = this._cachedInsertionPoint =
@ -507,6 +507,7 @@
var result = this.getResult(); var result = this.getResult();
var resultview = this.getResultView(); var resultview = this.getResultView();
var container = result.root; var container = result.root;
var dropNearItemId = -1;
NS_ASSERT(container, "null container"); NS_ASSERT(container, "null container");
// When there's no selection, assume the container is the container // When there's no selection, assume the container is the container
// the view is populated from (i.e. the result's itemId). // the view is populated from (i.e. the result's itemId).
@ -520,7 +521,8 @@
} }
else if (!this._disallowInsertion(lastSelected) && else if (!this._disallowInsertion(lastSelected) &&
lastSelected.containerOpen && lastSelected.containerOpen &&
orientation == Ci.nsITreeView.DROP_AFTER) { orientation == Ci.nsITreeView.DROP_AFTER &&
lastSelected.hasChildren) {
// If the last selected item is an open container and the user is // If the last selected item is an open container and the user is
// trying to drag into it as a first item, really insert into it. // trying to drag into it as a first item, really insert into it.
container = lastSelected; container = lastSelected;
@ -539,13 +541,20 @@
return null; return null;
var queryOptions = asQuery(result.root).queryOptions; var queryOptions = asQuery(result.root).queryOptions;
if (queryOptions.excludeItems || queryOptions.excludeQueries || if (queryOptions.sortingMode !=
queryOptions.excludeReadOnlyFolders || Ci.nsINavHistoryQueryOptions.SORT_BY_NONE) {
queryOptions.sortingMode != Ci.nsINavHistoryQueryOptions.SORT_BY_NONE) { // If we are within a sorted view, insert at the end
// If we are within either a sorted view or a view in which
// some items may be invisible, insert at the end
index = -1; index = -1;
} }
else if (queryOptions.excludeItems ||
queryOptions.excludeQueries ||
queryOptions.excludeReadOnlyFolders) {
// Some item may be invisible, insert near last selected one.
// We don't replace index here to avoid requests to the db,
// instead it will be calculated later by the controller.
index = -1;
dropNearItemId = lastSelected.itemId;
}
else { else {
var lsi = PlacesUtils.getIndexOfNode(lastSelected); var lsi = PlacesUtils.getIndexOfNode(lastSelected);
index = orientation == Ci.nsITreeView.DROP_BEFORE ? lsi : lsi + 1; index = orientation == Ci.nsITreeView.DROP_BEFORE ? lsi : lsi + 1;
@ -558,7 +567,8 @@
return new InsertionPoint(PlacesUtils.getConcreteItemId(container), return new InsertionPoint(PlacesUtils.getConcreteItemId(container),
index, orientation, index, orientation,
PlacesUtils.nodeIsTagQuery(container)); PlacesUtils.nodeIsTagQuery(container),
dropNearItemId);
]]></body> ]]></body>
</method> </method>
@ -673,8 +683,9 @@
// If this node is part of a readonly container (e.g. a livemark) it // If this node is part of a readonly container (e.g. a livemark) it
// cannot be moved, only copied, so we must change the action used // cannot be moved, only copied, so we must change the action used
// by the drag session. // by the drag session.
if (PlacesUtils.nodeIsReadOnly(parent) || if (PlacesUtils.nodeIsTagQuery(parent) ||
PlacesUtils.nodeIsTagQuery(parent)) { !PlacesControllerDragHelper.canMoveContainerNode(node)) {
// XXX DOES NOTHING! dragAction doesn't persist
dragAction.action = Ci.nsIDragService.DRAGDROP_ACTION_COPY; dragAction.action = Ci.nsIDragService.DRAGDROP_ACTION_COPY;
break; break;
} }
@ -693,7 +704,10 @@
<parameter name="event"/> <parameter name="event"/>
<parameter name="session"/> <parameter name="session"/>
<body><![CDATA[ <body><![CDATA[
return this.view.canDrop(-1, -1); var row = { }, col = { }, child = { };
this.treeBoxObject.getCellAt(event.clientX, event.clientY, row, col,
child);
return this.view.canDrop(row.value, -1);
]]></body> ]]></body>
</method> </method>
@ -703,18 +717,11 @@
<parameter name="flavor"/> <parameter name="flavor"/>
<parameter name="session"/> <parameter name="session"/>
<body><![CDATA[ <body><![CDATA[
// When the user is dragging over an empty area of the tree, make
// sure canDrop is set to true to indicate dropping into the bucket.
var row = { }, col = { }, child = { };
this.treeBoxObject.getCellAt(event.clientX, event.clientY, row, col,
child);
if (row.value == -1) {
var dragService = var dragService =
Cc["@mozilla.org/widget/dragservice;1"]. Cc["@mozilla.org/widget/dragservice;1"].
getService(Ci.nsIDragService); getService(Ci.nsIDragService);
var dragSession = dragService.getCurrentSession(); var dragSession = dragService.getCurrentSession();
dragSession.canDrop = this.canDrop(-1, 1); dragSession.canDrop = this.canDrop(event, session);
}
]]></body> ]]></body>
</method> </method>

View File

@ -140,6 +140,10 @@ PlacesTreeView.prototype = {
* when a tree is detached to clear the list. * when a tree is detached to clear the list.
*/ */
_buildVisibleList: function PTV__buildVisibleList() { _buildVisibleList: function PTV__buildVisibleList() {
var selection = this.selection;
if (selection)
selection.selectEventsSuppressed = true;
if (this._result) { if (this._result) {
// Any current visible elements need to be marked as invisible. // Any current visible elements need to be marked as invisible.
for (var i = 0; i < this._visibleElements.length; i++) { for (var i = 0; i < this._visibleElements.length; i++) {
@ -163,11 +167,12 @@ PlacesTreeView.prototype = {
// this triggers containerOpened which then builds the visible // this triggers containerOpened which then builds the visible
// section // section
rootNode.containerOpen = true; rootNode.containerOpen = true;
return;
} }
else
this.invalidateContainer(rootNode); this.invalidateContainer(rootNode);
} }
if (selection)
selection.selectEventsSuppressed = false;
}, },
/** /**
@ -994,9 +999,6 @@ PlacesTreeView.prototype = {
if (elt.localName == "tree" && elt.view == this && if (elt.localName == "tree" && elt.view == this &&
this.selection.isSelected(aRow)) this.selection.isSelected(aRow))
return false; return false;
if (node.parent && PlacesUtils.nodeIsReadOnly(node.parent) &&
!PlacesUtils.nodeIsTagQuery(node))
return false;
} }
var ip = this._getInsertionPoint(aRow, aOrientation); var ip = this._getInsertionPoint(aRow, aOrientation);
@ -1017,6 +1019,7 @@ PlacesTreeView.prototype = {
_getInsertionPoint: function PTV__getInsertionPoint(index, orientation) { _getInsertionPoint: function PTV__getInsertionPoint(index, orientation) {
var container = this._result.root; var container = this._result.root;
var dropNearItemId = -1;
// When there's no selection, assume the container is the container // When there's no selection, assume the container is the container
// the view is populated from (i.e. the result's itemId). // the view is populated from (i.e. the result's itemId).
if (index != -1) { if (index != -1) {
@ -1029,7 +1032,8 @@ PlacesTreeView.prototype = {
} }
else if (!this._disallowInsertion(lastSelected) && else if (!this._disallowInsertion(lastSelected) &&
lastSelected.containerOpen && lastSelected.containerOpen &&
orientation == Ci.nsITreeView.DROP_AFTER) { orientation == Ci.nsITreeView.DROP_AFTER &&
lastSelected.hasChildren) {
// If the last selected item is an open container and the user is // If the last selected item is an open container and the user is
// trying to drag into it as a first item, really insert into it. // trying to drag into it as a first item, really insert into it.
container = lastSelected; container = lastSelected;
@ -1047,17 +1051,34 @@ PlacesTreeView.prototype = {
if (this._disallowInsertion(container)) if (this._disallowInsertion(container))
return null; return null;
var queryOptions = asQuery(this._result.root).queryOptions;
if (queryOptions.sortingMode != Ci.nsINavHistoryQueryOptions.SORT_BY_NONE) {
// If we are within a sorted view, insert at the end
index = -1;
}
else if (queryOptions.excludeItems ||
queryOptions.excludeQueries ||
queryOptions.excludeReadOnlyFolders) {
// Some item may be invisible, insert near last selected one.
// We don't replace index here to avoid requests to the db,
// instead it will be calculated later by the controller.
index = -1;
dropNearItemId = lastSelected.itemId;
}
else {
var lsi = PlacesUtils.getIndexOfNode(lastSelected); var lsi = PlacesUtils.getIndexOfNode(lastSelected);
index = orientation == Ci.nsITreeView.DROP_BEFORE ? lsi : lsi + 1; index = orientation == Ci.nsITreeView.DROP_BEFORE ? lsi : lsi + 1;
} }
} }
}
if (this._disallowInsertion(container)) if (this._disallowInsertion(container))
return null; return null;
return new InsertionPoint(PlacesUtils.getConcreteItemId(container), return new InsertionPoint(PlacesUtils.getConcreteItemId(container),
index, orientation, index, orientation,
PlacesUtils.nodeIsTagQuery(container)); PlacesUtils.nodeIsTagQuery(container),
dropNearItemId);
}, },
drop: function PTV_drop(aRow, aOrientation) { drop: function PTV_drop(aRow, aOrientation) {

View File

@ -60,6 +60,7 @@ const LMANNO_FEEDURI = "livemark/feedURI";
const LMANNO_SITEURI = "livemark/siteURI"; const LMANNO_SITEURI = "livemark/siteURI";
const ORGANIZER_FOLDER_ANNO = "PlacesOrganizer/OrganizerFolder"; const ORGANIZER_FOLDER_ANNO = "PlacesOrganizer/OrganizerFolder";
const ORGANIZER_QUERY_ANNO = "PlacesOrganizer/OrganizerQuery"; const ORGANIZER_QUERY_ANNO = "PlacesOrganizer/OrganizerQuery";
const ORGANIZER_LEFTPANE_VERSION = 4;
#ifdef XP_MACOSX #ifdef XP_MACOSX
// On Mac OSX, the transferable system converts "\r\n" to "\n\n", where we // On Mac OSX, the transferable system converts "\r\n" to "\n\n", where we
@ -254,10 +255,11 @@ var PlacesUIUtils = {
var txn = null; var txn = null;
var node = aChildren[i]; var node = aChildren[i];
// adjusted to make sure that items are given the correct index - // Make sure that items are given the correct index, this will be
// transactions insert differently if index == -1 // passed by the transaction manager to the backend for the insertion.
if (aIndex > -1) // Insertion behaves differently if index == DEFAULT_INDEX (append)
index = aIndex + i; if (aIndex != PlacesUtils.bookmarks.DEFAULT_INDEX)
index = i;
if (node.type == PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER) { if (node.type == PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER) {
if (node.livemark && node.annos) // node is a livemark if (node.livemark && node.annos) // node is a livemark
@ -423,7 +425,7 @@ var PlacesUIUtils = {
* @return true if any transaction has been performed. * @return true if any transaction has been performed.
* *
* Notes: * Notes:
* - the location, description and "load in sidebar" fields are * - the location, description and "loadInSidebar" fields are
* visible only if there is no initial URI (aURI is null). * visible only if there is no initial URI (aURI is null).
* - When aDefaultInsertionPoint is not set, the dialog defaults to the * - When aDefaultInsertionPoint is not set, the dialog defaults to the
* bookmarks root folder. * bookmarks root folder.
@ -491,7 +493,7 @@ var PlacesUIUtils = {
var info = { var info = {
action: "add", action: "add",
type: "bookmark", type: "bookmark",
hiddenRows: ["location", "description", "load in sidebar"] hiddenRows: ["location", "description", "loadInSidebar"]
}; };
if (aURI) if (aURI)
info.uri = aURI; info.uri = aURI;
@ -638,33 +640,19 @@ var PlacesUIUtils = {
}, },
/** /**
* Opens the bookmark properties panel for a given bookmark identifier. * Opens the properties dialog for a given item identifier.
* *
* @param aId * @param aItemId
* bookmark identifier for which the properties are to be shown * item identifier for which the properties are to be shown
* @param aType
* item type, either "bookmark" or "folder"
* @return true if any transaction has been performed. * @return true if any transaction has been performed.
*/ */
showBookmarkProperties: function PU_showBookmarkProperties(aId) { showItemProperties: function PU_showItemProperties(aItemId, aType) {
var info = { var info = {
action: "edit", action: "edit",
type: "bookmark", type: aType,
bookmarkId: aId itemId: aItemId
};
return this._showBookmarkDialog(info);
},
/**
* Opens the folder properties panel for a given folder ID.
*
* @param aId
* an integer representing the ID of the folder to edit
* @return true if any transaction has been performed.
*/
showFolderProperties: function PU_showFolderProperties(aId) {
var info = {
action: "edit",
type: "folder",
folderId: aId
}; };
return this._showBookmarkDialog(info); return this._showBookmarkDialog(info);
}, },
@ -1129,14 +1117,26 @@ var PlacesUIUtils = {
get leftPaneFolderId() { get leftPaneFolderId() {
var leftPaneRoot = -1; var leftPaneRoot = -1;
var allBookmarksId; var allBookmarksId;
var items = PlacesUtils.annotations.getItemsWithAnnotation(ORGANIZER_FOLDER_ANNO, {}); var items = PlacesUtils.annotations
if (items.length != 0 && items[0] != -1) .getItemsWithAnnotation(ORGANIZER_FOLDER_ANNO, {});
if (items.length != 0 && items[0] != -1) {
leftPaneRoot = items[0]; leftPaneRoot = items[0];
// check organizer left pane version
var version = PlacesUtils.annotations
.getItemAnnotation(leftPaneRoot, ORGANIZER_FOLDER_ANNO);
if (version != ORGANIZER_LEFTPANE_VERSION) {
// If version is not valid we must rebuild the left pane.
PlacesUtils.bookmarks.removeFolder(leftPaneRoot);
leftPaneRoot = -1;
}
}
if (leftPaneRoot != -1) { if (leftPaneRoot != -1) {
// Build the leftPaneQueries Map // Build the leftPaneQueries Map
delete this.leftPaneQueries; delete this.leftPaneQueries;
this.leftPaneQueries = {}; this.leftPaneQueries = {};
var items = PlacesUtils.annotations.getItemsWithAnnotation(ORGANIZER_QUERY_ANNO, { }); var items = PlacesUtils.annotations
.getItemsWithAnnotation(ORGANIZER_QUERY_ANNO, {});
for (var i=0; i < items.length; i++) { for (var i=0; i < items.length; i++) {
var queryName = PlacesUtils.annotations var queryName = PlacesUtils.annotations
.getItemAnnotation(items[i], ORGANIZER_QUERY_ANNO); .getItemAnnotation(items[i], ORGANIZER_QUERY_ANNO);
@ -1155,6 +1155,8 @@ var PlacesUIUtils = {
// Left Pane Root Folder // Left Pane Root Folder
leftPaneRoot = PlacesUtils.bookmarks.createFolder(PlacesUtils.placesRootId, "", -1); leftPaneRoot = PlacesUtils.bookmarks.createFolder(PlacesUtils.placesRootId, "", -1);
// ensure immediate children can't be removed
PlacesUtils.bookmarks.setFolderReadonly(leftPaneRoot, true);
// History Query // History Query
let uri = PlacesUtils._uri("place:sort=4&"); let uri = PlacesUtils._uri("place:sort=4&");
@ -1185,6 +1187,9 @@ var PlacesUIUtils = {
"AllBookmarks", 0, EXPIRE_NEVER); "AllBookmarks", 0, EXPIRE_NEVER);
self.leftPaneQueries["AllBookmarks"] = itemId; self.leftPaneQueries["AllBookmarks"] = itemId;
// disallow manipulating this folder within the organizer UI
PlacesUtils.bookmarks.setFolderReadonly(allBookmarksId, true);
// All Bookmarks->Bookmarks Toolbar Query // All Bookmarks->Bookmarks Toolbar Query
uri = PlacesUtils._uri("place:folder=TOOLBAR"); uri = PlacesUtils._uri("place:folder=TOOLBAR");
itemId = PlacesUtils.bookmarks.insertBookmark(allBookmarksId, uri, -1, null); itemId = PlacesUtils.bookmarks.insertBookmark(allBookmarksId, uri, -1, null);
@ -1212,8 +1217,10 @@ var PlacesUIUtils = {
} }
}; };
PlacesUtils.bookmarks.runInBatchMode(callback, null); PlacesUtils.bookmarks.runInBatchMode(callback, null);
PlacesUtils.annotations.setItemAnnotation(leftPaneRoot, ORGANIZER_FOLDER_ANNO, PlacesUtils.annotations.setItemAnnotation(leftPaneRoot,
true, 0, EXPIRE_NEVER); ORGANIZER_FOLDER_ANNO,
ORGANIZER_LEFTPANE_VERSION,
0, EXPIRE_NEVER);
delete this.leftPaneFolderId; delete this.leftPaneFolderId;
return this.leftPaneFolderId = leftPaneRoot; return this.leftPaneFolderId = leftPaneRoot;
}, },

View File

@ -45,6 +45,7 @@ include $(topsrcdir)/config/rules.mk
_BROWSER_TEST_FILES = \ _BROWSER_TEST_FILES = \
browser_425884.js \ browser_425884.js \
browser_423515.js \
$(NULL) $(NULL)
libs:: $(_BROWSER_TEST_FILES) libs:: $(_BROWSER_TEST_FILES)

View File

@ -0,0 +1,243 @@
/* vim:set ts=2 sw=2 sts=2 et: */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Places test code.
*
* The Initial Developer of the Original Code is Mozilla Corp.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dietrich Ayala <dietrich@mozilla.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
function test() {
// sanity check
ok(PlacesUtils, "checking PlacesUtils, running in chrome context?");
ok(PlacesUIUtils, "checking PlacesUIUtils, running in chrome context?");
ok(PlacesControllerDragHelper, "checking PlacesControllerDragHelper, running in chrome context?");
const IDX = PlacesUtils.bookmarks.DEFAULT_INDEX;
// setup
var rootId = PlacesUtils.bookmarks.createFolder(PlacesUtils.toolbarFolderId, "", IDX);
var rootNode = PlacesUtils.getFolderContents(rootId, false, true).root;
is(rootNode.childCount, 0, "confirm test root is empty");
var tests = [];
// add a regular folder, should be moveable
tests.push({
populate: function() {
this.id =
PlacesUtils.bookmarks.createFolder(rootId, "", IDX);
},
validate: function() {
is(rootNode.childCount, 1,
"populate added data to the test root");
is(PlacesControllerDragHelper.canMoveContainer(this.id),
true, "can move regular folder id");
is(PlacesControllerDragHelper.canMoveContainerNode(rootNode.getChild(0)),
true, "can move regular folder node");
}
});
// add a regular folder shortcut, should be moveable
tests.push({
populate: function() {
this.folderId =
PlacesUtils.bookmarks.createFolder(rootId, "foo", IDX);
this.shortcutId =
PlacesUtils.bookmarks.insertBookmark(rootId, makeURI("place:folder="+this.folderId), IDX, "bar");
},
validate: function() {
is(rootNode.childCount, 2,
"populated data to the test root");
var folderNode = rootNode.getChild(0);
is(folderNode.type, 6, "node is folder");
is(this.folderId, folderNode.itemId, "folder id and folder node item id match");
var shortcutNode = rootNode.getChild(1);
is(shortcutNode.type, 9, "node is folder shortcut");
is(this.shortcutId, shortcutNode.itemId, "shortcut id and shortcut node item id match");
var concreteId = PlacesUtils.getConcreteItemId(shortcutNode);
is(concreteId, folderNode.itemId, "shortcut node id and concrete id match");
is(PlacesControllerDragHelper.canMoveContainer(this.shortcutId),
true, "can move folder shortcut id");
is(PlacesControllerDragHelper.canMoveContainerNode(shortcutNode),
true, "can move folder shortcut node");
}
});
// add a regular query, should be moveable
tests.push({
populate: function() {
this.bookmarkId =
PlacesUtils.bookmarks.insertBookmark(rootId, makeURI("http://foo.com"), IDX, "foo");
this.queryId =
PlacesUtils.bookmarks.insertBookmark(rootId, makeURI("place:terms=foo"), IDX, "bar");
},
validate: function() {
is(rootNode.childCount, 2,
"populated data to the test root");
var bmNode = rootNode.getChild(0);
is(bmNode.itemId, this.bookmarkId, "bookmark id and bookmark node item id match");
var queryNode = rootNode.getChild(1);
is(queryNode.itemId, this.queryId, "query id and query node item id match");
is(PlacesControllerDragHelper.canMoveContainer(this.queryId),
true, "can move query id");
is(PlacesControllerDragHelper.canMoveContainerNode(queryNode),
true, "can move query node");
}
});
// test that special folders cannot be moved
// test that special folders shortcuts can be moved
tests.push({
folders: [PlacesUtils.bookmarksMenuFolderId,
PlacesUtils.tagsFolderId, PlacesUtils.unfiledBookmarksFolderId,
PlacesUtils.toolbarFolderId],
shortcuts: {},
populate: function() {
for (var i = 0; i < this.folders.length; i++) {
var id = this.folders[i];
this.shortcuts[id] =
PlacesUtils.bookmarks.insertBookmark(rootId, makeURI("place:folder=" + id), IDX, "");
}
},
validate: function() {
// test toolbar shortcut node
is(rootNode.childCount, this.folders.length,
"populated data to the test root");
function getRootChildNode(aId) {
var node = PlacesUtils.getFolderContents(PlacesUtils.placesRootId, false, true).root;
for (var i = 0; i < node.childCount; i++) {
var child = node.getChild(i);
if (child.itemId == aId)
return child;
}
}
for (var i = 0; i < this.folders.length; i++) {
var id = this.folders[i];
is(PlacesControllerDragHelper.canMoveContainer(id),
false, "shouldn't be able to move special folder id");
//var node = PlacesUtils.getFolderContents(id, false, true).root;
var node = getRootChildNode(id);
is(PlacesControllerDragHelper.canMoveContainerNode(node),
false, "shouldn't be able to move special folder node");
var shortcutId = this.shortcuts[id];
var shortcutNode = rootNode.getChild(i);
is(shortcutNode.itemId, shortcutId, "shortcut id and shortcut node item id match");
LOG("can move shortcut id?");
is(PlacesControllerDragHelper.canMoveContainer(shortcutId),
true, "should be able to move special folder shortcut id");
LOG("can move shortcut node?");
is(PlacesControllerDragHelper.canMoveContainerNode(shortcutNode),
true, "should be able to move special folder shortcut node");
}
}
});
// test that a tag container cannot be moved
tests.push({
populate: function() {
// tag a uri
this.uri = makeURI("http://foo.com");
PlacesUtils.tagging.tagURI(this.uri, ["bar"]);
},
validate: function() {
// get tag root
var query = PlacesUtils.history.getNewQuery();
var options = PlacesUtils.history.getNewQueryOptions();
options.resultType = Ci.nsINavHistoryQueryOptions.RESULTS_AS_TAG_QUERY;
var tagsNode = PlacesUtils.history.executeQuery(query, options).root;
tagsNode.containerOpen = true;
is(tagsNode.childCount, 1, "has new tag");
var tagNode = tagsNode.getChild(0);
is(PlacesControllerDragHelper.canMoveContainerNode(tagNode),
false, "should not be able to move tag container node");
}
});
// test that any child of a read-only node cannot be moved
tests.push({
populate: function() {
this.id =
PlacesUtils.bookmarks.createFolder(rootId, "foo", IDX);
PlacesUtils.bookmarks.createFolder(this.id, "bar", IDX);
PlacesUtils.bookmarks.setFolderReadonly(this.id, true);
},
validate: function() {
is(rootNode.childCount, 1,
"populate added data to the test root");
var readOnlyFolder = rootNode.getChild(0);
// test that we can move the read-only folder
is(PlacesControllerDragHelper.canMoveContainer(this.id),
true, "can move read-only folder id");
is(PlacesControllerDragHelper.canMoveContainerNode(readOnlyFolder),
true, "can move read-only folder node");
// test that we cannot move the child of a read-only folder
readOnlyFolder.QueryInterface(Ci.nsINavHistoryContainerResultNode);
readOnlyFolder.containerOpen = true;
var childFolder = readOnlyFolder.getChild(0);
is(PlacesControllerDragHelper.canMoveContainer(childFolder.itemId),
false, "cannot move a child of a read-only folder");
is(PlacesControllerDragHelper.canMoveContainerNode(childFolder),
false, "cannot move a child node of a read-only folder node");
}
});
tests.forEach(function(aTest) {
PlacesUtils.bookmarks.removeFolderChildren(rootId);
aTest.populate();
aTest.validate();
});
PlacesUtils.bookmarks.removeItem(rootId);
}

View File

@ -116,7 +116,7 @@
<hbox> <hbox>
<checkbox id="useDocumentColors" <checkbox id="useDocumentColors"
label="&allowPagesToUse.label;" accesskey="&allowPagesToUse.accesskey;" label="&allowPagesToUse.label;" accesskey="&allowPagesToUse.accesskey;"
preference="browser.display.use_document_colors"/> preference="browser.display.use_document_colors" flex="1"/>
</hbox> </hbox>
</prefpane> </prefpane>
</prefwindow> </prefwindow>

View File

@ -150,13 +150,17 @@ PROT_DataProvider.prototype.getUrlPref_ = function(prefName) {
var appInfo = Components.classes["@mozilla.org/xre/app-info;1"] var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
.getService(Components.interfaces.nsIXULAppInfo); .getService(Components.interfaces.nsIXULAppInfo);
var mozClientStr = MOZ_OFFICIAL_BUILD ? 'navclient-auto-ffox' : appInfo.name; var mozClientStr = this.prefs_.getPref("browser.safebrowsing.clientid",
MOZ_OFFICIAL_BUILD ? 'navclient-auto-ffox' : appInfo.name);
var versionStr = this.prefs_.getPref("browser.safebrowsing.clientver",
appInfo.version);
// Parameter substitution // Parameter substitution
url = url.replace(MOZ_PARAM_LOCALE, this.getLocale_()); url = url.replace(MOZ_PARAM_LOCALE, this.getLocale_());
url = url.replace(MOZ_PARAM_CLIENT, mozClientStr); url = url.replace(MOZ_PARAM_CLIENT, mozClientStr);
url = url.replace(MOZ_PARAM_BUILDID, appInfo.appBuildID); url = url.replace(MOZ_PARAM_BUILDID, appInfo.appBuildID);
url = url.replace(MOZ_PARAM_VERSION, appInfo.version); url = url.replace(MOZ_PARAM_VERSION, versionStr);
return url; return url;
} }

View File

@ -97,7 +97,7 @@
oncommand="openManager(event);"/> oncommand="openManager(event);"/>
</xul:menupopup> </xul:menupopup>
</xul:button> </xul:button>
<xul:hbox class="search-go-container"> <xul:hbox class="search-go-container" chromedir="&locale.dir;">
<xul:image class="search-go-button" <xul:image class="search-go-button"
anonid="search-go-button" anonid="search-go-button"
chromedir="&locale.dir;" chromedir="&locale.dir;"

View File

@ -66,7 +66,13 @@
#include "windows.h" #include "windows.h"
#include "shellapi.h" #include "shellapi.h"
#include "shlobj.h"
#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#endif
#define _WIN32_WINNT 0x0600
#define INITGUID
#include <shlobj.h>
#include <mbstring.h> #include <mbstring.h>
@ -215,60 +221,16 @@ static SETTING gSettings[] = {
{ MAKE_KEY_NAME1("HTTPS", SOP), "", VAL_OPEN, APP_PATH_SUBSTITUTION } { MAKE_KEY_NAME1("HTTPS", SOP), "", VAL_OPEN, APP_PATH_SUBSTITUTION }
}; };
// Support for versions of shlobj.h that don't include the Vista API's
#if !defined(IApplicationAssociationRegistration)
typedef enum tagASSOCIATIONLEVEL {
AL_MACHINE,
AL_EFFECTIVE,
AL_USER
} ASSOCIATIONLEVEL;
typedef enum tagASSOCIATIONTYPE {
AT_FILEEXTENSION,
AT_URLPROTOCOL,
AT_STARTMENUCLIENT,
AT_MIMETYPE
} ASSOCIATIONTYPE;
MIDL_INTERFACE("4e530b0a-e611-4c77-a3ac-9031d022281b")
IApplicationAssociationRegistration : public IUnknown
{
public:
virtual HRESULT STDMETHODCALLTYPE QueryCurrentDefault(LPCWSTR pszQuery,
ASSOCIATIONTYPE atQueryType,
ASSOCIATIONLEVEL alQueryLevel,
LPWSTR *ppszAssociation) = 0;
virtual HRESULT STDMETHODCALLTYPE QueryAppIsDefault(LPCWSTR pszQuery,
ASSOCIATIONTYPE atQueryType,
ASSOCIATIONLEVEL alQueryLevel,
LPCWSTR pszAppRegistryName,
BOOL *pfDefault) = 0;
virtual HRESULT STDMETHODCALLTYPE QueryAppIsDefaultAll(ASSOCIATIONLEVEL alQueryLevel,
LPCWSTR pszAppRegistryName,
BOOL *pfDefault) = 0;
virtual HRESULT STDMETHODCALLTYPE SetAppAsDefault(LPCWSTR pszAppRegistryName,
LPCWSTR pszSet,
ASSOCIATIONTYPE atSetType) = 0;
virtual HRESULT STDMETHODCALLTYPE SetAppAsDefaultAll(LPCWSTR pszAppRegistryName) = 0;
virtual HRESULT STDMETHODCALLTYPE ClearUserAssociations(void) = 0;
};
#endif
static const CLSID CLSID_ApplicationAssociationReg = {0x591209C7,0x767B,0x42B2,{0x9F,0xBA,0x44,0xEE,0x46,0x15,0xF2,0xC7}};
static const IID IID_IApplicationAssociationReg = {0x4e530b0a,0xe611,0x4c77,{0xa3,0xac,0x90,0x31,0xd0,0x22,0x28,0x1b}};
PRBool PRBool
nsWindowsShellService::IsDefaultBrowserVista(PRBool aStartupCheck, PRBool* aIsDefaultBrowser) nsWindowsShellService::IsDefaultBrowserVista(PRBool aStartupCheck, PRBool* aIsDefaultBrowser)
{ {
#if !defined(MOZ_DISABLE_VISTA_SDK_REQUIREMENTS)
IApplicationAssociationRegistration* pAAR; IApplicationAssociationRegistration* pAAR;
HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationReg, HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
NULL, NULL,
CLSCTX_INPROC, CLSCTX_INPROC,
IID_IApplicationAssociationReg, IID_IApplicationAssociationRegistration,
(void**)&pAAR); (void**)&pAAR);
if (SUCCEEDED(hr)) { if (SUCCEEDED(hr)) {
@ -285,7 +247,7 @@ nsWindowsShellService::IsDefaultBrowserVista(PRBool aStartupCheck, PRBool* aIsDe
pAAR->Release(); pAAR->Release();
return PR_TRUE; return PR_TRUE;
} }
#endif
return PR_FALSE; return PR_FALSE;
} }

View File

@ -58,7 +58,6 @@ public:
protected: protected:
PRBool IsDefaultBrowserVista(PRBool aStartupCheck, PRBool* aIsDefaultBrowser); PRBool IsDefaultBrowserVista(PRBool aStartupCheck, PRBool* aIsDefaultBrowser);
PRBool SetDefaultBrowserVista();
PRBool GetMailAccountKey(HKEY* aResult); PRBool GetMailAccountKey(HKEY* aResult);
void SetRegKey(const nsString& aKeyName, void SetRegKey(const nsString& aKeyName,

View File

@ -103,6 +103,25 @@ uninstall/uninst.exe
uninstall/uninstall.exe uninstall/uninstall.exe
components/myspell/en-US.dic components/myspell/en-US.dic
components/myspell/en-US.aff components/myspell/en-US.aff
searchplugins/centrum-cz.xml
searchplugins/eBay-fy-NL.xml
searchplugins/eBay-nl.xml
searchplugins/eBay-zh-CN.xml
searchplugins/eBay-zh-TW.xml
searchplugins/filesearchru.xml
searchplugins/goo.xml
searchplugins/google-ar.xml
searchplugins/grandiccionari.xml
searchplugins/lingvo.yandex.ru.xml
searchplugins/nana.xml
searchplugins/netex.xml
searchplugins/nosaltres.xml
searchplugins/pbi-pl.xml
searchplugins/taobao.xml
searchplugins/wikipedia-zh.xml
searchplugins/yahoo-jp-shopping.xml
searchplugins/yahoo-ru.xml
searchplugins/yahoo-zh-CN.xml
searchplugins/DRAE.src searchplugins/DRAE.src
searchplugins/DRAE.png searchplugins/DRAE.png
searchplugins/DRAE.gif searchplugins/DRAE.gif

View File

@ -265,7 +265,7 @@ milestone release.
- Firefox cannot make use of OS/2 fonts like WarpSans and others which - Firefox cannot make use of OS/2 fonts like WarpSans and others which
are not available in Type1 or TrueType format. It is therefore are not available in Type1 or TrueType format. It is therefore
recommended to install the "Workplace Sans" font from recommended to install the "Workplace Sans" font from
http://www.cs-club.org/~alex/creative/fonts/ http://users.socis.ca/~ataylo00/creative/fonts/
or or
http://hobbes.nmsu.edu/cgi-bin/h-search?key=wpsu_ttf http://hobbes.nmsu.edu/cgi-bin/h-search?key=wpsu_ttf
which Firefox will use as a replacement of WarpSans. which Firefox will use as a replacement of WarpSans.

View File

@ -1,5 +1,5 @@
af af
ar linux win32 ar
be be
ca ca
cs cs
@ -16,7 +16,7 @@ fr
fy-NL fy-NL
ga-IE ga-IE
gu-IN linux win32 gu-IN linux win32
he linux win32 he
hu hu
id id
it it

View File

@ -881,8 +881,14 @@ toolbar[iconsize="small"] #paste-button[disabled="true"] {
display: none; display: none;
} }
#identity-box.verifiedDomain > hbox {
background-color: rgba(30, 80, 170, 0.7);
color: white;
}
#identity-box.verifiedIdentity > hbox { #identity-box.verifiedIdentity > hbox {
background-color: rgba(0, 255, 0, 0.25); background-color: rgba(50, 150, 50, 0.8);
color: white;
} }
/* Identity popup icons */ /* Identity popup icons */
@ -955,15 +961,6 @@ toolbar[iconsize="small"] #paste-button[disabled="true"] {
padding: 10px; padding: 10px;
} }
/* Secure site coloring */
#urlbar[level="high"][pageproxystate="valid"] > .autocomplete-textbox-container,
#urlbar[level="low"][pageproxystate="valid"] > .autocomplete-textbox-container,
#urlbar[level="high"][pageproxystate="valid"] #autocomplete-security-wrapper,
#urlbar[level="low"][pageproxystate="valid"] #autocomplete-security-wrapper {
background-color: #F5F6BE; /* #F7F898; */
color: #000000;
}
#urlbar > .autocomplete-textbox-container { #urlbar > .autocomplete-textbox-container {
-moz-binding: url(chrome://browser/skin/browser.xml#autocomplete-security-wrapper); -moz-binding: url(chrome://browser/skin/browser.xml#autocomplete-security-wrapper);
} }
@ -1165,7 +1162,6 @@ statusbarpanel#statusbar-display {
#navigator-throbber[busy="true"] { #navigator-throbber[busy="true"] {
list-style-image: url("chrome://global/skin/icons/loading_16.png"); list-style-image: url("chrome://global/skin/icons/loading_16.png");
opacity: 0.5;
} }
#navigator-throbber > hbox { #navigator-throbber > hbox {
@ -1181,7 +1177,6 @@ toolbar[iconsize="small"] #navigator-throbber {
toolbar[mode="text"] #navigator-throbber[busy="true"], toolbar[mode="text"] #navigator-throbber[busy="true"],
toolbar[iconsize="small"] #navigator-throbber[busy="true"] { toolbar[iconsize="small"] #navigator-throbber[busy="true"] {
list-style-image: url("chrome://global/skin/icons/loading_16.png"); list-style-image: url("chrome://global/skin/icons/loading_16.png");
opacity: 0.5;
} }
tabpanels { tabpanels {
@ -1197,7 +1192,6 @@ tabpanels {
.tabbrowser-tab[selected="true"] { .tabbrowser-tab[selected="true"] {
margin-bottom: 0px; margin-bottom: 0px;
font-weight: bold;
} }
.tab-icon-image { .tab-icon-image {
@ -1211,7 +1205,6 @@ tabpanels {
.tabbrowser-tab[busy] > .tab-icon-image { .tabbrowser-tab[busy] > .tab-icon-image {
list-style-image: url("chrome://global/skin/icons/loading_16.png") !important; list-style-image: url("chrome://global/skin/icons/loading_16.png") !important;
opacity: 0.6;
} }
.tabs-bottom { .tabs-bottom {
@ -1330,7 +1323,6 @@ tabpanels {
.alltabs-item[busy] > .menu-iconic-left > .menu-iconic-icon { .alltabs-item[busy] > .menu-iconic-left > .menu-iconic-icon {
list-style-image: url("chrome://global/skin/icons/loading_16.png"); list-style-image: url("chrome://global/skin/icons/loading_16.png");
opacity: 0.6;
} }
.tabs-alltabs-button > .toolbarbutton-icon { .tabs-alltabs-button > .toolbarbutton-icon {
@ -1345,7 +1337,6 @@ tabpanels {
#sidebar-throbber[loading="true"] { #sidebar-throbber[loading="true"] {
list-style-image: url("chrome://global/skin/icons/loading_16.png"); list-style-image: url("chrome://global/skin/icons/loading_16.png");
opacity: 0.5;
-moz-margin-end: 4px; -moz-margin-end: 4px;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1,108 +0,0 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
.folder-icon > .menulist-label-box > .menulist-icon,
.folder-icon > .menu-iconic-left > .menu-iconic-icon {
width: 16px;
height: 16px;
}
.folder-icon > .menu-iconic-left {
display: -moz-box;
}
.folder-icon {
list-style-image: url("chrome://global/skin/tree/folder.png") !important;
}
.menulist-icon {
margin: 0px !important;
}
#folder-tree {
margin: 6px 0px;
font: message-box;
}
dialog {
font: menu;
}
#expander {
-moz-appearance: none;
margin-left: 8px;
padding: 0px;
min-width: 0px;
}
#addgroup {
margin-top: 6px;
margin-bottom: 0px;
}
.up {
list-style-image: url("chrome://browser/skin/bookmarks/expander-open.png") !important;
}
.down {
list-style-image: url("chrome://browser/skin/bookmarks/expander-closed.png") !important;
}
.down:hover:active {
list-style-image: url("chrome://browser/skin/bookmarks/expander-closed-active.png") !important;
}
.up:hover:active {
list-style-image: url("chrome://browser/skin/bookmarks/expander-open-active.png") !important;
}
/* Make the microsummary picker look like a regular textbox instead of
* an editable menulist when no microsummaries are available.
*/
menulist#name[droppable="false"] {
-moz-appearance: none;
margin: 0px;
border: none;
padding: 0px;
height: auto !important;
}
menulist#name[droppable="false"] > .menulist-editable-box {
/* These rules are duplicates of the rules for the textbox element
* in textbox.css and should track changes in that file.
*/
-moz-appearance: textfield;
cursor: text;
margin: 4px 4px;
border: 3px solid;
-moz-border-top-colors: transparent #888888 #000000;
-moz-border-right-colors: transparent #FFFFFF #000000;
-moz-border-bottom-colors: transparent #FFFFFF #000000;
-moz-border-left-colors: transparent #888888 #000000;
-moz-border-radius-topright: 2px;
-moz-border-radius-bottomleft: 2px;
/*padding: 1px 0px 1px 2px ;*/
padding: 0px;
background-color: -moz-Field;
color: -moz-FieldText;
}
menulist#name[droppable="false"] > .menulist-editable-box > html|*.textbox-input {
margin: 0px !important;
border: none !important;
padding: 0px !important;
background-color: inherit;
color: inherit;
font: inherit;
}
/* Hide the drop marker and the popup. */
menulist#name[droppable="false"] > .menulist-dropmarker {
display: none;
}
menulist#name[droppable="false"] > menupopup {
display: none;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 927 B

View File

@ -1,107 +0,0 @@
#bookmark-window toolbarbutton {
list-style-image: url("chrome://browser/skin/bookmarks/Bookmarks-toolbar.png");
-moz-box-orient: vertical;
}
toolbarbutton#newbookmark {
-moz-image-region: rect(0px, 168px, 24px, 144px);
}
toolbarbutton#newbookmark:not([disabled="true"]):hover {
-moz-image-region: rect(24px, 168px, 48px, 144px);
}
toolbarbutton#newbookmark[disabled="true"] {
-moz-image-region: rect(48px, 168px, 72px, 144px);
}
toolbarbutton#newbookmark:not([disabled="true"]):hover:active {
-moz-image-region: rect(72px, 168px, 96px, 144px);
}
toolbarbutton#newfolder {
-moz-image-region: rect(0px, 24px, 24px, 0px);
}
toolbarbutton#newfolder:not([disabled="true"]):hover {
-moz-image-region: rect(24px, 24px, 48px, 0px);
}
toolbarbutton#newfolder[disabled="true"] {
-moz-image-region: rect(48px, 24px, 72px, 0px);
}
toolbarbutton#newfolder:not([disabled="true"]):hover:active {
-moz-image-region: rect(72px, 24px, 96px, 0px);
}
toolbarbutton#newseparator {
-moz-image-region: rect(0px, 48px, 24px, 24px);
}
toolbarbutton#newseparator:not([disabled="true"]):hover {
-moz-image-region: rect(24px, 48px, 48px, 24px);
}
toolbarbutton#newseparator[disabled="true"] {
-moz-image-region: rect(48px, 48px, 72px, 24px);
}
toolbarbutton#newseparator:not([disabled="true"]):hover:active {
-moz-image-region: rect(72px, 48px, 96px, 24px);
}
toolbarbutton#moveBookmark {
-moz-image-region: rect(0px, 72px, 24px, 48px);
}
toolbarbutton#moveBookmark:not([disabled="true"]):hover {
-moz-image-region: rect(24px, 72px, 48px, 48px);
}
toolbarbutton#moveBookmark[disabled="true"] {
-moz-image-region: rect(48px, 72px, 72px, 48px);
}
toolbarbutton#moveBookmark:not([disabled="true"]):hover:active {
-moz-image-region: rect(72px, 72px, 96px, 48px);
}
toolbarbutton#properties {
-moz-image-region: rect(0px, 96px, 24px, 72px);
}
toolbarbutton#properties:not([disabled="true"]):hover {
-moz-image-region: rect(24px, 96px, 48px, 72px);
}
toolbarbutton#properties[disabled="true"] {
-moz-image-region: rect(48px, 96px, 72px, 72px);
}
toolbarbutton#properties:not([disabled="true"]):hover:active {
-moz-image-region: rect(72px, 96px, 96px, 72px);
}
toolbarbutton#rename {
-moz-image-region: rect(0px, 120px, 24px, 96px);
}
toolbarbutton#rename:not([disabled="true"]):hover {
-moz-image-region: rect(24px, 120px, 48px, 96px);
}
toolbarbutton#rename[disabled="true"] {
-moz-image-region: rect(48px, 120px, 72px, 96px);
}
toolbarbutton#rename:not([disabled="true"]):hover:active {
-moz-image-region: rect(72px, 120px, 96px, 96px);
}
toolbarbutton#delete {
-moz-image-region: rect(0px, 144px, 24px, 120px);
}
toolbarbutton#delete:not([disabled="true"]):hover {
-moz-image-region: rect(24px, 144px, 48px, 120px);
}
toolbarbutton#delete[disabled="true"] {
-moz-image-region: rect(48px, 144px, 72px, 120px);
}
toolbarbutton#delete:not([disabled="true"]):hover:active {
-moz-image-region: rect(72px, 144px, 96px, 120px);
}
#bookmarks-search {
background-image: none;
}
.bookmarksTree {
margin: 0px !important;
}
#bookmark-views-splitter {
border-right: 1px solid #bebebe;
}

View File

@ -1,90 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Firefox.
*
* The Initial Developer of the Original Code is Mozilla.
* Portions created by the Initial Developer are Copyright (C) 2006
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Myk Melez <myk@mozilla.org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
/* Make the microsummary picker look like a regular textbox instead of
* an editable menulist when no microsummaries are available.
*/
menulist#name[droppable="false"] {
-moz-appearance: none;
margin: 0px;
border: none;
padding: 0px;
height: auto !important;
}
menulist#name[droppable="false"] > .menulist-dropmarker {
display: none;
}
menulist#name[droppable="false"] > .menulist-editable-box {
/* These rules are duplicates of the rules for the textbox element
* in textbox.css and should track changes in that file.
*/
-moz-appearance: textfield;
cursor: text;
margin: 2px 4px;
border: 2px solid;
-moz-border-top-colors: ThreeDShadow ThreeDDarkShadow;
-moz-border-right-colors: ThreeDHighlight ThreeDLightShadow;
-moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow;
-moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
padding: 2px 2px 3px 4px;
background-color: -moz-Field;
color: -moz-FieldText;
}
menulist#name[droppable="false"] > .menulist-editable-box > html|*.textbox-input {
margin: 0px !important;
border: none !important;
padding: 0px !important;
background-color: inherit;
color: inherit;
font: inherit;
}
/* Hide the drop marker and the popup. */
menulist#name[droppable="false"] > .menulist-dropmarker {
display: none;
}
menulist#name[droppable="false"] > menupopup {
display: none;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 B

View File

@ -74,6 +74,31 @@
/* ----- BOOKMARK BUTTONS ----- */ /* ----- BOOKMARK BUTTONS ----- */
toolbarbutton.bookmark-item {
font-weight: bold;
margin: 0 1px;
padding: 0;
-moz-padding-start: 7px;
min-width: 0;
max-width: 13em;
color: #222;
border: none !important;
}
toolbarbutton.bookmark-item[type=menu] > .toolbarbutton-menu-dropmarker {
-moz-padding-end: 7px;
}
toolbarbutton.bookmark-item[type=menu] > .toolbarbutton-menu-dropmarker[chromedir="rtl"] {
-moz-padding-start: 4px;
-moz-padding-end: 2px;
}
toolbarbutton.bookmark-item[chromedir="rtl"] {
-moz-padding-start: 0px;
-moz-padding-end: 7px;
}
.bookmark-item[container] { .bookmark-item[container] {
list-style-image: url("chrome://global/skin/tree/folder.png"); list-style-image: url("chrome://global/skin/tree/folder.png");
} }
@ -82,15 +107,6 @@
list-style-image: url("chrome://browser/skin/places/history.png"); list-style-image: url("chrome://browser/skin/places/history.png");
} }
toolbarbutton.bookmark-item:hover
{
background: url("chrome://global/skin/toolbar/toolbarbutton-customhover-left.png") no-repeat left center;
}
toolbarbutton.bookmark-item:hover:active, toolbarbutton.bookmark-item[open="true"] {
background:url("chrome://browser/skin/bookmark-open-left.png") no-repeat left center;
}
toolbarbutton.bookmark-item > .toolbarbutton-text-stack > label { toolbarbutton.bookmark-item > .toolbarbutton-text-stack > label {
margin: 0; margin: 0;
} }
@ -103,19 +119,37 @@ toolbarbutton.bookmark-item:not([container]) > .toolbarbutton-text-stack {
-moz-padding-end: 7px; -moz-padding-end: 7px;
} }
toolbarbutton.bookmark-item[chromedir="rtl"] > .toolbarbutton-text-stack {
-moz-padding-end: 0;
-moz-padding-start: 7px;
}
toolbarbutton.bookmark-item:hover {
background: url("chrome://global/skin/toolbar/toolbarbutton-customhover-left.png") no-repeat left center;
}
toolbarbutton.bookmark-item:hover:active,
toolbarbutton.bookmark-item[open="true"] {
background:url("chrome://browser/skin/bookmark-open-left.png") no-repeat left center;
}
toolbarbutton.bookmark-item:not([container]):hover > .toolbarbutton-text-stack, toolbarbutton.bookmark-item:not([container]):hover > .toolbarbutton-text-stack,
toolbarbutton.bookmark-item[container]:not([open]):hover > .toolbarbutton-menu-dropmarker toolbarbutton.bookmark-item[container]:not([open]):hover > .toolbarbutton-menu-dropmarker {
{
background: url("chrome://global/skin/toolbar/toolbarbutton-customhover-right.png") no-repeat right center; background: url("chrome://global/skin/toolbar/toolbarbutton-customhover-right.png") no-repeat right center;
} }
toolbarbutton.bookmark-item[container]:hover > .toolbarbutton-text-stack, toolbarbutton.bookmark-item[container]:hover > .toolbarbutton-text-stack,
#home-button.bookmark-item:hover > .toolbarbutton-icon toolbarbutton.bookmark-item[container]:not([open]):hover > .toolbarbutton-menu-dropmarker[chromedir="rtl"],
{ #home-button.bookmark-item:hover > .toolbarbutton-icon,
#home-button.bookmark-item[chromedir="rtl"]:hover > .toolbarbutton-text-stack {
background: url("chrome://global/skin/toolbar/toolbarbutton-customhover-mid.png") repeat-x; background: url("chrome://global/skin/toolbar/toolbarbutton-customhover-mid.png") repeat-x;
} }
#home-button.bookmark-item:hover[chromedir="rtl"] > .toolbarbutton-icon,
toolbarbutton.bookmark-item[chromedir="rtl"]:hover > .toolbarbutton-text-stack {
background: url("chrome://global/skin/toolbar/toolbarbutton-customhover-right.png") no-repeat right center;
}
toolbarbutton.bookmark-item:not([container]):hover:active > .toolbarbutton-text-stack, toolbarbutton.bookmark-item:not([container]):hover:active > .toolbarbutton-text-stack,
toolbarbutton.bookmark-item[open] > .toolbarbutton-menu-dropmarker, toolbarbutton.bookmark-item[open] > .toolbarbutton-menu-dropmarker,
toolbarbutton.bookmark-item[container]:hover:active > .toolbarbutton-menu-dropmarker toolbarbutton.bookmark-item[container]:hover:active > .toolbarbutton-menu-dropmarker
@ -125,28 +159,17 @@ toolbarbutton.bookmark-item[container]:hover:active > .toolbarbutton-menu-dropma
toolbarbutton.bookmark-item[container]:hover:active > .toolbarbutton-text-stack, toolbarbutton.bookmark-item[container]:hover:active > .toolbarbutton-text-stack,
toolbarbutton.bookmark-item[container][open="true"] > .toolbarbutton-text-stack, toolbarbutton.bookmark-item[container][open="true"] > .toolbarbutton-text-stack,
#home-button.bookmark-item:hover:active > .toolbarbutton-icon #home-button.bookmark-item:hover:active > .toolbarbutton-icon,
{ toolbarbutton.bookmark-item[container]:hover:active > .toolbarbutton-menu-dropmarker[chromedir="rtl"],
toolbarbutton.bookmark-item[container][open="true"] > .toolbarbutton-menu-dropmarker[chromedir="rtl"],
#home-button.bookmark-item:hover:active[chromedir="rtl"] > .toolbarbutton-text-stack {
background: url("chrome://browser/skin/bookmark-open-mid.png") repeat-x !important; background: url("chrome://browser/skin/bookmark-open-mid.png") repeat-x !important;
} }
toolbarbutton.bookmark-item[type=menu] { toolbarbutton.bookmark-item[chromedir="rtl"][container]:hover:active > .toolbarbutton-text-stack,
padding-left: 7px; toolbarbutton.bookmark-item[chromedir="rtl"][container][open] > .toolbarbutton-text-stack,
} #home-button.bookmark-item[chromedir="rtl"]:hover:active > .toolbarbutton-icon {
background: url("chrome://browser/skin/bookmark-open-right.png") no-repeat right center !important;
toolbarbutton.bookmark-item[type=menu] > .toolbarbutton-menu-dropmarker {
padding-right: 7px;
}
toolbarbutton.bookmark-item {
font-weight: bold;
margin: 0 1px;
padding: 0;
-moz-padding-start: 7px;
min-width: 0;
max-width: 13em;
color: #222;
border: none !important;
} }
toolbarbutton.bookmark-item:not([container="true"]) { toolbarbutton.bookmark-item:not([container="true"]) {
@ -164,7 +187,6 @@ toolbarbutton.bookmark-item-microsummarized {
.bookmark-item > .toolbarbutton-icon { .bookmark-item > .toolbarbutton-icon {
margin: 0px; margin: 0px;
display: none !important; display: none !important;
} }
toolbarbutton.bookmark-item .toolbarbutton-text { toolbarbutton.bookmark-item .toolbarbutton-text {
@ -187,11 +209,7 @@ toolbarbutton.bookmark-item .toolbarbutton-text {
.bookmark-item[livemark] > .toolbarbutton-menu-dropmarker { .bookmark-item[livemark] > .toolbarbutton-menu-dropmarker {
list-style-image: url("chrome://browser/skin/places/livemarkFolder.png"); list-style-image: url("chrome://browser/skin/places/livemarkFolder.png");
padding: 4px 4px 3px 2px; padding: 3px 4px 3px 4px;
}
.bookmark-item[livemark]:hover > .toolbarbutton-menu-dropmarker, .bookmark-item[livemark][open] > .toolbarbutton-menu-dropmarker {
list-style-image: url("chrome://browser/skin/places/livemarkFolderHover.png");
} }
.bookmark-item[livemark] { .bookmark-item[livemark] {
@ -272,6 +290,11 @@ toolbarpaletteitem[place="toolbar"] .places-toolbar-items {
-moz-box-orient: vertical; -moz-box-orient: vertical;
} }
.toolbarbutton-1[chromedir="rtl"],
#back-forward-dropmarker[chromedir="rtl"] {
list-style-image: url("chrome://browser/skin/Toolbar-rtl.png");
}
toolbar[mode="text"] .toolbarbutton-1, toolbar[mode="text"] .toolbarbutton-1,
toolbar[mode="text"] .toolbarbutton-menubutton-button { toolbar[mode="text"] .toolbarbutton-menubutton-button {
-moz-box-orient: horizontal; -moz-box-orient: horizontal;
@ -332,10 +355,10 @@ toolbar[mode="icons"] #forward-button .toolbarbutton-text-box,
-moz-image-region: rect(0px, 36px, 23px, 0px); -moz-image-region: rect(0px, 36px, 23px, 0px);
} }
#back-button[disabled="true"] { #back-button[disabled="true"] {
-moz-image-region: rect(23px, 36px, 46px, 0px) !important; -moz-image-region: rect(23px, 36px, 46px, 0px);
} }
#back-button:hover:active, #back-button:hover:active:not([disabled]),
#back-button[buttondown="true"], #back-button[buttondown="true"]:not([disabled]),
#back-button[open="true"] { #back-button[open="true"] {
-moz-image-region: rect(46px, 36px, 69px, 0px); -moz-image-region: rect(46px, 36px, 69px, 0px);
} }
@ -347,60 +370,90 @@ toolbar[mode="icons"] #forward-button .toolbarbutton-text-box,
} }
#forward-button[disabled="true"] { #forward-button[disabled="true"] {
-moz-image-region: rect(23px, 72px, 46px, 36px) !important; -moz-image-region: rect(23px, 72px, 46px, 36px);
} }
#forward-button:hover:active, #forward-button:hover:active:not([disabled]),
#forward-button[buttondown="true"], #forward-button[buttondown="true"]:not([disabled]),
#forward-button[open="true"] { #forward-button[open="true"] {
-moz-image-region: rect(46px, 72px, 69px, 36px); -moz-image-region: rect(46px, 72px, 69px, 36px);
} }
/* ----- DEFAULT BACK/FORWARD BUTTONS ----- */ /* ----- DEFAULT BACK/FORWARD BUTTONS ----- */
toolbar[mode="icons"] #back-button { toolbar[mode="icons"] #unified-back-forward-button > #back-button {
-moz-image-region: rect(0px, 539px, 33px, 504px) !important; -moz-image-region: rect(0px, 539px, 33px, 504px);
-moz-margin-end: 0 !important; -moz-margin-end: 0;
-moz-padding-end: 0 !important; -moz-padding-end: 0;
border-left: none !important; border-left: none;
border-right: none !important; border-right: none;
} }
toolbar[mode="icons"] #back-button[disabled="true"] { toolbar[mode="icons"] #unified-back-forward-button > #back-button[chromedir="rtl"] {
-moz-image-region: rect(33px, 539px, 66px, 504px) !important; -moz-image-region: rect(0px, 582px, 33px, 547px);
} }
toolbar[mode="icons"] #back-button:hover:active:not([disabled]), toolbar[mode="icons"] #unified-back-forward-button > #back-button[disabled="true"] {
toolbar[mode="icons"] #back-button[open="true"] { -moz-image-region: rect(33px, 539px, 66px, 504px);
-moz-image-region: rect(66px, 539px, 99px, 504px) !important;
} }
toolbar[mode="icons"] #forward-button { toolbar[mode="icons"] #unified-back-forward-button > #back-button[disabled="true"][chromedir="rtl"] {
-moz-image-region: rect(0px, 566px, 33px, 539px) !important; -moz-image-region: rect(33px, 582px, 66px, 547px);
-moz-margin-start: 0 !important;
-moz-margin-end: 0 !important;
-moz-padding-start: 0 !important;
-moz-padding-end: 0 !important;
border-left: none !important;
border-right: none !important;
} }
toolbar[mode="icons"] #forward-button[disabled="true"] { toolbar[mode="icons"] #unified-back-forward-button > #back-button:hover:active:not([disabled]),
-moz-image-region: rect(33px, 566px, 66px, 539px) !important; toolbar[mode="icons"] #unified-back-forward-button > #back-button[open="true"] {
-moz-image-region: rect(66px, 539px, 99px, 504px);
} }
toolbar[mode="icons"] #forward-button:hover:active:not([disabled]), toolbar[mode="icons"] #unified-back-forward-button > #back-button:hover:active[chromedir="rtl"]:not([disabled]),
toolbar[mode="icons"] #forward-button[open="true"] { toolbar[mode="icons"] #unified-back-forward-button > #back-button[open="true"][chromedir="rtl"] {
-moz-image-region: rect(66px, 566px, 99px, 539px) !important; -moz-image-region: rect(66px, 582px, 99px, 547px);
} }
toolbar[mode="icons"] #back-forward-dropmarker { toolbar[mode="icons"] #unified-back-forward-button > #forward-button {
-moz-image-region: rect(0px, 582px, 33px, 566px) !important; -moz-image-region: rect(0px, 566px, 33px, 539px);
-moz-margin-start: 0 !important; -moz-margin-start: 0;
-moz-margin-end: 3px !important; -moz-margin-end: 0;
-moz-padding-start: 0 !important; -moz-padding-start: 0;
-moz-padding-end: 1px !important; -moz-padding-end: 0;
border-left: none !important; border-left: none;
border-right: none !important; border-right: none;
}
toolbar[mode="icons"] #unified-back-forward-button > #forward-button[chromedir="rtl"] {
-moz-image-region: rect(0px, 547px, 33px, 519px);
}
toolbar[mode="icons"] #unified-back-forward-button > #forward-button[disabled="true"] {
-moz-image-region: rect(33px, 566px, 66px, 539px);
}
toolbar[mode="icons"] #unified-back-forward-button > #forward-button[disabled="true"][chromedir="rtl"] {
-moz-image-region: rect(33px, 547px, 66px, 519px);
}
toolbar[mode="icons"] #unified-back-forward-button > #forward-button:hover:active:not([disabled]),
toolbar[mode="icons"] #unified-back-forward-button > #forward-button[open="true"] {
-moz-image-region: rect(66px, 566px, 99px, 539px);
}
toolbar[mode="icons"] #unified-back-forward-button > #forward-button[chromedir="rtl"]:hover:active:not([disabled]),
toolbar[mode="icons"] #unified-back-forward-button > #forward-button[open="true"][chromedir="rtl"] {
-moz-image-region: rect(66px, 547px, 99px, 519px);
}
#back-forward-dropmarker {
-moz-image-region: rect(0px, 582px, 33px, 566px);
-moz-margin-start: 0;
-moz-margin-end: 3px;
-moz-padding-start: 0;
-moz-padding-end: 1px;
border-left: none;
border-right: none;
}
#back-forward-dropmarker[chromedir="rtl"] {
-moz-image-region: rect(0px, 519px, 33px, 504px);
} }
toolbar[mode="icons"] #back-forward-dropmarker > image { toolbar[mode="icons"] #back-forward-dropmarker > image {
@ -413,64 +466,114 @@ toolbar[mode="icons"] #back-forward-dropmarker > dropmarker {
display: none; display: none;
} }
toolbar[mode="icons"] #back-forward-dropmarker[disabled="true"] { #back-forward-dropmarker[disabled="true"] {
-moz-image-region: rect(33px, 582px, 66px, 566px) !important; -moz-image-region: rect(33px, 582px, 66px, 566px);
} }
toolbar[mode="icons"] #back-forward-dropmarker:hover:active:not([disabled]), #back-forward-dropmarker[disabled="true"][chromedir="rtl"] {
toolbar[mode="icons"] #back-forward-dropmarker[open="true"] { -moz-image-region: rect(33px, 519px, 66px, 504px);
-moz-image-region: rect(0px, 582px, 33px, 566px) !important; }
#back-forward-dropmarker:hover:active:not([disabled]),
#back-forward-dropmarker[open="true"] {
-moz-image-region: rect(66px, 582px, 99px, 566px);
}
#back-forward-dropmarker[chromedir="rtl"]:hover:active:not([disabled]),
#back-forward-dropmarker[open="true"][chromedir="rtl"] {
-moz-image-region: rect(66px, 519px, 99px, 504px);
} }
/* ----- SMALL BACK BUTTON, PAIRED----- */ /* ----- SMALL BACK BUTTON, PAIRED----- */
toolbar[iconsize="small"][mode="icons"] #back-button { toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #back-button {
-moz-image-region: rect(0px, 616px, 23px, 582px) !important; -moz-image-region: rect(0px, 616px, 23px, 582px);
-moz-margin-end: 0 !important; -moz-margin-end: 0;
-moz-padding-end: 0 !important; -moz-padding-end: 0;
border-left: none !important; border-left: none;
border-right: none !important; border-right: none;
} }
toolbar[iconsize="small"][mode="icons"] #back-button[disabled="true"] { toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #back-button[chromedir="rtl"] {
-moz-image-region: rect(23px, 616px, 46px, 582px) !important; -moz-image-region: rect(0px, 664px, 23px, 630px);
} }
toolbar[iconsize="small"][mode="icons"] #back-button:hover:active:not([disabled]), toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #back-button[disabled="true"] {
toolbar[iconsize="small"][mode="icons"] #back-button[open="true"] { -moz-image-region: rect(23px, 616px, 46px, 582px);
-moz-image-region: rect(46px, 616px, 69px, 582px) !important; }
toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #back-button[disabled="true"][chromedir="rtl"] {
-moz-image-region: rect(23px, 664px, 46px, 630px);
}
toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #back-button:hover:active:not([disabled]),
toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #back-button[open="true"] {
-moz-image-region: rect(46px, 616px, 69px, 582px);
}
toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #back-button[chromedir="rtl"]:hover:active:not([disabled]),
toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #back-button[open="true"][chromedir="rtl"] {
-moz-image-region: rect(46px, 664px, 69px, 630px);
} }
/* ----- SMALL FORWARD BUTTON, PAIRED ----- */ /* ----- SMALL FORWARD BUTTON, PAIRED ----- */
toolbar[iconsize="small"][mode="icons"] #forward-button { toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #forward-button {
-moz-image-region: rect(0px, 649px, 23px, 616px) !important; -moz-image-region: rect(0px, 649px, 23px, 616px);
-moz-margin-start: 0 !important; -moz-margin-start: 0;
-moz-padding-start: 0 !important; -moz-padding-start: 0;
border-left: none !important; border-left: none;
border-right: none !important; border-right: none;
} }
toolbar[iconsize="small"][mode="icons"] #forward-button[disabled="true"] {
-moz-image-region: rect(23px, 649px, 46px, 616px) !important; toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #forward-button[chromedir="rtl"] {
-moz-image-region: rect(0px, 630px, 23px, 597px);
} }
toolbar[iconsize="small"][mode="icons"] #forward-button:hover:active:not([disabled]),
toolbar[iconsize="small"][mode="icons"] #forward-button[open="true"] { toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #forward-button[disabled="true"] {
-moz-image-region: rect(46px, 649px, 69px, 616px) !important; -moz-image-region: rect(23px, 649px, 46px, 616px);
}
toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #forward-button[disabled="true"][chromedir="rtl"] {
-moz-image-region: rect(23px, 630px, 46px, 597px);
}
toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #forward-button:hover:active:not([disabled]),
toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #forward-button[open="true"] {
-moz-image-region: rect(46px, 649px, 69px, 616px);
}
toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #forward-button[chromedir="rtl"]:hover:active:not([disabled]),
toolbar[mode="icons"][iconsize="small"] #unified-back-forward-button > #forward-button[open="true"][chromedir="rtl"] {
-moz-image-region: rect(46px, 630px, 69px, 597px);
} }
/* ----- SMALL BACK/FORWARD DROPMARKER ----- */ /* ----- SMALL BACK/FORWARD DROPMARKER ----- */
toolbar[iconsize="small"][mode="icons"] #back-forward-dropmarker { toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarker {
-moz-image-region: rect(0px, 664px, 23px, 649px) !important; -moz-image-region: rect(0px, 664px, 23px, 649px);
} }
toolbar[iconsize="small"][mode="icons"] #back-forward-dropmarker[disabled="true"] { toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarker[chromedir="rtl"] {
-moz-image-region: rect(23px, 664px, 46px, 649px) !important; -moz-image-region: rect(0px, 596px, 23px, 582px);
} }
toolbar[iconsize="small"][mode="icons"] #back-forward-dropmarker:hover:active:not([disabled]), toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarker[disabled="true"] {
toolbar[iconsize="small"][mode="icons"] #back-forward-dropmarker[open="true"] { -moz-image-region: rect(23px, 664px, 46px, 649px);
-moz-image-region: rect(46px, 664px, 69px, 649px) !important; }
toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarker[disabled="true"][chromedir="rtl"] {
-moz-image-region: rect(23px, 596px, 46px, 582px);
}
toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarker:hover:active:not([disabled]),
toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarker[open="true"] {
-moz-image-region: rect(46px, 664px, 69px, 649px);
}
toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarker[chromedir="rtl"]:hover:active:not([disabled]),
toolbar[iconsize="small"] #unified-back-forward-button > #back-forward-dropmarker[open="true"][chromedir="rtl"] {
-moz-image-region: rect(46px, 596px, 69px, 582px);
} }
/* ----- DEFAULT RELOAD BUTTON ----- */ /* ----- DEFAULT RELOAD BUTTON ----- */
@ -658,7 +761,9 @@ toolbar[iconsize="small"][mode="icons"] #back-forward-dropmarker[open="true"] {
#window-controls { #window-controls {
-moz-box-align: center; -moz-box-align: center;
padding: 0 2px 0 4px; padding: 0;
-moz-padding-start: 4px;
-moz-padding-end: 2px;
} }
#minimize-button { #minimize-button {
@ -675,6 +780,7 @@ toolbar[iconsize="small"][mode="icons"] #back-forward-dropmarker[open="true"] {
#urlbar { #urlbar {
-moz-appearance: none; -moz-appearance: none;
direction: ltr !important;
border: none; border: none;
background: url("chrome://browser/skin/urlbar/endcap.png") transparent right center no-repeat; background: url("chrome://browser/skin/urlbar/endcap.png") transparent right center no-repeat;
margin: 0px 4px 1px 4px; margin: 0px 4px 1px 4px;
@ -730,10 +836,20 @@ toolbar[iconsize="small"][mode="icons"] #back-forward-dropmarker[open="true"] {
cursor: -moz-grab; cursor: -moz-grab;
} }
#wrapper-urlbar-container[place="palette"] {
max-width: 20em;
}
#wrapper-urlbar-container > #urlbar-container > #urlbar > #identity-box > hbox > #identity-icon-label,
#wrapper-urlbar-container #urlbar > .autocomplete-history-dropmarker { #wrapper-urlbar-container #urlbar > .autocomplete-history-dropmarker {
display: none; display: none;
} }
#wrapper-urlbar-container > #urlbar-container > #urlbar > #identity-box.verifiedIdentity > hbox > #identity-icon-label,
#wrapper-urlbar-container > #urlbar-container > #urlbar > #identity-box.verifiedDomain > hbox > #identity-icon-label {
display: -moz-box;
}
/* Keep the URL bar LTR */ /* Keep the URL bar LTR */
#PopupAutoCompleteRichResult { #PopupAutoCompleteRichResult {
@ -776,7 +892,7 @@ toolbar[iconsize="small"][mode="icons"] #back-forward-dropmarker[open="true"] {
} }
statusbarpanel#statusbar-display { statusbarpanel#statusbar-display {
padding-left: 0; -moz-padding-start: 0;
} }
.statusbarpanel-text { .statusbarpanel-text {
@ -797,6 +913,12 @@ statusbarpanel#statusbar-display {
height: 16px; height: 16px;
} }
richlistitem[selected="true"][current="true"] > hbox > .ac-result-type-bookmark,
.autocomplete-treebody::-moz-tree-image(selected, current, bookmark, treecolAutoCompleteImage) {
list-style-image: url("chrome://browser/skin/places/star-icons.png");
-moz-image-region: rect(32px, 16px, 48px, 0px);
}
.ac-result-type-tag, .ac-result-type-tag,
.autocomplete-treebody::-moz-tree-image(tag, treecolAutoCompleteImage) { .autocomplete-treebody::-moz-tree-image(tag, treecolAutoCompleteImage) {
list-style-image: url("chrome://browser/skin/places/tag.png"); list-style-image: url("chrome://browser/skin/places/tag.png");
@ -805,7 +927,7 @@ statusbarpanel#statusbar-display {
} }
.ac-comment { .ac-comment {
font-size: 1.15em; font-size: 1.1em;
} }
.ac-extra > .ac-comment { .ac-extra > .ac-comment {
@ -813,7 +935,8 @@ statusbarpanel#statusbar-display {
} }
.ac-url-text { .ac-url-text {
color: #336633; color: #144fae;
font-size: 0.95em;
} }
.autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) { .autocomplete-treebody::-moz-tree-cell-text(treecolAutoCompleteComment) {
@ -906,7 +1029,7 @@ statusbarpanel#statusbar-display {
} }
#editBookmarkPanel > hbox { #editBookmarkPanel > hbox {
padding-right: 1px; -moz-padding-end: 1px;
} }
/**** HUD style buttons ****/ /**** HUD style buttons ****/
@ -968,9 +1091,11 @@ statusbarpanel#statusbar-display {
#editBookmarkPanel #editBMPanel_newFolderButton { #editBookmarkPanel #editBMPanel_newFolderButton {
-moz-appearance: none; -moz-appearance: none;
background-color: transparent !important; background-color: transparent !important;
border-width: 0 3px 0 0; border: 0;
-moz-border-end-width: 3px;
border-style: solid; border-style: solid;
-moz-border-right-colors: rgba(255,255,255,0.15) rgba(0,0,0,0.5) rgba(255,255,255,0.15); -moz-border-right-colors: rgba(255,255,255,0.15) rgba(0,0,0,0.5) rgba(255,255,255,0.15);
-moz-border-left-colors: rgba(255,255,255,0.15) rgba(0,0,0,0.5) rgba(255,255,255,0.15);
padding: 0 9px; padding: 0 9px;
margin: 0; margin: 0;
min-width: 21px; min-width: 21px;
@ -1050,7 +1175,7 @@ statusbarpanel#statusbar-display {
#editBookmarkPanel #editBMPanel_folderTree:focus { #editBookmarkPanel #editBMPanel_folderTree:focus {
outline: 2px solid -moz-mac-focusring; outline: 2px solid -moz-mac-focusring;
outline-offset: -2px; outline-offset: -1px;
-moz-outline-radius: 1px; -moz-outline-radius: 1px;
} }
@ -1147,7 +1272,8 @@ statusbarpanel#statusbar-display {
-moz-border-left-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4); -moz-border-left-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4);
-moz-margin-start: 4px; -moz-margin-start: 4px;
-moz-margin-end: 2px; -moz-margin-end: 2px;
padding: 0 0 0 4px; padding: 0;
-moz-padding-start: 4px;
min-width: 10px; min-width: 10px;
min-height: 22px; min-height: 22px;
color: #ffffff !important; color: #ffffff !important;
@ -1184,7 +1310,7 @@ statusbarpanel#statusbar-display {
/**** name picker ****/ /**** name picker ****/
#editBookmarkPanel #editBMPanel_namePicker[droppable="false"] { #editBookmarkPanel #editBMPanel_namePicker[droppable="false"] {
color: #ffffff !important; color: #ffffff;
} }
#editBookmarkPanel #editBMPanel_namePicker[droppable="false"] > .menulist-dropmarker { #editBookmarkPanel #editBMPanel_namePicker[droppable="false"] > .menulist-dropmarker {
@ -1216,6 +1342,8 @@ statusbarpanel#statusbar-display {
outline: 2px solid -moz-mac-focusring; outline: 2px solid -moz-mac-focusring;
outline-offset: -1px; outline-offset: -1px;
-moz-outline-radius: 1px; -moz-outline-radius: 1px;
background-color: #eeeeee;
color: #000000;
} }
#editBookmarkPanel #editBMPanel_namePicker[droppable="false"][disabled="true"] > .menulist-editable-box { #editBookmarkPanel #editBMPanel_namePicker[droppable="false"][disabled="true"] > .menulist-editable-box {
@ -1227,10 +1355,14 @@ statusbarpanel#statusbar-display {
border: none !important; border: none !important;
padding: 0px !important; padding: 0px !important;
background-color: inherit; background-color: inherit;
color: #ffffff !important; color: #ffffff;
font: inherit; font: inherit;
} }
#editBookmarkPanel #editBMPanel_namePicker[droppable="false"][focused="true"] > .menulist-editable-box > html|*.menulist-editable-input {
color: #000000;
}
#editBookmarkPanel > #editBookmarkPanelContent > #editBookmarkPanelGrid > rows > row > label { #editBookmarkPanel > #editBookmarkPanelContent > #editBookmarkPanelGrid > rows > row > label {
text-align: right; text-align: right;
} }
@ -1238,7 +1370,7 @@ statusbarpanel#statusbar-display {
/* ----- SIDEBAR ELEMENTS ----- */ /* ----- SIDEBAR ELEMENTS ----- */
sidebarheader { sidebarheader {
background-color: #d6dde5; background-color: #d4dde5;
padding: 2px; padding: 2px;
text-transform: uppercase; text-transform: uppercase;
} }
@ -1249,12 +1381,11 @@ sidebarheader {
} }
#sidebar-splitter { #sidebar-splitter {
border-left: none !important; -moz-border-start: none;
border-right: 1px solid #404040; -moz-border-end: 1px solid #404040;
min-width: 1px; min-width: 1px;
width: 1px; width: 1px;
background-image: none !important; background-image: none !important;
} }
#sidebar-title { #sidebar-title {
@ -1370,6 +1501,10 @@ toolbar[mode="text"] #navigator-throbber[busy="true"] {
list-style-image: url("chrome://global/skin/icons/loading_16.png"); list-style-image: url("chrome://global/skin/icons/loading_16.png");
} }
#wrapper-throbber-box > #throbber-box > #navigator-throbber {
list-style-image: url("chrome://global/skin/icons/notloading_16.png");
}
toolbarbutton.chevron { toolbarbutton.chevron {
list-style-image: url("chrome://global/skin/icons/chevron.png") !important; list-style-image: url("chrome://global/skin/icons/chevron.png") !important;
} }
@ -1380,7 +1515,7 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
} }
#nav-bar { #nav-bar {
background-color: #9B9B9B; background-color: #9e9e9e;
border-top: none; border-top: none;
border-bottom: 1px solid rgba(0,0,0,0.35); border-bottom: 1px solid rgba(0,0,0,0.35);
background-image: url("chrome://global/skin/toolbar/toolbar-background.gif"); background-image: url("chrome://global/skin/toolbar/toolbar-background.gif");
@ -1469,19 +1604,23 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
padding: 0px; padding: 0px;
} }
.tabbrowser-tab > .tab-image-right { .tabbrowser-tab > .tab-image-right,
.tabbrowser-tab[chromedir="rtl"] > .tab-image-left {
background: url("chrome://browser/skin/tabbrowser/tab-right.png") no-repeat; background: url("chrome://browser/skin/tabbrowser/tab-right.png") no-repeat;
} }
.tabbrowser-tab:not([selected="true"]) > .tab-image-right { .tabbrowser-tab:not([selected="true"]) > .tab-image-right,
.tabbrowser-tab:not([selected="true"])[chromedir="rtl"] > .tab-image-left {
background: url("chrome://browser/skin/tabbrowser/tab-right-bkgnd.png") no-repeat; background: url("chrome://browser/skin/tabbrowser/tab-right-bkgnd.png") no-repeat;
} }
.tabbrowser-tab > .tab-image-left { .tabbrowser-tab > .tab-image-left,
.tabbrowser-tab[chromedir="rtl"] > .tab-image-right {
background: url("chrome://browser/skin/tabbrowser/tab-left.png") no-repeat; background: url("chrome://browser/skin/tabbrowser/tab-left.png") no-repeat;
} }
.tabbrowser-tab:not([selected="true"]) > .tab-image-left { .tabbrowser-tab:not([selected="true"]) > .tab-image-left,
.tabbrowser-tab:not([selected="true"])[chromedir="rtl"] > .tab-image-right {
background: url("chrome://browser/skin/tabbrowser/tab-left-bkgnd.png") no-repeat; background: url("chrome://browser/skin/tabbrowser/tab-left-bkgnd.png") no-repeat;
} }
@ -1576,6 +1715,11 @@ tabbrowser > tabbox > tabpanels {
cursor: default; cursor: default;
} }
.tab-close-button:hover,
.tabbrowser-tab[selected="true"] > .tab-close-button:hover {
list-style-image: url("chrome://global/skin/icons/closetab-hover.png");
}
.tab-close-button:hover:active, .tab-close-button:hover:active,
.tabbrowser-tab[selected="true"] > .tab-close-button:hover:active { .tabbrowser-tab[selected="true"] > .tab-close-button:hover:active {
list-style-image: url("chrome://global/skin/icons/closetab-active.png"); list-style-image: url("chrome://global/skin/icons/closetab-active.png");
@ -1596,22 +1740,40 @@ tabbrowser > tabbox > tabpanels {
background-image: url("chrome://browser/skin/tabbrowser/tab-middle-bkgnd.png"); background-image: url("chrome://browser/skin/tabbrowser/tab-middle-bkgnd.png");
} }
.tabbrowser-arrowscrollbox > .scrollbutton-up { .tabbrowser-arrowscrollbox > .scrollbutton-up,
background: url("chrome://browser/skin/tabbrowser/tab-arrow-start-bkgnd.png") top right no-repeat; .tabbrowser-arrowscrollbox > .scrollbutton-down-stack > .scrollbutton-down[chromedir="rtl"] {
border: 0;
border-right: 2px solid;
-moz-border-right-colors: rgba(0,0,0,0.25) rgba(255,255,255,0.15);
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start.png"); list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-start.png");
-moz-image-region: rect(0px, 7px, 11px, 0px); -moz-image-region: rect(0px, 7px, 11px, 0px);
-moz-padding-start: 0; padding: 0;
-moz-padding-end: 2px;
width: 16px; width: 16px;
margin: 0; margin: 0;
} }
.tabbrowser-arrowscrollbox > .scrollbutton-up[disabled="true"] { .tabbrowser-arrowscrollbox > .scrollbutton-down-stack > .scrollbutton-down[chromedir="rtl"] {
-moz-image-region: rect(0px, 28px, 11px, 21px); -moz-border-end: none;
} }
.tabbrowser-arrowscrollbox .scrollbutton-down { .tabbrowser-arrowscrollbox > .scrollbutton-up:hover {
background: url("chrome://browser/skin/tabbrowser/tab-arrow-end-bkgnd.png") top left no-repeat; background-color: rgba(0,0,0,0.10);
}
.tabbrowser-arrowscrollbox > .scrollbutton-up:hover:active {
background-color: rgba(0,0,0,0.20);
}
.tabbrowser-arrowscrollbox > .scrollbutton-up[disabled="true"],
.tabbrowser-arrowscrollbox > .scrollbutton-down-stack > .scrollbutton-down[disabled="true"][chromedir="rtl"] {
-moz-image-region: rect(0px, 28px, 11px, 21px);
background-color: transparent !important;
}
.tabbrowser-arrowscrollbox .scrollbutton-down,
.tabbrowser-arrowscrollbox > .scrollbutton-up[chromedir="rtl"] {
border-left: 2px solid;
-moz-border-left-colors: rgba(0,0,0,0.25) rgba(255,255,255,0.15);
list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end.png"); list-style-image: url("chrome://browser/skin/tabbrowser/tab-arrow-end.png");
-moz-image-region: rect(0px, 44px, 11px, 37px); -moz-image-region: rect(0px, 44px, 11px, 37px);
-moz-padding-start: 2px; -moz-padding-start: 2px;
@ -1620,8 +1782,22 @@ tabbrowser > tabbox > tabpanels {
margin: 0; margin: 0;
} }
.tabbrowser-arrowscrollbox .scrollbutton-down[disabled="true"] { .tabbrowser-arrowscrollbox > .scrollbutton-up[chromedir="rtl"] {
-moz-border-start: none;
}
.tabbrowser-arrowscrollbox .scrollbutton-down:hover {
background-color: rgba(0,0,0,0.10);
}
.tabbrowser-arrowscrollbox .scrollbutton-down:hover:active {
background-color: rgba(0,0,0,0.20);
}
.tabbrowser-arrowscrollbox > .scrollbutton-down-stack > .scrollbutton-down[disabled="true"],
.tabbrowser-arrowscrollbox > .scrollbutton-up[disabled="true"][chromedir="rtl"] {
-moz-image-region: rect(0px, 23px, 11px, 16px); -moz-image-region: rect(0px, 23px, 11px, 16px);
background-color: transparent !important;
} }
@ -1636,8 +1812,9 @@ tabbrowser > tabbox > tabpanels {
.tabs-alltabs-button { .tabs-alltabs-button {
list-style-image: url("chrome://browser/skin/tabbrowser/alltabs-box-bkgnd-icon.png"); list-style-image: url("chrome://browser/skin/tabbrowser/alltabs-box-bkgnd-icon.png");
border-left: 2px solid; -moz-border-start: 2px solid;
-moz-border-left-colors: rgba(0,0,0,0.25) rgba(255,255,255,0.15); -moz-border-left-colors: rgba(0,0,0,0.25) rgba(255,255,255,0.15);
-moz-border-right-colors: rgba(0,0,0,0.25) rgba(255,255,255,0.15);
margin: 0; margin: 0;
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
@ -1663,8 +1840,8 @@ tabbrowser > tabbox > tabpanels {
} }
.tabs-alltabs-box-animate { .tabs-alltabs-box-animate {
margin: 2px 0px 3px 0px; margin: 1px 0px 0px 0px;
width: 16px; width: 25px;
background-image: url("chrome://browser/skin/tabbrowser/alltabs-box-overflow-bkgnd-animate.png"); background-image: url("chrome://browser/skin/tabbrowser/alltabs-box-overflow-bkgnd-animate.png");
background-repeat: no-repeat; background-repeat: no-repeat;
opacity: 0.0; opacity: 0.0;
@ -1708,17 +1885,16 @@ tabpanels.plain {
/* Personal toolbar */ /* Personal toolbar */
.toolbar-drop-indicator { .toolbar-drop-indicator {
width: 9px; width: 7px;
height: 18px; height: 17px;
margin-bottom: -6px;
position: relative; position: relative;
background: url('chrome://browser/skin/places/toolbarDropMarker.png') 50% 50% no-repeat; background: url('chrome://browser/skin/places/toolbarDropMarker.png') 40% 50% no-repeat;
} }
.toolbar-drop-indicator-bar { .toolbar-drop-indicator-bar {
visibility: hidden; visibility: hidden;
height: 18px; height: 17px;
margin-bottom: -18px; margin-bottom: -17px;
position: relative; position: relative;
} }
@ -1726,13 +1902,8 @@ tabpanels.plain {
visibility: visible; visibility: visible;
} }
toolbarbutton.bookmark-item[dragover="true"][open="true"] {
-moz-appearance: none;
background: Highlight !important;
color: HighlightText !important;
}
/* Bookmark drag and drop styles */ /* Bookmark drag and drop styles */
.bookmark-item[dragover-into="true"] { .bookmark-item[dragover-into="true"] {
background: Highlight !important; background: Highlight !important;
color: HighlightText !important; color: HighlightText !important;
@ -1879,14 +2050,13 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
#identity-popup-encryption-label { #identity-popup-encryption-label {
white-space: pre-wrap; white-space: pre-wrap;
color: #ffffff; color: #ffffff;
padding-left: 15px; -moz-padding-start: 15px;
margin: 2px 0 4px; margin: 2px 0 4px;
} }
#identity-popup-content-box > label { #identity-popup-content-box > label {
white-space: pre-wrap; white-space: pre-wrap;
margin-left: 0; -moz-padding-start: 15px;
padding-left: 15px;
margin: 0; margin: 0;
} }
@ -1912,7 +2082,7 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption , #identity-popup-content-box.verifiedIdentity > #identity-popup-encryption ,
#identity-popup-content-box.verifiedDomain > #identity-popup-encryption { #identity-popup-content-box.verifiedDomain > #identity-popup-encryption {
margin-top: 10px; margin-top: 10px;
margin-left: -24px; -moz-margin-start: -24px;
} }
#identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon , #identity-popup-content-box.verifiedIdentity > #identity-popup-encryption > vbox > #identity-popup-encryption-icon ,
@ -1945,7 +2115,6 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
-moz-appearance: none; -moz-appearance: none;
background: url("chrome://browser/skin/hud-style-button-middle-background.png") repeat-x #464646 center center; background: url("chrome://browser/skin/hud-style-button-middle-background.png") repeat-x #464646 center center;
border: 3px solid; border: 3px solid;
-moz-border-radius: 5px;
-moz-border-top-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4); -moz-border-top-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4);
-moz-border-right-colors: rgba(53,53,53,1) rgba(53,53,53,1) rgba(162,162,162,1); -moz-border-right-colors: rgba(53,53,53,1) rgba(53,53,53,1) rgba(162,162,162,1);
-moz-border-bottom-colors: rgba(128,128,128,0.35) rgba(0,0,0,0.5) rgba(255,255,255,0.15); -moz-border-bottom-colors: rgba(128,128,128,0.35) rgba(0,0,0,0.5) rgba(255,255,255,0.15);

View File

@ -23,7 +23,7 @@
</binding> </binding>
<binding id="toolbarbutton-menu-shadow" display="xul:menu" <binding id="toolbarbutton-menu-shadow" display="xul:menu"
extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton"> extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton">
<content> <content chromedir="&locale.dir;">
<children includes="observes|template|menupopup|tooltip"/> <children includes="observes|template|menupopup|tooltip"/>
<xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,toolbarmode,buttonstyle"/> <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,toolbarmode,buttonstyle"/>
<xul:stack class="toolbarbutton-text-stack" crop="right" flex="1"> <xul:stack class="toolbarbutton-text-stack" crop="right" flex="1">
@ -32,11 +32,11 @@
<xul:label class="toolbarbutton-text" crop="right" flex="1" <xul:label class="toolbarbutton-text" crop="right" flex="1"
xbl:inherits="value=label,accesskey,crop,dragover-top,toolbarmode,buttonstyle"/> xbl:inherits="value=label,accesskey,crop,dragover-top,toolbarmode,buttonstyle"/>
</xul:stack> </xul:stack>
<xul:dropmarker type="menu" class="toolbarbutton-menu-dropmarker" xbl:inherits="disabled,label"/> <xul:dropmarker type="menu" class="toolbarbutton-menu-dropmarker" xbl:inherits="disabled,label,chromedir"/>
</content> </content>
</binding> </binding>
<binding id="toolbarbutton-shadow" extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton"> <binding id="toolbarbutton-shadow" extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton">
<content> <content chromedir="&locale.dir;">
<children includes="observes|template|menupopup|tooltip"/> <children includes="observes|template|menupopup|tooltip"/>
<xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,toolbarmode,buttonstyle"/> <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,toolbarmode,buttonstyle"/>
<xul:stack class="toolbarbutton-text-stack" crop="right" flex="1"> <xul:stack class="toolbarbutton-text-stack" crop="right" flex="1">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 852 B

View File

@ -47,6 +47,7 @@ classic.jar:
skin/classic/browser/Secure-statusbar-broken.png skin/classic/browser/Secure-statusbar-broken.png
skin/classic/browser/Secure-background.gif skin/classic/browser/Secure-background.gif
skin/classic/browser/Toolbar.png skin/classic/browser/Toolbar.png
skin/classic/browser/Toolbar-rtl.png
skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css) skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css)
skin/classic/browser/feeds/feedIcon.png (feeds/feedIcon.png) skin/classic/browser/feeds/feedIcon.png (feeds/feedIcon.png)
skin/classic/browser/feeds/feedIcon16.png (feeds/feedIcon16.png) skin/classic/browser/feeds/feedIcon16.png (feeds/feedIcon16.png)
@ -59,6 +60,7 @@ classic.jar:
skin/classic/browser/monitor.png skin/classic/browser/monitor.png
skin/classic/browser/monitor_16-10.png skin/classic/browser/monitor_16-10.png
skin/classic/browser/wrench.png skin/classic/browser/wrench.png
skin/classic/browser/places/allBookmarks.png (places/allBookmarks.png)
skin/classic/browser/places/places.css (places/places.css) skin/classic/browser/places/places.css (places/places.css)
* skin/classic/browser/places/organizer.css (places/organizer.css) * skin/classic/browser/places/organizer.css (places/organizer.css)
skin/classic/browser/places/query.png (places/query.png) skin/classic/browser/places/query.png (places/query.png)
@ -67,25 +69,24 @@ classic.jar:
skin/classic/browser/places/bookmarksToolbar.png (places/bookmarksToolbar.png) skin/classic/browser/places/bookmarksToolbar.png (places/bookmarksToolbar.png)
skin/classic/browser/places/history.png (places/history.png) skin/classic/browser/places/history.png (places/history.png)
skin/classic/browser/places/menubutton-end-pressed.png (places/menubutton-end-pressed.png) skin/classic/browser/places/menubutton-end-pressed.png (places/menubutton-end-pressed.png)
skin/classic/browser/places/menubutton-end-pressed-rtl.png (places/menubutton-end-pressed-rtl.png)
skin/classic/browser/places/menubutton-mid-pressed.png (places/menubutton-mid-pressed.png) skin/classic/browser/places/menubutton-mid-pressed.png (places/menubutton-mid-pressed.png)
skin/classic/browser/places/menubutton-start-pressed.png (places/menubutton-start-pressed.png) skin/classic/browser/places/menubutton-start-pressed.png (places/menubutton-start-pressed.png)
skin/classic/browser/places/menubutton-start-pressed-rtl.png (places/menubutton-start-pressed-rtl.png)
skin/classic/browser/places/star-icons.png (places/star-icons.png) skin/classic/browser/places/star-icons.png (places/star-icons.png)
skin/classic/browser/places/toolbar-button-backup.png (places/toolbar-button-backup.png) skin/classic/browser/places/toolbar-button-backup.png (places/toolbar-button-backup.png)
skin/classic/browser/places/toolbar-button-organize.png (places/toolbar-button-organize.png) skin/classic/browser/places/toolbar-button-organize.png (places/toolbar-button-organize.png)
skin/classic/browser/places/toolbar-button-view.png (places/toolbar-button-view.png) skin/classic/browser/places/toolbar-button-view.png (places/toolbar-button-view.png)
skin/classic/browser/places/toolbarDropMarker.png (places/toolbarDropMarker.png) skin/classic/browser/places/toolbarDropMarker.png (places/toolbarDropMarker.png)
skin/classic/browser/places/folderDropArrow.png (places/folderDropArrow.png) skin/classic/browser/places/folderDropArrow.png (places/folderDropArrow.png)
skin/classic/browser/places/infoPaneGrippy.png (places/infoPaneGrippy.png)
skin/classic/browser/places/folderDropHoverArrow.png (places/folderDropHoverArrow.png)
skin/classic/browser/places/livemarkFolder.png (places/livemarkFolder.png) skin/classic/browser/places/livemarkFolder.png (places/livemarkFolder.png)
skin/classic/browser/places/livemarkFolderHover.png (places/livemarkFolderHover.png)
skin/classic/browser/places/back-forward.png (places/back-forward.png) skin/classic/browser/places/back-forward.png (places/back-forward.png)
skin/classic/browser/places/bookmarkProperties.css (places/bookmarkProperties.css) skin/classic/browser/places/bookmarkProperties.css (places/bookmarkProperties.css)
skin/classic/browser/places/contentSplitter-bg.gif (places/contentSplitter-bg.gif)
skin/classic/browser/places/editBookmarkOverlay.css (places/editBookmarkOverlay.css) skin/classic/browser/places/editBookmarkOverlay.css (places/editBookmarkOverlay.css)
skin/classic/browser/places/menubutton-start.png (places/menubutton-start.png) skin/classic/browser/places/menubutton-start.png (places/menubutton-start.png)
skin/classic/browser/places/menubutton-start-rtl.png (places/menubutton-start-rtl.png)
skin/classic/browser/places/menubutton-end.png (places/menubutton-end.png) skin/classic/browser/places/menubutton-end.png (places/menubutton-end.png)
skin/classic/browser/places/menubutton-mid.png (places/menubutton-mid.png) skin/classic/browser/places/menubutton-end-rtl.png (places/menubutton-end-rtl.png)
skin/classic/browser/places/minus.png (places/minus.png) skin/classic/browser/places/minus.png (places/minus.png)
skin/classic/browser/places/minus-active.png (places/minus-active.png) skin/classic/browser/places/minus-active.png (places/minus-active.png)
skin/classic/browser/places/plus.png (places/plus.png) skin/classic/browser/places/plus.png (places/plus.png)
@ -95,19 +96,21 @@ classic.jar:
skin/classic/browser/places/searching_16.png (places/searching_16.png) skin/classic/browser/places/searching_16.png (places/searching_16.png)
skin/classic/browser/places/starred48.png (places/starred48.png) skin/classic/browser/places/starred48.png (places/starred48.png)
skin/classic/browser/places/unstarred48.png (places/unstarred48.png) skin/classic/browser/places/unstarred48.png (places/unstarred48.png)
skin/classic/browser/places/unfiledBookmarks.png (places/unfiledBookmarks.png)
skin/classic/browser/places/twisty-open.gif (places/twisty-open.gif) skin/classic/browser/places/twisty-open.gif (places/twisty-open.gif)
skin/classic/browser/places/twisty-closed.gif (places/twisty-closed.gif) skin/classic/browser/places/twisty-closed.gif (places/twisty-closed.gif)
skin/classic/browser/places/tag.png (places/tag.png) skin/classic/browser/places/tag.png (places/tag.png)
skin/classic/browser/places/selected-gradient.png (places/selected-gradient.png) skin/classic/browser/places/selected-gradient.png (places/selected-gradient.png)
skin/classic/browser/places/selected-focused-gradient.png (places/selected-focused-gradient.png) skin/classic/browser/places/selected-focused-gradient.png (places/selected-focused-gradient.png)
skin/classic/browser/places/organizer-toolbar.png (bookmarks/Bookmarks-toolbar.png) skin/classic/browser/places/expander-closed-active.png (places/expander-closed-active.png)
skin/classic/browser/places/expander-closed-active.png (bookmarks/expander-closed-active.png) skin/classic/browser/places/expander-closed.png (places/expander-closed.png)
skin/classic/browser/places/expander-closed.png (bookmarks/expander-closed.png) skin/classic/browser/places/expander-open-active.png (places/expander-open-active.png)
skin/classic/browser/places/expander-open-active.png (bookmarks/expander-open-active.png) skin/classic/browser/places/expander-open.png (places/expander-open.png)
skin/classic/browser/places/expander-open.png (bookmarks/expander-open.png) skin/classic/browser/preferences/alwaysAsk.png (preferences/alwaysAsk.png)
skin/classic/browser/preferences/application.png (preferences/application.png) skin/classic/browser/preferences/application.png (preferences/application.png)
skin/classic/browser/preferences/Options.png (preferences/Options.png) skin/classic/browser/preferences/Options.png (preferences/Options.png)
skin/classic/browser/preferences/plugin.png (preferences/plugin.png) skin/classic/browser/preferences/plugin.png (preferences/plugin.png)
skin/classic/browser/preferences/saveFile.png (preferences/saveFile.png)
skin/classic/browser/preferences/preferences.css (preferences/preferences.css) skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
skin/classic/browser/preferences/applications.css (preferences/applications.css) skin/classic/browser/preferences/applications.css (preferences/applications.css)
skin/classic/browser/tabbrowser/alltabs-box-bkgnd.png (tabbrowser/alltabs-box-bkgnd.png) skin/classic/browser/tabbrowser/alltabs-box-bkgnd.png (tabbrowser/alltabs-box-bkgnd.png)
@ -136,9 +139,13 @@ classic.jar:
skin/classic/browser/tabbrowser/tab-right-inactive.png (tabbrowser/tab-right-inactive.png) skin/classic/browser/tabbrowser/tab-right-inactive.png (tabbrowser/tab-right-inactive.png)
skin/classic/browser/tabbrowser/tabs-bottom-bg.png (tabbrowser/tabs-bottom-bg.png) skin/classic/browser/tabbrowser/tabs-bottom-bg.png (tabbrowser/tabs-bottom-bg.png)
skin/classic/browser/urlbar/endcap.png (urlbar/endcap.png) skin/classic/browser/urlbar/endcap.png (urlbar/endcap.png)
skin/classic/browser/urlbar/endcap-rtl.png (urlbar/endcap-rtl.png)
skin/classic/browser/urlbar/endcap-focused.png (urlbar/endcap-focused.png) skin/classic/browser/urlbar/endcap-focused.png (urlbar/endcap-focused.png)
skin/classic/browser/urlbar/endcap-focused-rtl.png (urlbar/endcap-focused-rtl.png)
skin/classic/browser/urlbar/startcap.png (urlbar/startcap.png) skin/classic/browser/urlbar/startcap.png (urlbar/startcap.png)
skin/classic/browser/urlbar/startcap-rtl.png (urlbar/startcap-rtl.png)
skin/classic/browser/urlbar/startcap-focused.png (urlbar/startcap-focused.png) skin/classic/browser/urlbar/startcap-focused.png (urlbar/startcap-focused.png)
skin/classic/browser/urlbar/startcap-focused-rtl.png (urlbar/startcap-focused-rtl.png)
skin/classic/browser/urlbar/startcap-secure-start.png (urlbar/startcap-secure-start.png) skin/classic/browser/urlbar/startcap-secure-start.png (urlbar/startcap-secure-start.png)
skin/classic/browser/urlbar/startcap-secure-mid.png (urlbar/startcap-secure-mid.png) skin/classic/browser/urlbar/startcap-secure-mid.png (urlbar/startcap-secure-mid.png)
skin/classic/browser/urlbar/startcap-secure-end.png (urlbar/startcap-secure-end.png) skin/classic/browser/urlbar/startcap-secure-end.png (urlbar/startcap-secure-end.png)
@ -153,6 +160,9 @@ classic.jar:
skin/classic/browser/urlbar/startcap-verified-end-focused.png (urlbar/startcap-verified-end-focused.png) skin/classic/browser/urlbar/startcap-verified-end-focused.png (urlbar/startcap-verified-end-focused.png)
skin/classic/browser/urlbar/startcap-secure.png (urlbar/startcap-secure.png) skin/classic/browser/urlbar/startcap-secure.png (urlbar/startcap-secure.png)
skin/classic/browser/urlbar/startcap-active.png (urlbar/startcap-active.png) skin/classic/browser/urlbar/startcap-active.png (urlbar/startcap-active.png)
skin/classic/browser/urlbar/startcap-active-rtl.png (urlbar/startcap-active-rtl.png)
skin/classic/browser/urlbar/startcap-active-focused.png (urlbar/startcap-active-focused.png)
skin/classic/browser/urlbar/startcap-active-focused-rtl.png (urlbar/startcap-active-focused-rtl.png)
skin/classic/browser/urlbar/startcap-secure-active.png (urlbar/startcap-secure-active.png) skin/classic/browser/urlbar/startcap-secure-active.png (urlbar/startcap-secure-active.png)
skin/classic/browser/urlbar/textfield-mid.png (urlbar/textfield-mid.png) skin/classic/browser/urlbar/textfield-mid.png (urlbar/textfield-mid.png)
skin/classic/browser/urlbar/textfield-mid-focused.png (urlbar/textfield-mid-focused.png) skin/classic/browser/urlbar/textfield-mid-focused.png (urlbar/textfield-mid-focused.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 B

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 837 B

After

Width:  |  Height:  |  Size: 837 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 818 B

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

View File

@ -17,6 +17,20 @@
border-color: transparent; border-color: transparent;
} }
#placesList treechildren::-moz-tree-row(selected) {
background-color: #6f81a9;
background-image: url("chrome://browser/skin/places/selected-gradient.png");
background-repeat: repeat-x;
background-position: bottom left;
border-top: 1px solid #979797;
}
#placesList treechildren::-moz-tree-row(selected,focus) {
background-image: url("chrome://browser/skin/places/selected-focused-gradient.png");
background-color: #8a8a8a !important;
border-top: 1px solid #91a0c0;
}
#placesList treechildren::-moz-tree-row(History), #placesList treechildren::-moz-tree-row(History),
#placesList treechildren::-moz-tree-row(history) { #placesList treechildren::-moz-tree-row(history) {
background-color: blue; background-color: blue;
@ -36,6 +50,16 @@
cursor: default; cursor: default;
} }
#placesList treechildren::-moz-tree-separator {
border-top: 1px solid #505d6d;
margin: 0 10px;
}
#placesList treechildren::-moz-tree-cell-text(selected) {
font-weight: bold !important;
color: #ffffff !important;
}
#placesToolbar { #placesToolbar {
background-color: #999; background-color: #999;
border-bottom: 1px solid #404040; border-bottom: 1px solid #404040;
@ -51,17 +75,20 @@
} }
#placesView > splitter { #placesView > splitter {
border-left: none !important; -moz-border-start: none !important;
border-right: 1px solid #404040; -moz-border-end: 1px solid #404040;
min-width: 1px; min-width: 1px;
width: 1px; width: 1px;
background-image: none !important; background-image: none !important;
} }
.toolbarbutton-1 {
list-style-image: url("chrome://browser/skin/places/back-forward.png");
}
/* back button */ /* back button */
#back-button { #back-button {
list-style-image: url("chrome://browser/skin/places/back-forward.png");
-moz-image-region: rect(0px, 34px, 23px, 0px); -moz-image-region: rect(0px, 34px, 23px, 0px);
-moz-margin-end: 0; -moz-margin-end: 0;
-moz-padding-end: 0; -moz-padding-end: 0;
@ -69,16 +96,30 @@
border-right: none; border-right: none;
} }
#back-button[chromedir="rtl"] {
-moz-image-region: rect(0px, 67px, 23px, 34px);
}
#back-button[disabled="true"] { #back-button[disabled="true"] {
-moz-image-region: rect(23px, 34px, 46px, 0px) !important; -moz-image-region: rect(23px, 34px, 46px, 0px) !important;
} }
#back-button[disabled="true"][chromedir="rtl"] {
-moz-image-region: rect(23px, 67px, 46px, 34px) !important;
}
#back-button:hover:active, #back-button:hover:active,
#back-button[buttondown="true"], #back-button[buttondown="true"],
#back-button[open="true"] { #back-button[open="true"] {
-moz-image-region: rect(46px, 34px, 69px, 0px); -moz-image-region: rect(46px, 34px, 69px, 0px);
} }
#back-button:hover:active[chromedir="rtl"],
#back-button[buttondown="true"][chromedir="rtl"],
#back-button[open="true"][chromedir="rtl"] {
-moz-image-region: rect(46px, 67px, 69px, 34px);
}
#back-button > .toolbarbutton-text, #back-button > .toolbarbutton-text,
#forward-button > .toolbarbutton-text { #forward-button > .toolbarbutton-text {
display: none; display: none;
@ -87,7 +128,6 @@
/* forward button */ /* forward button */
#forward-button { #forward-button {
list-style-image: url("chrome://browser/skin/places/back-forward.png");
-moz-image-region: rect(0px, 67px, 23px, 34px); -moz-image-region: rect(0px, 67px, 23px, 34px);
-moz-margin-start: 0; -moz-margin-start: 0;
-moz-margin-end: 8px; -moz-margin-end: 8px;
@ -96,23 +136,44 @@
border-right: none; border-right: none;
} }
#forward-button[chromedir="rtl"] {
-moz-image-region: rect(0px, 34px, 23px, 0px);
}
#forward-button[disabled="true"] { #forward-button[disabled="true"] {
-moz-image-region: rect(23px, 67px, 46px, 34px) !important; -moz-image-region: rect(23px, 67px, 46px, 34px) !important;
} }
#forward-button[disabled="true"][chromedir="rtl"] {
-moz-image-region: rect(23px, 34px, 46px, 0px) !important;
}
#forward-button:hover:active, #forward-button:hover:active,
#forward-button[buttondown="true"], #forward-button[buttondown="true"],
#forward-button[open="true"] { #forward-button[open="true"] {
-moz-image-region: rect(46px, 67px, 69px, 34px); -moz-image-region: rect(46px, 67px, 69px, 34px);
} }
#forward-button:hover:active[chromedir="rtl"],
#forward-button[buttondown="true"][chromedir="rtl"],
#forward-button[open="true"][chromedir="rtl"] {
-moz-image-region: rect(46px, 34px, 69px, 0px);
}
#placesToolbar > toolbarbutton[type="menu"] { #placesToolbar > toolbarbutton[type="menu"] {
-moz-margin-start: 5px; -moz-margin-start: 5px;
-moz-padding-end: 10px; -moz-padding-end: 10px;
background: url("chrome://browser/skin/places/menubutton-end.png") center right no-repeat; background: url("chrome://browser/skin/places/menubutton-end.png") right center no-repeat;
} }
#placesToolbar > toolbarbutton[type="menu"][open="true"] { #placesToolbar > toolbarbutton[type="menu"][open="true"] {
background: url("chrome://browser/skin/places/menubutton-end-pressed.png") center right no-repeat; background: url("chrome://browser/skin/places/menubutton-end-pressed.png") right center no-repeat;
}
#placesToolbar[chromedir="rtl"] > toolbarbutton[type="menu"] {
background: url("chrome://browser/skin/places/menubutton-end-rtl.png") left center no-repeat;
}
#placesToolbar[chromedir="rtl"] > toolbarbutton[type="menu"][open="true"] {
background: url("chrome://browser/skin/places/menubutton-end-pressed-rtl.png") left center no-repeat;
} }
#placesToolbar > toolbarbutton[type="menu"] > menupopup { #placesToolbar > toolbarbutton[type="menu"] > menupopup {
@ -121,12 +182,21 @@
} }
#placesToolbar > toolbarbutton[type="menu"] > .toolbarbutton-icon { #placesToolbar > toolbarbutton[type="menu"] > .toolbarbutton-icon {
background: url("chrome://browser/skin/places/menubutton-start.png") center left no-repeat; background: url("chrome://browser/skin/places/menubutton-start.png") left center no-repeat;
padding: 3px 4px 4px 10px; padding: 3px 0px 4px 0px;
-moz-padding-start: 10px;
-moz-padding-end: 4px;
height: 23px; height: 23px;
} }
#placesToolbar > toolbarbutton[type="menu"][open="true"] > .toolbarbutton-icon { #placesToolbar > toolbarbutton[type="menu"][open="true"] > .toolbarbutton-icon {
background: url("chrome://browser/skin/places/menubutton-start-pressed.png") center left no-repeat; background: url("chrome://browser/skin/places/menubutton-start-pressed.png") left center no-repeat;
}
#placesToolbar[chromedir="rtl"] > toolbarbutton[type="menu"] > .toolbarbutton-icon {
background: url("chrome://browser/skin/places/menubutton-start-rtl.png") right center no-repeat;
}
#placesToolbar[chromedir="rtl"] > toolbarbutton[type="menu"][open="true"] > .toolbarbutton-icon {
background: url("chrome://browser/skin/places/menubutton-start-pressed-rtl.png") right center no-repeat;
} }
#placesToolbar > toolbarbutton[type="menu"] > .toolbarbutton-text { #placesToolbar > toolbarbutton[type="menu"] > .toolbarbutton-text {
@ -220,7 +290,9 @@
/* Search Bar */ /* Search Bar */
#searchbar { #searchbar {
margin: 6px -4px 0px 2px; margin-top: 6px;
-moz-margin-start: 2px;
-moz-margin-end: -4px;
} }
.textbox-input-closebutton { .textbox-input-closebutton {

View File

@ -16,56 +16,44 @@
#bookmarksPanel > hbox, #bookmarksPanel > hbox,
#history-panel > hbox { #history-panel > hbox {
-moz-appearance: none !important; -moz-appearance: none !important;
background-color: #d6dde5 !important; background-color: #d4dde5 !important;
border-top: none !important; border-top: none !important;
} }
#bookmarks-view, tree.sidebar-placesTree,
#historyTree, tree.sidebar-placesTree treechildren::-moz-tree-row {
#historyTree treechildren::-moz-tree-row,
#bookmarks-view treechildren::-moz-tree-row {
background-color: transparent; background-color: transparent;
border-color: transparent; border-color: transparent;
-moz-margin-end: 0; padding-bottom: 1px;
-moz-appearance: none; -moz-appearance: none;
margin: 0; margin: 0;
border: none; border: none;
} }
#historyTree treechildren::-moz-tree-row, #bookmarks-view treechildren::-moz-tree-row(selected),
#bookmarks-view treechildren::-moz-tree-row { #historyTree treechildren::-moz-tree-row(selected) {
padding-bottom: 1px; background-color: #6f81a9;
}
#historyTree treechildren::-moz-tree-row(selected),
#bookmarks-view treechildren::-moz-tree-row(selected) {
background-color: -moz-mac-secondaryhighlight !important;
background-image: url("chrome://browser/skin/places/selected-gradient.png"); background-image: url("chrome://browser/skin/places/selected-gradient.png");
background-repeat: repeat-x; background-repeat: repeat-x;
background-position: center left; background-position: bottom left;
border-top: 1px solid #979797;
} }
#historyTree treechildren::-moz-tree-separator, tree.sidebar-placesTree treechildren::-moz-tree-separator {
#bookmarks-view treechildren::-moz-tree-separator {
border-top: 1px solid #505d6d; border-top: 1px solid #505d6d;
margin: 0 10px; margin: 0 10px;
} }
#historyTree treechildren::-moz-tree-row(selected,focus),
#bookmarks-view treechildren::-moz-tree-row(selected,focus), #bookmarks-view treechildren::-moz-tree-row(selected,focus),
#placesList treechildren::-moz-tree-row(selected,focus) { #historyTree treechildren::-moz-tree-row(selected,focus) {
background-image: url("chrome://browser/skin/places/selected-focused-gradient.png"); background-image: url("chrome://browser/skin/places/selected-focused-gradient.png");
background-color: Highlight !important; background-color: #8a8a8a !important;
color: HighlightText !important; border-top: 1px solid #91a0c0;
border-top: 1px solid Highlight;
} }
#historyTree treechildren::-moz-tree-cell-text(selected,focus), tree.sidebar-placesTree treechildren::-moz-tree-cell-text(selected) {
#bookmarks-view treechildren::-moz-tree-cell-text(selected,focus),
#placesList treechildren::-moz-tree-cell-text(selected,focus) {
font-weight: bold !important; font-weight: bold !important;
color: HighlightText !important; color: #ffffff !important;
} }
#bookmarksPanel > hbox > label, #bookmarksPanel > hbox > label,
@ -75,21 +63,25 @@
#viewButton { #viewButton {
-moz-appearance: none; -moz-appearance: none;
margin: 0 2px !important; border: 1px solid #7F7F7F;
padding: 2px 0 2px 7px !important; -moz-border-radius: 10px;
background: url("chrome://global/skin/icons/round-button-leftcap.png") no-repeat center left !important; background: url("chrome://global/skin/icons/white-gray-gradient.gif") #A09E9D repeat-x top center;
border: none; min-width: 0px;
} min-height: 0px;
-moz-padding-start: 5px;
#viewButton .button-text { -moz-padding-end: 0px;
margin: 0 !important; padding-top: 1px;
padding: 2px 18px 0 1px !important; padding-bottom: 1px;
background: url("chrome://global/skin/icons/round-button-dropmarker.png") no-repeat center right !important;
height: 19px;
} }
#viewButton .button-menu-dropmarker { #viewButton .button-menu-dropmarker {
display: none; list-style-image: url("chrome://global/skin/icons/menulist-dropmarker.png");
}
#viewButton:focus {
outline: 2px solid #4A8BC7;
outline-offset: -2px;
-moz-outline-radius: 10px;
} }
page > hbox { page > hbox {
@ -100,7 +92,7 @@ page > hbox {
treechildren::-moz-tree-image(title) { treechildren::-moz-tree-image(title) {
list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png"); list-style-image: url("chrome://mozapps/skin/places/defaultFavicon.png");
padding-right: 2px; -moz-padding-end: 2px;
margin: 0px 2px; margin: 0px 2px;
width: 16px; width: 16px;
height: 16px; height: 16px;
@ -127,6 +119,10 @@ treechildren::-moz-tree-row(session-start) {
border-top:1px dotted ThreeDShadow; border-top:1px dotted ThreeDShadow;
} }
treechildren::-moz-tree-image(container, OrganizerQuery_AllBookmarks) {
list-style-image: url("chrome://browser/skin/places/allBookmarks.png");
}
treechildren::-moz-tree-image(container, livemark) { treechildren::-moz-tree-image(container, livemark) {
list-style-image: url("chrome://browser/skin/page-livemarks.png"); list-style-image: url("chrome://browser/skin/page-livemarks.png");
} }
@ -139,6 +135,10 @@ treechildren::-moz-tree-image(container, OrganizerQuery_BookmarksMenu) {
list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png"); list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png");
} }
treechildren::-moz-tree-image(container, OrganizerQuery_UnfiledBookmarks) {
list-style-image: url("chrome://browser/skin/places/unfiledBookmarks.png");
}
/* query-nodes should be styled even if they're not expandable */ /* query-nodes should be styled even if they're not expandable */
treechildren::-moz-tree-image(query) { treechildren::-moz-tree-image(query) {
list-style-image: url("chrome://browser/skin/places/query.png"); list-style-image: url("chrome://browser/skin/places/query.png");

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 736 B

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 736 B

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 957 B

After

Width:  |  Height:  |  Size: 795 B

View File

@ -63,12 +63,12 @@ richlistitem {
richlistitem[appHandlerIcon="ask"], richlistitem[appHandlerIcon="ask"],
menuitem[appHandlerIcon="ask"] { menuitem[appHandlerIcon="ask"] {
list-style-image: url("chrome://browser/skin/preferences/application.png"); list-style-image: url("chrome://browser/skin/preferences/alwaysAsk.png");
} }
richlistitem[appHandlerIcon="save"], richlistitem[appHandlerIcon="save"],
menuitem[appHandlerIcon="save"] { menuitem[appHandlerIcon="save"] {
list-style-image: url("chrome://browser/skin/preferences/application.png"); list-style-image: url("chrome://browser/skin/preferences/saveFile.png");
} }
richlistitem[appHandlerIcon="feed"], richlistitem[appHandlerIcon="feed"],

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -46,15 +46,38 @@
padding: 0; padding: 0;
} }
.searchbar-engine-button[chromedir="rtl"] {
background-image: url("chrome://browser/skin/urlbar/startcap-rtl.png");
}
.searchbar-textbox[focused="true"] > .searchbar-engine-button { .searchbar-textbox[focused="true"] > .searchbar-engine-button {
background-image: url("chrome://browser/skin/urlbar/startcap-focused.png"); background-image: url("chrome://browser/skin/urlbar/startcap-focused.png");
} }
.searchbar-engine-button:active, .searchbar-textbox[focused="true"] > .searchbar-engine-button[chromedir="rtl"] {
background-image: url("chrome://browser/skin/urlbar/startcap-focused-rtl.png");
}
.searchbar-engine-button:hover:active,
.searchbar-engine-button[open="true"] { .searchbar-engine-button[open="true"] {
background-image: url("chrome://browser/skin/urlbar/startcap-active.png") !important; background-image: url("chrome://browser/skin/urlbar/startcap-active.png") !important;
} }
.searchbar-engine-button:hover:active[chromedir="rtl"],
.searchbar-engine-button[open="true"][chromedir="rtl"] {
background-image: url("chrome://browser/skin/urlbar/startcap-active-rtl.png") !important;
}
.searchbar-textbox[focused="true"] > .searchbar-engine-button:active,
.searchbar-textbox[focused="true"] > .searchbar-engine-button[open="true"] {
background-image: url("chrome://browser/skin/urlbar/startcap-active-focused.png") !important;
}
.searchbar-textbox[focused="true"] > .searchbar-engine-button[chromedir="rtl"]:active,
.searchbar-textbox[focused="true"] > .searchbar-engine-button[open="true"][chromedir="rtl"] {
background-image: url("chrome://browser/skin/urlbar/startcap-active-focused-rtl.png") !important;
}
.searchbar-engine-button > .button-box { .searchbar-engine-button > .button-box {
-moz-appearance: none; -moz-appearance: none;
margin-bottom: 1px; margin-bottom: 1px;
@ -75,13 +98,20 @@
.search-go-container { .search-go-container {
-moz-box-align: center; -moz-box-align: center;
background: url("chrome://browser/skin/urlbar/endcap.png") no-repeat right top; background: url("chrome://browser/skin/urlbar/endcap.png") no-repeat right top;
padding-right: 4px; -moz-padding-end: 4px;
}
.search-go-container[chromedir="rtl"] {
background-image: url("chrome://browser/skin/urlbar/endcap-rtl.png");
} }
.searchbar-textbox[focused="true"] > .search-go-container { .searchbar-textbox[focused="true"] > .search-go-container {
background-image: url("chrome://browser/skin/urlbar/endcap-focused.png"); background-image: url("chrome://browser/skin/urlbar/endcap-focused.png");
} }
.searchbar-textbox[focused="true"] > .search-go-container[chromedir="rtl"] {
background: url("chrome://browser/skin/urlbar/endcap-focused-rtl.png") no-repeat left top;
}
#searchbar[empty="true"] .search-go-button { #searchbar[empty="true"] .search-go-button {
visibility: hidden; visibility: hidden;

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