Merge from mozilla-central.

--HG--
rename : js/jsd/jsd_scpt.c => js/jsd/jsd_scpt.cpp
rename : js/jsd/jsd_stak.c => js/jsd/jsd_stak.cpp
rename : js/jsd/jsd_val.c => js/jsd/jsd_val.cpp
This commit is contained in:
David Anderson 2012-09-05 16:18:11 -07:00
commit f6eca6c7f0
1634 changed files with 23814 additions and 11550 deletions

3
.gitignore vendored
View File

@ -45,6 +45,3 @@ parser/html/java/javaparser/
.project
.cproject
.settings/
# Python stuff installed at build-time
*.egg-info/

View File

@ -45,6 +45,3 @@ _OPT\.OBJ/
\.project$
\.cproject$
\.settings/
# Python stuff installed at build-time
\.egg-info/

View File

@ -724,7 +724,7 @@ ConvertToAtkAttributeSet(nsIPersistentProperties* aAttributes)
nsCOMPtr<nsIPropertyElement> propElem(do_QueryInterface(sup));
NS_ENSURE_TRUE(propElem, objAttributeSet);
nsCAutoString name;
nsAutoCString name;
rv = propElem->GetKey(name);
NS_ENSURE_SUCCESS(rv, objAttributeSet);

View File

@ -786,7 +786,7 @@ LoadGtkModule(GnomeAccessibilityModule& aModule)
//try to load the module with "gtk-2.0/modules" appended
char *curLibPath = PR_GetLibraryPath();
nsCAutoString libPath(curLibPath);
nsAutoCString libPath(curLibPath);
#if defined(LINUX) && defined(__x86_64__)
libPath.Append(":/usr/lib64:/usr/lib");
#else
@ -803,7 +803,7 @@ LoadGtkModule(GnomeAccessibilityModule& aModule)
subLen = libPath.Length() - loc1;
else
subLen = loc2 - loc1;
nsCAutoString sub(Substring(libPath, loc1, subLen));
nsAutoCString sub(Substring(libPath, loc1, subLen));
sub.Append("/gtk-2.0/modules/");
sub.Append(aModule.libName);
aModule.lib = PR_LoadLibrary(sub.get());

View File

@ -186,7 +186,7 @@ getUriCB(AtkHyperlink *aLink, gint aLinkIndex)
if (!uri)
return nullptr;
nsCAutoString cautoStr;
nsAutoCString cautoStr;
nsresult rv = uri->GetSpec(cautoStr);
NS_ENSURE_SUCCESS(rv, nullptr);

View File

@ -5,7 +5,7 @@
#ifndef mozilla_a11y_AccCollector_h__
#define mozilla_a11y_AccCollector_h__
#include "AccFilters.h"
#include "Filters.h"
#include "nsTArray.h"

View File

@ -8,7 +8,7 @@
#define mozilla_a11y_AccIterator_h__
#include "DocAccessible.h"
#include "AccFilters.h"
#include "Filters.h"
#include "nsAccessibilityService.h"
namespace mozilla {

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "AccFilters.h"
#include "Filters.h"
#include "Accessible-inl.h"
#include "nsAccUtils.h"

View File

@ -156,9 +156,9 @@ private:
if (aNode) { \
if (aNode->IsElement()) { \
dom::Element* targetElm = aNode->AsElement(); \
nsCAutoString tag; \
nsAutoCString tag; \
targetElm->Tag()->ToUTF8String(tag); \
nsCAutoString id; \
nsAutoCString id; \
nsIAtom* atomid = targetElm->GetID(); \
if (atomid) \
atomid->ToUTF8String(id); \
@ -166,7 +166,7 @@ private:
} else if (aNode->IsNodeOfType(nsINode::eDOCUMENT)) { \
nsCOMPtr<nsIDocument> document = do_QueryInterface(aNode); \
nsIURI* uri = document->GetDocumentURI(); \
nsCAutoString spec; \
nsAutoCString spec; \
uri->GetSpec(spec); \
printf("document: %p; uri: %s", (void*)aNode, spec.get()); \
} \

View File

@ -80,7 +80,7 @@ static void
LogDocURI(nsIDocument* aDocumentNode)
{
nsIURI* uri = aDocumentNode->GetDocumentURI();
nsCAutoString spec;
nsAutoCString spec;
uri->GetSpec(spec);
printf("uri: %s", spec.get());
}
@ -90,7 +90,7 @@ LogDocShellState(nsIDocument* aDocumentNode)
{
printf("docshell busy: ");
nsCAutoString docShellBusy;
nsAutoCString docShellBusy;
nsCOMPtr<nsISupports> container = aDocumentNode->GetContainer();
if (container) {
nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(container);
@ -296,7 +296,7 @@ static void
LogRequest(nsIRequest* aRequest)
{
if (aRequest) {
nsCAutoString name;
nsAutoCString name;
aRequest->GetName(name);
printf(" request spec: %s\n", name.get());
uint32_t loadFlags = 0;
@ -407,7 +407,7 @@ logging::DocLoad(const char* aMsg, nsIDocument* aDocumentNode)
void
logging::DocLoadEventFired(AccEvent* aEvent)
{
nsCAutoString strEventType;
nsAutoCString strEventType;
GetDocLoadEventType(aEvent, strEventType);
if (!strEventType.IsEmpty())
printf(" fire: %s\n", strEventType.get());
@ -416,7 +416,7 @@ logging::DocLoadEventFired(AccEvent* aEvent)
void
logging::DocLoadEventHandled(AccEvent* aEvent)
{
nsCAutoString strEventType;
nsAutoCString strEventType;
GetDocLoadEventType(aEvent, strEventType);
if (strEventType.IsEmpty())
return;
@ -574,11 +574,11 @@ logging::Node(const char* aDescr, nsINode* aNode)
dom::Element* elm = aNode->AsElement();
nsCAutoString tag;
nsAutoCString tag;
elm->Tag()->ToUTF8String(tag);
nsIAtom* idAtom = elm->GetID();
nsCAutoString id;
nsAutoCString id;
if (idAtom)
idAtom->ToUTF8String(id);

View File

@ -19,7 +19,7 @@ CPPSRCS = \
AccEvent.cpp \
AccGroupInfo.cpp \
AccIterator.cpp \
AccFilters.cpp \
Filters.cpp \
ARIAStateMap.cpp \
FocusManager.cpp \
NotificationController.cpp \

View File

@ -356,7 +356,7 @@ nsAccDocManager::CreateDocOrRootAccessible(nsIDocument* aDocument)
// Ignore documents without presshell and not having root frame.
nsIPresShell* presShell = aDocument->GetShell();
if (!presShell || !presShell->GetRootFrame())
if (!presShell || !presShell->GetRootFrame() || presShell->IsDestroying())
return nullptr;
// Do not create document accessible until role content is loaded, otherwise

View File

@ -40,7 +40,7 @@ nsAccUtils::SetAccAttr(nsIPersistentProperties *aAttributes,
nsIAtom *aAttrName, const nsAString& aAttrValue)
{
nsAutoString oldValue;
nsCAutoString attrName;
nsAutoCString attrName;
aAttributes->SetStringProperty(nsAtomCString(aAttrName), aAttrValue, oldValue);
}

View File

@ -155,12 +155,6 @@ nsAccessNode::GetDocumentNode() const
return mContent ? mContent->OwnerDoc() : nullptr;
}
bool
nsAccessNode::IsPrimaryForNode() const
{
return true;
}
void
nsAccessNode::Language(nsAString& aLanguage)
{

View File

@ -96,15 +96,6 @@ public:
*/
void* UniqueID() { return static_cast<void*>(this); }
/**
* Return true if the accessible is primary accessible for the given DOM node.
*
* Accessible hierarchy may be complex for single DOM node, in this case
* these accessibles share the same DOM node. The primary accessible "owns"
* that DOM node in terms it gets stored in the accessible to node map.
*/
virtual bool IsPrimaryForNode() const;//hello
/**
* Interface methods on nsIAccessible shared with ISimpleDOM.
*/

View File

@ -15,7 +15,6 @@
#include "nsCaret.h"
#include "nsIDOMDocument.h"
#include "nsIDOMHTMLAnchorElement.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMHTMLTextAreaElement.h"
#include "nsIFrame.h"
#include "nsIPresShell.h"

View File

@ -475,7 +475,7 @@ nsCoreUtils::IsErrorPage(nsIDocument *aDocument)
if (!isAboutScheme)
return false;
nsCAutoString path;
nsAutoCString path;
uri->GetPath(path);
NS_NAMED_LITERAL_CSTRING(neterror, "neterror");

View File

@ -689,6 +689,15 @@ public:
*/
bool IsInDocument() const { return !(mFlags & eIsNotInDocument); }
/**
* Return true if the accessible is primary accessible for the given DOM node.
*
* Accessible hierarchy may be complex for single DOM node, in this case
* these accessibles share the same DOM node. The primary accessible "owns"
* that DOM node in terms it gets stored in the accessible to node map.
*/
bool IsPrimaryForNode() const { return !(mFlags & eSharedNode); }
protected:
//////////////////////////////////////////////////////////////////////////////
@ -738,7 +747,8 @@ protected:
*/
enum StateFlags {
eIsDefunct = 1 << 2, // accessible is defunct
eIsNotInDocument = 1 << 3 // accessible is not in document
eIsNotInDocument = 1 << 3, // accessible is not in document
eSharedNode = 1 << 4 // accessible shares DOM node from another accessible
};
/**
@ -746,23 +756,23 @@ protected:
* @note keep these flags in sync with ChildrenFlags and StateFlags
*/
enum AccessibleTypes {
eApplicationAccessible = 1 << 4,
eAutoCompleteAccessible = 1 << 5,
eAutoCompletePopupAccessible = 1 << 6,
eComboboxAccessible = 1 << 7,
eDocAccessible = 1 << 8,
eHyperTextAccessible = 1 << 9,
eHTMLFileInputAccessible = 1 << 10,
eHTMLListItemAccessible = 1 << 11,
eImageAccessible = 1 << 12,
eImageMapAccessible = 1 << 13,
eListControlAccessible = 1 << 14,
eMenuButtonAccessible = 1 << 15,
eMenuPopupAccessible = 1 << 16,
eRootAccessible = 1 << 17,
eTextLeafAccessible = 1 << 18,
eXULDeckAccessible = 1 << 19,
eXULTreeAccessible = 1 << 20
eApplicationAccessible = 1 << 5,
eAutoCompleteAccessible = 1 << 6,
eAutoCompletePopupAccessible = 1 << 7,
eComboboxAccessible = 1 << 8,
eDocAccessible = 1 << 9,
eHyperTextAccessible = 1 << 10,
eHTMLFileInputAccessible = 1 << 11,
eHTMLListItemAccessible = 1 << 12,
eImageAccessible = 1 << 13,
eImageMapAccessible = 1 << 14,
eListControlAccessible = 1 << 15,
eMenuButtonAccessible = 1 << 16,
eMenuPopupAccessible = 1 << 17,
eRootAccessible = 1 << 18,
eTextLeafAccessible = 1 << 19,
eXULDeckAccessible = 1 << 20,
eXULTreeAccessible = 1 << 21
};
//////////////////////////////////////////////////////////////////////////////

View File

@ -26,7 +26,7 @@ using namespace mozilla::a11y;
ApplicationAccessible::ApplicationAccessible() :
AccessibleWrap(nullptr, nullptr)
{
mFlags |= eApplicationAccessible;
mFlags |= (eApplicationAccessible | eSharedNode);
}
////////////////////////////////////////////////////////////////////////////////
@ -218,7 +218,7 @@ ApplicationAccessible::GetAppName(nsAString& aName)
if (!mAppInfo)
return NS_ERROR_FAILURE;
nsCAutoString cname;
nsAutoCString cname;
nsresult rv = mAppInfo->GetName(cname);
NS_ENSURE_SUCCESS(rv, rv);
@ -234,7 +234,7 @@ ApplicationAccessible::GetAppVersion(nsAString& aVersion)
if (!mAppInfo)
return NS_ERROR_FAILURE;
nsCAutoString cversion;
nsAutoCString cversion;
nsresult rv = mAppInfo->GetVersion(cversion);
NS_ENSURE_SUCCESS(rv, rv);
@ -257,7 +257,7 @@ ApplicationAccessible::GetPlatformVersion(nsAString& aVersion)
if (!mAppInfo)
return NS_ERROR_FAILURE;
nsCAutoString cversion;
nsAutoCString cversion;
nsresult rv = mAppInfo->GetPlatformVersion(cversion);
NS_ENSURE_SUCCESS(rv, rv);
@ -280,11 +280,6 @@ ApplicationAccessible::Shutdown()
mAppInfo = nullptr;
}
bool
ApplicationAccessible::IsPrimaryForNode() const
{
return false;
}
////////////////////////////////////////////////////////////////////////////////
// Accessible public methods

View File

@ -63,7 +63,6 @@ public:
// nsAccessNode
virtual void Init();
virtual void Shutdown();
virtual bool IsPrimaryForNode() const;
// Accessible
virtual GroupPos GroupPosition();

View File

@ -386,7 +386,7 @@ DocAccessible::GetURL(nsAString& aURL)
nsCOMPtr<nsISupports> container = mDocument->GetContainer();
nsCOMPtr<nsIWebNavigation> webNav(do_GetInterface(container));
nsCAutoString theURL;
nsAutoCString theURL;
if (webNav) {
nsCOMPtr<nsIURI> pURI;
webNav->GetCurrentURI(getter_AddRefs(pURI));

View File

@ -9,7 +9,6 @@
#include "Role.h"
#include "nsIDOMHTMLFormElement.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMXULElement.h"
#include "nsIDOMXULControlElement.h"

View File

@ -136,7 +136,7 @@ ImageAccessible::DoAction(uint8_t aIndex)
if (!uri)
return NS_ERROR_INVALID_ARG;
nsCAutoString utf8spec;
nsAutoCString utf8spec;
uri->GetSpec(utf8spec);
NS_ConvertUTF8toUTF16 spec(utf8spec);

View File

@ -15,13 +15,10 @@
#include "States.h"
#include "nsContentList.h"
#include "nsHTMLInputElement.h"
#include "nsIAccessibleRelation.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMNSEditableElement.h"
#include "nsIDOMHTMLFormElement.h"
#include "nsIDOMHTMLLegendElement.h"
#include "nsIDOMHTMLTextAreaElement.h"
#include "nsIDOMNodeList.h"
#include "nsIEditor.h"
#include "nsIFormControl.h"
#include "nsIFrame.h"
@ -94,23 +91,16 @@ HTMLCheckboxAccessible::NativeState()
uint64_t state = LeafAccessible::NativeState();
state |= states::CHECKABLE;
bool checkState = false; // Radio buttons and check boxes can be checked or mixed
nsHTMLInputElement* input = nsHTMLInputElement::FromContent(mContent);
if (!input)
return state;
nsCOMPtr<nsIDOMHTMLInputElement> htmlCheckboxElement =
do_QueryInterface(mContent);
if (input->Indeterminate())
return state | states::MIXED;
if (input->Checked())
return state | states::CHECKED;
if (htmlCheckboxElement) {
htmlCheckboxElement->GetIndeterminate(&checkState);
if (checkState) {
state |= states::MIXED;
} else { // indeterminate can't be checked at the same time.
htmlCheckboxElement->GetChecked(&checkState);
if (checkState)
state |= states::CHECKED;
}
}
return state;
}
@ -141,13 +131,8 @@ HTMLRadioButtonAccessible::NativeState()
state |= states::CHECKABLE;
bool checked = false; // Radio buttons and check boxes can be checked
nsCOMPtr<nsIDOMHTMLInputElement> htmlRadioElement =
do_QueryInterface(mContent);
if (htmlRadioElement)
htmlRadioElement->GetChecked(&checked);
if (checked)
nsHTMLInputElement* input = nsHTMLInputElement::FromContent(mContent);
if (input && input->Checked())
state |= states::CHECKED;
return state;
@ -383,10 +368,9 @@ HTMLTextFieldAccessible::Value(nsString& aValue)
return;
}
nsCOMPtr<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(mContent));
if (inputElement) {
inputElement->GetValue(aValue);
}
nsHTMLInputElement* input = nsHTMLInputElement::FromContent(mContent);
if (input)
input->GetValue(aValue);
}
void
@ -432,8 +416,9 @@ HTMLTextFieldAccessible::NativeState()
}
// Is it an <input> or a <textarea> ?
nsCOMPtr<nsIDOMHTMLInputElement> htmlInput(do_QueryInterface(mContent));
state |= htmlInput ? states::SINGLE_LINE : states::MULTI_LINE;
nsHTMLInputElement* input = nsHTMLInputElement::FromContent(mContent);
state |= input && input->IsSingleLineTextControl() ?
states::SINGLE_LINE : states::MULTI_LINE;
if (!(state & states::EDITABLE) ||
(state & (states::PROTECTED | states::MULTI_LINE)))
@ -463,9 +448,7 @@ HTMLTextFieldAccessible::NativeState()
autocomplete);
if (!autocomplete.LowerCaseEqualsLiteral("off")) {
nsCOMPtr<nsIDOMHTMLFormElement> form;
htmlInput->GetForm(getter_AddRefs(form));
nsCOMPtr<nsIContent> formContent(do_QueryInterface(form));
nsIContent* formContent = input->GetFormElement();
if (formContent) {
formContent->GetAttr(kNameSpaceID_None,
nsGkAtoms::autocomplete, autocomplete);
@ -499,7 +482,7 @@ NS_IMETHODIMP
HTMLTextFieldAccessible::DoAction(uint8_t aIndex)
{
if (aIndex == 0) {
nsCOMPtr<nsIDOMHTMLElement> element(do_QueryInterface(mContent));
nsHTMLInputElement* element = nsHTMLInputElement::FromContent(mContent);
if (element)
return element->Focus();

View File

@ -152,6 +152,9 @@ HTMLAreaAccessible::
HTMLAreaAccessible(nsIContent* aContent, DocAccessible* aDoc) :
HTMLLinkAccessible(aContent, aDoc)
{
// Make HTML area DOM element not accessible. HTML image map accessible
// manages its tree itself.
mFlags |= eSharedNode;
}
////////////////////////////////////////////////////////////////////////////////
@ -183,17 +186,6 @@ HTMLAreaAccessible::Description(nsString& aDescription)
area->GetShape(aDescription);
}
////////////////////////////////////////////////////////////////////////////////
// HTMLAreaAccessible: nsAccessNode public
bool
HTMLAreaAccessible::IsPrimaryForNode() const
{
// Make HTML area DOM element not accessible. HTML image map accessible
// manages its tree itself.
return false;
}
////////////////////////////////////////////////////////////////////////////////
// HTMLAreaAccessible: Accessible public

View File

@ -53,9 +53,6 @@ public:
HTMLAreaAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsAccessNode
virtual bool IsPrimaryForNode() const;
// Accessible
virtual void Description(nsString& aDescription);
virtual nsresult GetNameInternal(nsAString& aName);

View File

@ -141,6 +141,12 @@ HTMLLIAccessible::CacheChildren()
////////////////////////////////////////////////////////////////////////////////
// HTMLListBulletAccessible
////////////////////////////////////////////////////////////////////////////////
HTMLListBulletAccessible::
HTMLListBulletAccessible(nsIContent* aContent, DocAccessible* aDoc) :
LeafAccessible(aContent, aDoc)
{
mFlags |= eSharedNode;
}
////////////////////////////////////////////////////////////////////////////////
// HTMLListBulletAccessible: nsAccessNode
@ -152,12 +158,6 @@ HTMLListBulletAccessible::GetFrame() const
return blockFrame ? blockFrame->GetBullet() : nullptr;
}
bool
HTMLListBulletAccessible::IsPrimaryForNode() const
{
return false;
}
////////////////////////////////////////////////////////////////////////////////
// HTMLListBulletAccessible: Accessible

View File

@ -75,13 +75,11 @@ private:
class HTMLListBulletAccessible : public LeafAccessible
{
public:
HTMLListBulletAccessible(nsIContent* aContent, DocAccessible* aDoc) :
LeafAccessible(aContent, aDoc) { }
HTMLListBulletAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~HTMLListBulletAccessible() { }
// nsAccessNode
virtual nsIFrame* GetFrame() const;
virtual bool IsPrimaryForNode() const;
// Accessible
virtual ENameValueFlag Name(nsString& aName);

View File

@ -16,15 +16,10 @@
#include "States.h"
#include "nsCOMPtr.h"
#include "nsIFrame.h"
#include "nsHTMLOptionElement.h"
#include "nsIComboboxControlFrame.h"
#include "nsIDocument.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMHTMLOptGroupElement.h"
#include "nsIDOMHTMLSelectElement.h"
#include "nsIFrame.h"
#include "nsIListControlFrame.h"
#include "nsIServiceManager.h"
#include "nsIMutableArray.h"
using namespace mozilla::a11y;
@ -238,30 +233,24 @@ HTMLSelectOptionAccessible::NativeState()
return state;
// Are we selected?
bool isSelected = false;
nsCOMPtr<nsIDOMHTMLOptionElement> option(do_QueryInterface(mContent));
if (option) {
option->GetSelected(&isSelected);
if (isSelected)
state |= states::SELECTED;
}
nsHTMLOptionElement* option = nsHTMLOptionElement::FromContent(mContent);
bool selected = option && option->Selected();
if (selected)
state |= states::SELECTED;
if (selectState & states::OFFSCREEN) {
state |= states::OFFSCREEN;
}
else if (selectState & states::COLLAPSED) {
} else if (selectState & states::COLLAPSED) {
// <select> is COLLAPSED: add OFFSCREEN, if not the currently
// visible option
if (!isSelected) {
if (!selected) {
state |= states::OFFSCREEN;
}
else {
} else {
// Clear offscreen and invisible for currently showing option
state &= ~(states::OFFSCREEN | states::INVISIBLE);
state |= selectState & states::OPAQUE1;
}
}
else {
} else {
// XXX list frames are weird, don't rely on Accessible's general
// visibility implementation unless they get reimplemented in layout
state &= ~states::OFFSCREEN;
@ -348,8 +337,8 @@ HTMLSelectOptionAccessible::SetSelected(bool aSelect)
if (IsDefunct())
return NS_ERROR_FAILURE;
nsCOMPtr<nsIDOMHTMLOptionElement> optionElm(do_QueryInterface(mContent));
return optionElm->SetSelected(aSelect);
nsHTMLOptionElement* option = nsHTMLOptionElement::FromContent(mContent);
return option ? option->SetSelected(aSelect) : NS_ERROR_FAILURE;
}
////////////////////////////////////////////////////////////////////////////////
@ -646,6 +635,7 @@ HTMLComboboxListAccessible::
DocAccessible* aDoc) :
HTMLSelectListAccessible(aContent, aDoc)
{
mFlags |= eSharedNode;
}
////////////////////////////////////////////////////////////////////////////////
@ -666,12 +656,6 @@ HTMLComboboxListAccessible::GetFrame() const
return nullptr;
}
bool
HTMLComboboxListAccessible::IsPrimaryForNode() const
{
return false;
}
////////////////////////////////////////////////////////////////////////////////
// HTMLComboboxAccessible: Accessible

View File

@ -7,9 +7,6 @@
#define mozilla_a11y_HTMLSelectAccessible_h__
#include "HTMLFormControlAccessible.h"
#include "nsIDOMHTMLOptionsCollection.h"
#include "nsIDOMHTMLOptionElement.h"
#include "nsIDOMNode.h"
class nsIMutableArray;
@ -225,7 +222,6 @@ public:
// nsAccessNode
virtual nsIFrame* GetFrame() const;
virtual bool IsPrimaryForNode() const;
// Accessible
virtual a11y::role NativeRole();

View File

@ -36,6 +36,7 @@ LOCAL_INCLUDES = \
-I$(srcdir)/../base \
-I$(srcdir)/../generic \
-I$(srcdir)/../xpcom \
-I$(srcdir)/../../../content/base/src \
-I$(srcdir)/../../../content/html/content/src \
-I$(srcdir)/../../../layout/generic \
-I$(srcdir)/../../../layout/xul/base/src \

View File

@ -1568,7 +1568,7 @@ AccessibleWrap::FirePlatformEvent(AccEvent* aEvent)
NS_ENSURE_TRUE(hWnd, NS_ERROR_FAILURE);
nsAutoString tag;
nsCAutoString id;
nsAutoCString id;
nsIContent* cnt = accessible->GetContent();
if (cnt) {
cnt->Tag()->ToString(tag);
@ -1678,7 +1678,7 @@ AccessibleWrap::ConvertToIA2Attributes(nsIPersistentProperties *aAttributes,
if (!propElem)
return E_FAIL;
nsCAutoString name;
nsAutoCString name;
if (NS_FAILED(propElem->GetKey(name)))
return E_FAIL;

View File

@ -88,12 +88,12 @@ __try {
if (!uri)
return S_FALSE;
nsCAutoString prePath;
nsAutoCString prePath;
nsresult rv = uri->GetPrePath(prePath);
if (NS_FAILED(rv))
return GetHRESULT(rv);
nsCAutoString path;
nsAutoCString path;
rv = uri->GetPath(path);
if (NS_FAILED(rv))
return GetHRESULT(rv);

View File

@ -17,7 +17,6 @@
#include "States.h"
#include "XULMenuAccessible.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsIDOMNSEditableElement.h"
#include "nsIDOMXULButtonElement.h"
#include "nsIDOMXULCheckboxElement.h"

View File

@ -199,7 +199,7 @@ XULTreeAccessible::ChildAtPoint(int32_t aX, int32_t aY,
int32_t row = -1;
nsCOMPtr<nsITreeColumn> column;
nsCAutoString childEltUnused;
nsAutoCString childEltUnused;
mTree->GetCellAt(clientX, clientY, &row, getter_AddRefs(column),
childEltUnused);
@ -703,6 +703,7 @@ XULTreeItemAccessibleBase::
mTree(aTree), mTreeView(aTreeView), mRow(aRow)
{
mParent = aParent;
mFlags |= eSharedNode;
}
////////////////////////////////////////////////////////////////////////////////
@ -896,12 +897,6 @@ XULTreeItemAccessibleBase::Shutdown()
AccessibleWrap::Shutdown();
}
bool
XULTreeItemAccessibleBase::IsPrimaryForNode() const
{
return false;
}
////////////////////////////////////////////////////////////////////////////////
// XULTreeItemAccessibleBase: Accessible public methods
@ -1028,7 +1023,7 @@ XULTreeItemAccessibleBase::DispatchClickEvent(nsIContent* aContent,
// Get column and pseudo element.
nsCOMPtr<nsITreeColumn> column;
nsCAutoString pseudoElm;
nsAutoCString pseudoElm;
if (aActionIndex == eAction_Click) {
// Key column is visible and clickable.

View File

@ -154,7 +154,6 @@ public:
// nsAccessNode
virtual void Shutdown();
virtual bool IsPrimaryForNode() const;
// Accessible
virtual GroupPos GroupPosition();

View File

@ -367,7 +367,7 @@ XULTreeGridRowAccessible::ChildAtPoint(int32_t aX, int32_t aY,
int32_t row = -1;
nsCOMPtr<nsITreeColumn> column;
nsCAutoString childEltUnused;
nsAutoCString childEltUnused;
mTree->GetCellAt(clientX, clientY, &row, getter_AddRefs(column),
childEltUnused);
@ -469,6 +469,7 @@ XULTreeGridCellAccessible::
mTreeView(aTreeView), mRow(aRow), mColumn(aColumn)
{
mParent = aRowAcc;
mFlags |= eSharedNode;
}
////////////////////////////////////////////////////////////////////////////////
@ -794,12 +795,6 @@ XULTreeGridCellAccessible::Init()
mTreeView->GetCellText(mRow, mColumn, mCachedTextEquiv);
}
bool
XULTreeGridCellAccessible::IsPrimaryForNode() const
{
return false;
}
////////////////////////////////////////////////////////////////////////////////
// XULTreeGridCellAccessible: Accessible public implementation

View File

@ -151,7 +151,6 @@ public:
// nsAccessNode
virtual void Init();
virtual bool IsPrimaryForNode() const;
// Accessible
virtual void Shutdown();

View File

@ -142,10 +142,6 @@ pref("browser.xul.error_pages.enabled", true);
// disable color management
pref("gfx.color_management.mode", 0);
//prefer Azure/Cairo canvas
pref("gfx.canvas.azure.enabled", true);
pref("gfx.canvas.azure.backends", "cairo");
// don't allow JS to move and resize existing windows
pref("dom.disable_window_move_resize", true);

View File

@ -0,0 +1,77 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
// This JS shim contains the callbacks to fire DOMRequest events for
// navigator.pay API within the payment processor's scope.
"use strict";
dump("======================= payment.js ======================= \n");
let { classes: Cc, interfaces: Ci, utils: Cu } = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
"@mozilla.org/childprocessmessagemanager;1",
"nsIMessageSender");
XPCOMUtils.defineLazyServiceGetter(this, "uuidgen",
"@mozilla.org/uuid-generator;1",
"nsIUUIDGenerator");
const kClosePaymentFlowEvent = "close-payment-flow-dialog";
function paymentSuccess(aResult) {
closePaymentFlowDialog(function notifySuccess() {
cpmm.sendAsyncMessage("Payment:Success", { result: aResult });
});
}
function paymentFailed(aErrorMsg) {
closePaymentFlowDialog(function notifyError() {
cpmm.sendAsyncMessage("Payment:Failed", { errorMsg: aErrorMsg });
});
}
function closePaymentFlowDialog(aCallback) {
// After receiving the payment provider confirmation about the
// successful or failed payment flow, we notify the UI to close the
// payment flow dialog and return to the caller application.
let randomId = uuidgen.generateUUID().toString();
let id = kClosePaymentFlowEvent + "-" + randomId;
let browser = Services.wm.getMostRecentWindow("navigator:browser");
let content = browser.getContentWindow();
if (!content) {
return;
}
let detail = {
type: kClosePaymentFlowEvent,
id: id
};
// In order to avoid race conditions, we wait for the UI to notify that
// it has successfully closed the payment flow and has recovered the
// caller app, before notifying the parent process to fire the success
// or error event over the DOMRequest.
content.addEventListener("mozContentEvent",
function closePaymentFlowReturn(evt) {
if (evt.detail.id == id && aCallback) {
aCallback();
}
content.removeEventListener("mozContentEvent",
closePaymentFlowReturn);
});
browser.shell.sendChromeEvent(detail);
}
addEventListener("DOMContentLoaded", function(e) {
content.wrappedJSObject.paymentSuccess = paymentSuccess;
content.wrappedJSObject.paymentFailed = paymentFailed;
});

View File

@ -18,7 +18,8 @@ Cu.import('resource://gre/modules/AlarmService.jsm');
Cu.import('resource://gre/modules/ActivitiesService.jsm');
Cu.import('resource://gre/modules/PermissionPromptHelper.jsm');
Cu.import('resource://gre/modules/ObjectWrapper.jsm');
Cu.import("resource://gre/modules/accessibility/AccessFu.jsm");
Cu.import('resource://gre/modules/accessibility/AccessFu.jsm');
Cu.import('resource://gre/modules/Payment.jsm');
XPCOMUtils.defineLazyServiceGetter(Services, 'env',
'@mozilla.org/process/environment;1',
@ -72,7 +73,21 @@ var shell = {
} catch(e) { }
if (Services.prefs.getBoolPref('app.reportCrashes') &&
crashID) {
this.CrashSubmit().submit(crashID)
if (!Services.io.offline) {
this.CrashSubmit.submit(crashID);
return;
}
Services.obs.addObserver(function observer(subject, topic, state) {
if (topic != "network:offline-status-changed")
return;
if (state == 'online') {
shell.CrashSubmit.submit(crashID);
Services.obs.removeObserver(observer, topic);
}
}
, "network:offline-status-changed", false);
}
},
@ -174,6 +189,10 @@ var shell = {
window.removeEventListener('sizemodechange', this);
this.contentBrowser.removeEventListener('mozbrowserloadstart', this, true);
ppmm.removeMessageListener("content-handler", this);
if (this.timer) {
this.timer.cancel();
this.timer = null;
}
#ifndef MOZ_WIDGET_GONK
delete Services.audioManager;
@ -239,8 +258,11 @@ var shell = {
this.sendChromeEvent({type: type});
}
},
lastHardwareButtonEventType: null, // property for the hack above
needBufferSysMsgs: true,
bufferedSysMsgs: [],
timer: null,
handleEvent: function shell_handleEvent(evt) {
let content = this.contentBrowser.contentWindow;
@ -325,6 +347,18 @@ var shell = {
ObjectWrapper.wrap(details, getContentWindow()));
},
sendSystemMessage: function shell_sendSystemMessage(msg) {
let origin = Services.io.newURI(msg.manifest, null, null).prePath;
this.sendChromeEvent({
type: 'open-app',
url: msg.uri,
origin: origin,
manifest: msg.manifest,
isActivity: (msg.type == 'activity'),
target: msg.target
});
},
receiveMessage: function shell_receiveMessage(message) {
if (message.name != 'content-handler') {
return;
@ -374,15 +408,13 @@ nsBrowserAccess.prototype = {
// Listen for system messages and relay them to Gaia.
Services.obs.addObserver(function onSystemMessage(subject, topic, data) {
let msg = JSON.parse(data);
let origin = Services.io.newURI(msg.manifest, null, null).prePath;
shell.sendChromeEvent({
type: 'open-app',
url: msg.uri,
origin: origin,
manifest: msg.manifest,
isActivity: (msg.type == 'activity'),
target: msg.target
});
// Buffer non-activity messages until content starts to load for 10 seconds.
// We'll revisit this later if new kind of messages don't need to be cached.
if (shell.needBufferSysMsgs && msg.type !== 'activity') {
shell.bufferedSysMsgs.push(msg);
return;
}
shell.sendSystemMessage(msg);
}, 'system-messages-open-app', false);
Services.obs.addObserver(function(aSubject, aTopic, aData) {
@ -446,6 +478,18 @@ var CustomEventManager = {
window.addEventListener("ContentStart", (function(evt) {
let content = shell.contentBrowser.contentWindow;
content.addEventListener("mozContentEvent", this, false, true);
// After content starts to load for 10 seconds, send and
// clean up the buffered system messages if there is any.
shell.timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
shell.timer.initWithCallback(function timerCallback() {
shell.bufferedSysMsgs.forEach(function sendSysMsg(msg) {
shell.sendSystemMessage(msg);
});
shell.bufferedSysMsgs.length = 0;
shell.needBufferSysMsgs = false;
shell.timer = null;
}, 10000, Ci.nsITimer.TYPE_ONE_SHOT);
}).bind(this), false);
},
@ -659,6 +703,15 @@ window.addEventListener('ContentStart', function ss_onContentStart() {
}, "geolocation-device-events", false);
})();
(function headphonesStatusTracker() {
Services.obs.addObserver(function(aSubject, aTopic, aData) {
shell.sendChromeEvent({
type: 'headphones-status',
state: aData
});
}, "headphones-status", false);
})();
(function recordingStatusTracker() {
let gRecordingActiveCount = 0;
@ -679,3 +732,12 @@ window.addEventListener('ContentStart', function ss_onContentStart() {
}
}, "recording-device-events", false);
})();
(function volumeStateTracker() {
Services.obs.addObserver(function(aSubject, aTopic, aData) {
shell.sendChromeEvent({
type: 'volume-state-changed',
active: (aData == 'Shared')
});
}, 'volume-state-changed', false);
})();

View File

@ -21,6 +21,8 @@ chrome.jar:
content/content.css (content/content.css)
content/touchcontrols.css (content/touchcontrols.css)
content/payment.js (content/payment.js)
% override chrome://global/content/netError.xhtml chrome://browser/content/netError.xhtml
% override chrome://global/skin/netError.css chrome://browser/content/netError.css
% override chrome://global/skin/media/videocontrols.css chrome://browser/content/touchcontrols.css

View File

@ -43,3 +43,6 @@ category app-startup ProcessGlobal service,@mozilla.org/b2g-process-global;1
component {d18d0216-d50c-11e1-ba54-efb18d0ef0ac} ContentHandler.js
contract @mozilla.org/uriloader/content-handler;1?type=application/pdf {d18d0216-d50c-11e1-ba54-efb18d0ef0ac}
# PaymentGlue.js
component {8b83eabc-7929-47f4-8b48-4dea8d887e4b} PaymentGlue.js
contract @mozilla.org/payment/ui-glue;1 {8b83eabc-7929-47f4-8b48-4dea8d887e4b}

View File

@ -23,12 +23,17 @@ DirectoryProvider.prototype = {
getFile: function dp_getFile(prop, persistent) {
#ifdef MOZ_WIDGET_GONK
let localProps = ["cachePDir", "webappsDir", "PrefD", "indexedDBPDir",
"permissionDBPDir", "UpdRootD"];
"permissionDBPDir", "UpdRootD"];
if (localProps.indexOf(prop) != -1) {
prop.persistent = true;
let file = Cc["@mozilla.org/file/local;1"]
.createInstance(Ci.nsILocalFile)
file.initWithPath(LOCAL_DIR);
persistent.value = true;
return file;
} else if (prop == "coreAppsDir") {
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile)
file.initWithPath("/system/b2g");
persistent.value = true;
return file;
}
#endif

View File

@ -26,6 +26,7 @@ EXTRA_PP_COMPONENTS = \
DirectoryProvider.js \
MozKeyboard.js \
ProcessGlobal.js \
PaymentGlue.js \
$(NULL)
ifdef MOZ_UPDATER

View File

@ -65,19 +65,19 @@ MozKeyboard.prototype = {
},
setSelectedOption: function mozKeyboardSetSelectedOption(index) {
this._messageManager.broadcastAsyncMessage("Forms:Select:Choice", {
this._messageManager.sendAsyncMessage("Forms:Select:Choice", {
"index": index
});
},
setValue: function mozKeyboardSetValue(value) {
this._messageManager.broadcastAsyncMessage("Forms:Input:Value", {
this._messageManager.sendAsyncMessage("Forms:Input:Value", {
"value": value
});
},
setSelectedOptions: function mozKeyboardSetSelectedOptions(indexes) {
this._messageManager.broadcastAsyncMessage("Forms:Select:Choice", {
this._messageManager.sendAsyncMessage("Forms:Select:Choice", {
"indexes": indexes || []
});
},

View File

@ -0,0 +1,134 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
// JS shim that contains the callback functions to be triggered from the
// payment provider's code in order to fire DOMRequest events.
const kPaymentShimFile = "chrome://browser/content/payment.js";
// Type of MozChromEvents to handle payment dialogs.
const kOpenPaymentConfirmationEvent = "open-payment-confirmation-dialog";
const kOpenPaymentFlowEvent = "open-payment-flow-dialog";
XPCOMUtils.defineLazyServiceGetter(this, "uuidgen",
"@mozilla.org/uuid-generator;1",
"nsIUUIDGenerator");
function debug (s) {
//dump("-*- PaymentGlue: " + s + "\n");
};
function PaymentUI() {
}
PaymentUI.prototype = {
confirmPaymentRequest: function confirmPaymentRequest(aRequests,
aSuccessCb,
aErrorCb) {
let browser = Services.wm.getMostRecentWindow("navigator:browser");
let content = browser.getContentWindow();
if (!content && aErrorCb) {
aErrorCb.onresult("NO_CONTENT_WINDOW");
return;
}
// The UI should listen for mozChromeEvent 'open-payment-confirmation-dialog'
// type in order to create and show the payment request confirmation frame
// embeded within a trusted dialog.
let id = kOpenPaymentConfirmationEvent + "-" + this.getRandomId();
let detail = {
type: kOpenPaymentConfirmationEvent,
id: id,
paymentRequests: aRequests
};
// Once the user confirm the payment request and makes his choice, we get
// back to the DOM part to get the appropriate payment flow information
// based on the selected payment provider.
content.addEventListener("mozContentEvent", function handleSelection(evt) {
let msg = evt.detail;
if (msg.id != id) {
debug("mozContentEvent. evt.detail.id != " + id);
content.removeEventListener("mozContentEvent", handleSelection);
return;
}
if (msg.userSelection && aSuccessCb) {
aSuccessCb.onresult(msg.userSelection);
} else if (msg.errorMsg && aErrorCb) {
aErrorCb.onresult(msg.errorMsg);
}
content.removeEventListener("mozContentEvent", handleSelection);
});
browser.shell.sendChromeEvent(detail);
},
showPaymentFlow: function showPaymentFlow(aPaymentFlowInfo, aErrorCb) {
debug("showPaymentFlow. uri " + aPaymentFlowInfo.uri);
// We ask the UI to browse to the selected payment flow.
let browser = Services.wm.getMostRecentWindow("navigator:browser");
let content = browser.getContentWindow();
if (!content && aErrorCb) {
aErrorCb.onresult("NO_CONTENT_WINDOW");
return;
}
let id = kOpenPaymentFlowEvent + "-" + this.getRandomId();
let detail = {
type: kOpenPaymentFlowEvent,
id: id,
uri: aPaymentFlowInfo.uri,
method: aPaymentFlowInfo.requestMethod,
jwt: aPaymentFlowInfo.jwt
};
// At some point the UI would send the created iframe back so the
// callbacks for firing DOMRequest events can be loaded on its
// content.
content.addEventListener("mozContentEvent", function loadPaymentShim(evt) {
if (evt.detail.id != id || !evt.detail.frame) {
content.removeEventListener("mozContentEvent", loadPaymentShim);
return;
}
// Try to load the payment shim file containing the payment callbacks
// in the content script.
let frame = evt.detail.frame;
let frameLoader = frame.QueryInterface(Ci.nsIFrameLoaderOwner)
.frameLoader;
let mm = frameLoader.messageManager;
try {
mm.loadFrameScript(kPaymentShimFile, true);
} catch (e) {
debug("Error loading " + kPaymentShimFile + " as a frame script: " + e);
if (aErrorCb) {
aErrorCb.onresult("ERROR_LOADING_PAYMENT_SHIM");
}
} finally {
content.removeEventListener("mozContentEvent", loadPaymentShim);
}
});
browser.shell.sendChromeEvent(detail);
},
getRandomId: function getRandomId() {
return uuidgen.generateUUID().toString();
},
classID: Components.ID("{8b83eabc-7929-47f4-8b48-4dea8d887e4b}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIPaymentUIGlue])
}
const NSGetFactory = XPCOMUtils.generateNSGetFactory([PaymentUI]);

View File

@ -1,14 +1,16 @@
[
{
"size": 195,
"digest": "209d6875524e6f81c158fe7d8c543683747cb186a53ddb729c6437273404f69468d4c91bfd74a26448ad2a726da1a9b48e6243602cbe60b5d0e0f97cdb29e2cc",
"algorithm": "sha512",
"size": 195,
"digest":
"7236ccc28312303e2f64b0afea767ca29c6c47c4714d727d68c294c898c75d06ba53486bf66cf4d76133fa780b1f5e330204c30a461f43f9b07a3dbfd4f653d4",
"algorithm": "sha512",
"filename": "setup.sh"
},
},
{
"size": 62014571,
"digest": "68327ed36d8a53615fd66a300d5c022517f2f3ea0199b9d95f80683bbf1d0a154266700c8bde235467cc707c4c37341cd3f5e9816bb2c4b66efc96f9e08c92df",
"algorithm": "sha512",
"filename": "gonk-toolchain-4.tar.bz2"
"size": 62788533,
"digest":
"1471e8847c9070d2062419a7be9d8921506b2d8b728d98986059771b8d45b4dba9afe54b25ba5665e4adde847cf4d5574c016c0390741139f6dd1749cd61d263",
"algorithm": "sha512",
"filename": "gonk-toolchain-6.tar.bz2"
}
]
]

View File

@ -1,6 +1,6 @@
[
{
"clang_version": "r161022"
"clang_version": "r161152"
},
{
"size": 47,
@ -9,8 +9,8 @@
"filename": "setup.sh"
},
{
"size": 54405078,
"digest": "940f02ee8e4a760f52d6fe9cd1dc8dec01abc61b8086d46b4aa7d7292cf7c353a2cec1c9687491ade756ba2654b9e93986123155cb931bd18431fbbfdef671a9",
"size": 57249339,
"digest": "708bf18f40edd46517c6368b6b5ad5cd05904d3c60614cdb483248e035cdca0fc905f0e72e90d94de9dccaa18270aadfe07987ab95adcc0c6bb4ce51aa292623",
"algorithm": "sha512",
"filename": "clang.tar.bz2"
}

View File

@ -38,4 +38,6 @@ MOZ_APP_ID={3c2e2abc-06d4-11e1-ac3b-374f68613e61}
MOZ_EXTENSION_MANAGER=1
MOZ_SYS_MSG=1
MOZ_PAY=1
MOZ_TOOLKIT_SEARCH=

View File

@ -114,8 +114,8 @@
#endif
@BINPATH@/blocklist.xml
#ifdef XP_UNIX
@BINPATH@/run-mozilla.sh
#ifndef XP_MACOSX
@BINPATH@/run-mozilla.sh
@BINPATH@/mozilla-xremote-client
#endif
#endif
@ -182,6 +182,7 @@
@BINPATH@/components/dom_html.xpt
@BINPATH@/components/dom_indexeddb.xpt
@BINPATH@/components/dom_offline.xpt
@BINPATH@/components/dom_payment.xpt
@BINPATH@/components/dom_json.xpt
#ifdef MOZ_B2G_RIL
@BINPATH@/components/dom_mms.xpt
@ -489,6 +490,11 @@
@BINPATH@/components/AppProtocolHandler.js
@BINPATH@/components/AppProtocolHandler.manifest
@BINPATH@/components/Payment.js
@BINPATH@/components/PaymentFlowInfo.js
@BINPATH@/components/PaymentRequestInfo.js
@BINPATH@/components/Payment.manifest
; Modules
@BINPATH@/modules/*
@ -690,6 +696,7 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
@BINPATH@/components/ActivitiesGlue.js
@BINPATH@/components/ProcessGlobal.js
@BINPATH@/components/ContentHandler.js
@BINPATH@/components/PaymentGlue.js
#ifdef XP_MACOSX
@BINPATH@/@DLL_PREFIX@plugin_child_interpose@DLL_SUFFIX@

View File

@ -1,3 +1,6 @@
README.txt
@DLL_PREFIX@mozutils@DLL_SUFFIX@
jssubloader/
#ifdef XP_MACOSX
run-mozilla.sh
#endif

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1345657032000">
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1346451771000">
<emItems>
<emItem blockID="i58" id="webmaster@buzzzzvideos.info">
<versionRange minVersion="0" maxVersion="*">
@ -421,6 +421,12 @@
<pluginItem blockID="p125">
<match name="name" exp="Java\(TM\) Platform SE ((6( U(\d|([0-2]\d)|3[0-2]))?)|(7(\sU[0-4])?))(\s[^\d\._U]|$)" /> <match name="filename" exp="npjp2\.dll" /> <versionRange severity="1"></versionRange>
</pluginItem>
<pluginItem blockID="p132">
<match name="name" exp="Java\(TM\) Plug-in 1\.7\.0(_0?([5-6]))?([^\d\._]|$)" /> <match name="filename" exp="libnpjp2\.so" /> <versionRange severity="0"></versionRange>
</pluginItem>
<pluginItem blockID="p134">
<match name="name" exp="Java\(TM\) Platform SE 7 U[5-6](\s[^\d\._U]|$)" /> <match name="filename" exp="npjp2\.dll" /> <versionRange severity="0"></versionRange>
</pluginItem>
<pluginItem blockID="p85">
<match name="filename" exp="JavaPlugin2_NPAPI\.plugin" /> <versionRange minVersion="0" maxVersion="13.6.0" severity="1"></versionRange>
</pluginItem>

View File

@ -222,6 +222,11 @@ pref("general.autoScroll", false);
pref("general.autoScroll", true);
#endif
// Send aol.com the legacy build date instead of the version number in the UA's
// Gecko token as a temporary measure against bug 778408 (mail.aol.com defaults
// to basic web UI when accessed with a user agent without Gecko/20100101).
pref("general.useragent.override.aol.com", "Gecko/[^ ]*#Gecko/20100101");
// At startup, check if we're the default browser and prompt user if not.
pref("browser.shell.checkDefaultBrowser", true);
@ -1174,3 +1179,5 @@ pref("social.manifest.motown", "{\"origin\":\"https://motown-dev.mozillalabs.com
pref("social.activation.whitelist", "https://motown-dev.mozillalabs.com");
pref("social.sidebar.open", true);
pref("social.active", false);
pref("dom.identity.enabled", false);

View File

@ -288,7 +288,7 @@
#ifdef MOZ_SERVICES_SYNC
<menuitem id="appmenu_sync-tabs"
class="syncTabsMenuItem"
label="&syncTabsMenu.label;"
label="&syncTabsMenu2.label;"
oncommand="BrowserOpenSyncTabs();"
disabled="true"/>
#endif

View File

@ -362,7 +362,7 @@
#ifdef MOZ_SERVICES_SYNC
<menuitem id="sync-tabs-menuitem"
class="syncTabsMenuItem"
label="&syncTabsMenu.label;"
label="&syncTabsMenu2.label;"
oncommand="BrowserOpenSyncTabs();"
disabled="true"/>
#endif

View File

@ -91,7 +91,7 @@
<command id="Tools:DevToolbar" oncommand="DeveloperToolbar.toggle();" disabled="true" hidden="true"/>
<command id="Tools:DevToolbarFocus" oncommand="DeveloperToolbar.focus();" disabled="true"/>
<command id="Tools:WebConsole" oncommand="HUDConsoleUI.toggleHUD();"/>
<command id="Tools:Inspect" oncommand="InspectorUI.toggleInspectorUI();" disabled="true" hidden="true"/>
<command id="Tools:Inspect" oncommand="InspectorUI.toggleInspectorUI();"/>
<command id="Tools:Debugger" oncommand="DebuggerUI.toggleDebugger();" disabled="true" hidden="true"/>
<command id="Tools:RemoteDebugger" oncommand="DebuggerUI.toggleRemoteDebugger();" disabled="true" hidden="true"/>
<command id="Tools:ChromeDebugger" oncommand="DebuggerUI.toggleChromeDebugger();" disabled="true" hidden="true"/>

View File

@ -27,7 +27,7 @@ let SocialUI = {
showProfile: function SocialUI_showProfile() {
if (Social.provider)
openUILink(Social.provider.profile.profileURL);
openUILinkIn(Social.provider.profile.profileURL, "tab");
},
observe: function SocialUI_observe(subject, topic, data) {

View File

@ -605,7 +605,7 @@ html|*#gcli-output-frame,
/* Responsive Mode */
vbox[anonid=browserContainer][responsivemode] {
.browserContainer[responsivemode] {
overflow: auto;
}
@ -613,16 +613,16 @@ vbox[anonid=browserContainer][responsivemode] {
-moz-box-pack: end;
}
stack[anonid=browserStack][responsivemode] {
.browserStack[responsivemode] {
transition-duration: 200ms;
transition-timing-function: linear;
}
stack[anonid=browserStack][responsivemode] {
.browserStack[responsivemode] {
transition-property: min-width, max-width, min-height, max-height;
}
stack[anonid=browserStack][responsivemode][notransition] {
.browserStack[responsivemode][notransition] {
transition: none;
}

View File

@ -1434,14 +1434,6 @@ var gBrowserInit = {
}
}
// Enable Inspector?
let enabled = gPrefService.getBoolPref("devtools.inspector.enabled");
if (enabled) {
let cmd = document.getElementById("Tools:Inspect");
cmd.removeAttribute("disabled");
cmd.removeAttribute("hidden");
}
// Enable Debugger?
let enabled = gPrefService.getBoolPref("devtools.debugger.enabled");
if (enabled) {

View File

@ -274,6 +274,7 @@
<panel id="social-flyout-panel"
onpopupshown="SocialFlyout.onShown()"
onpopuphidden="SocialFlyout.onHidden()"
side="right"
type="arrow"
hidden="true"
noautofocus="true"

View File

@ -730,18 +730,26 @@ function onBeginLinkDrag(event,urlField,descField)
}
//******** Image Stuff
function getSelectedImage(tree)
function getSelectedRows(tree)
{
if (!gImageView.rowCount)
return null;
var start = { };
var end = { };
var numRanges = tree.view.selection.getRangeCount();
// Only works if only one item is selected
var clickedRow = tree.view.selection.currentIndex;
if (clickedRow == -1)
return null;
var rowArray = [ ];
for (var t = 0; t < numRanges; t++) {
tree.view.selection.getRangeAt(t, start, end);
for (var v = start.value; v <= end.value; v++)
rowArray.push(v);
}
// image-node
return gImageView.data[clickedRow][COL_IMAGE_NODE];
return rowArray;
}
function getSelectedRow(tree)
{
var rows = getSelectedRows(tree);
return (rows.length == 1) ? rows[0] : -1;
}
function selectSaveFolder()
@ -774,10 +782,11 @@ function selectSaveFolder()
function saveMedia()
{
var tree = document.getElementById("imagetree");
var count = tree.view.selection.count;
if (count == 1) {
var item = getSelectedImage(tree);
var url = gImageView.data[tree.currentIndex][COL_IMAGE_ADDRESS];
var rowArray = getSelectedRows(tree);
if (rowArray.length == 1) {
var row = rowArray[0];
var item = gImageView.data[row][COL_IMAGE_NODE];
var url = gImageView.data[row][COL_IMAGE_ADDRESS];
if (url) {
var titleKey = "SaveImageTitle";
@ -792,16 +801,6 @@ function saveMedia()
}
else {
var odir = selectSaveFolder();
var start = { };
var end = { };
var numRanges = tree.view.selection.getRangeCount();
var rowArray = [ ];
for (var t = 0; t < numRanges; t++) {
tree.view.selection.getRangeAt(t, start, end);
for (var v = start.value; v <= end.value; v++)
rowArray.push(v);
}
var saveAnImage = function(aURIString, aChosenData, aBaseURI) {
internalSave(aURIString, null, null, null, null, false, "SaveImageTitle",
@ -870,14 +869,14 @@ function onImageSelect()
splitter.collapsed = false;
previewBox.collapsed = false;
tree.flex = 0;
makePreview(tree.view.selection.currentIndex);
makePreview(getSelectedRows(tree)[0]);
}
}
function makePreview(row)
{
var imageTree = document.getElementById("imagetree");
var item = getSelectedImage(imageTree);
var item = gImageView.data[row][COL_IMAGE_NODE];
var url = gImageView.data[row][COL_IMAGE_ADDRESS];
var isBG = gImageView.data[row][COL_IMAGE_BG];
var isAudio = false;
@ -1104,7 +1103,7 @@ var imagePermissionObserver = {
var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission);
if (permission.type == "image") {
var imageTree = document.getElementById("imagetree");
var row = imageTree.currentIndex;
var row = getSelectedRow(imageTree);
var item = gImageView.data[row][COL_IMAGE_NODE];
var url = gImageView.data[row][COL_IMAGE_ADDRESS];
if (makeURI(url).host == permission.host)

View File

@ -176,7 +176,7 @@
<method name="resize">
<body><![CDATA[
let child = this.firstCollapsedChild;
if (child && this.emptyWidth > 200) {
if (child && this.emptyWidth > child.viewWidth) {
this.showChat(child);
}
if (!this.firstCollapsedChild) {
@ -211,6 +211,7 @@
<method name="collapseChat">
<parameter name="aChatbox"/>
<body><![CDATA[
aChatbox.viewWidth = aChatbox.getBoundingClientRect().width;
aChatbox.collapsed = true;
aChatbox.isActive = false;
let menu = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "menuitem");

View File

@ -18,7 +18,7 @@
onunload="RemoteTabViewer.uninit()"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
title="&tabs.otherComputers.label;">
title="&tabs.otherDevices.label;">
<script type="application/javascript;version=1.8" src="chrome://browser/content/sync/aboutSyncTabs.js"/>
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
<html:head>
@ -56,7 +56,7 @@
oncontextmenu="RemoteTabViewer.adjustContextMenu(event)">
<hbox id="headers" align="center">
<label id="tabsListHeading"
value="&tabs.otherComputers.label;"/>
value="&tabs.otherDevices.label;"/>
<spacer flex="1"/>
<textbox type="search"
emptytext="&tabs.searchText.label;"

View File

@ -32,7 +32,7 @@
<p id="synckey" dir="ltr">SYNCKEY</p>
<p>&syncKey.page.description;</p>
<p>&syncKey.page.description2;</p>
<div id="column1">
<h2>&syncKey.keepItSecret.heading;</h2>
@ -41,7 +41,7 @@
<div id="column2">
<h2>&syncKey.keepItSafe.heading;</h2>
<p><em>&syncKey.keepItSafe1.description;</em>&syncKey.keepItSafe2.description;<em>&syncKey.keepItSafe3.description;</em>&syncKey.keepItSafe4.description;</p>
<p><em>&syncKey.keepItSafe1.description;</em>&syncKey.keepItSafe2.description;<em>&syncKey.keepItSafe3.description;</em>&syncKey.keepItSafe4a.description;</p>
</div>
<p>&syncKey.findOutMore1.label;<a href="https://services.mozilla.com">https://services.mozilla.com</a>&syncKey.findOutMore2.label;</p>

View File

@ -929,6 +929,23 @@ var gSyncSetup = {
document.getElementById("prefsWipe").hidden = true;
}
if (Weave.Engines.get("addons").enabled) {
let ids = Weave.Engines.get("addons")._store.getAllIDs();
let blessedcount = 0;
for each (let i in ids) {
if (i) {
blessedcount++;
}
}
// bug 600141 does not apply, as this does not have to support existing strings
document.getElementById("addonCount").value =
PluralForm.get(blessedcount,
this._stringBundle.GetStringFromName("addonsCount.label"))
.replace("#1", blessedcount);
} else {
document.getElementById("addonCount").hidden = true;
}
this._case1Setup = true;
break;
case 2:

View File

@ -363,8 +363,8 @@
</columns>
<rows>
<row align="center">
<label value="&syncComputerName.label;"
accesskey="&syncComputerName.accesskey;"
<label value="&syncDeviceName.label;"
accesskey="&syncDeviceName.accesskey;"
control="syncComputerName"/>
<textbox id="syncComputerName" flex="1"
onchange="gSyncUtils.changeName(this)"/>
@ -416,7 +416,7 @@
aria-labelledby="resetClientLabel"/>
<label id="resetClientLabel" control="resetClient">
<html:strong>&choice2.merge.recommended.label;</html:strong>
&choice2.merge.main.label;
&choice2a.merge.main.label;
</label>
</row>
<row align="center">
@ -425,7 +425,7 @@
aria-labelledby="wipeClientLabel"/>
<label id="wipeClientLabel"
control="wipeClient">
&choice2.client.main.label;
&choice2a.client.main.label;
</label>
</row>
<row align="center">
@ -434,7 +434,7 @@
aria-labelledby="wipeRemoteLabel"/>
<label id="wipeRemoteLabel"
control="wipeRemote">
&choice2.server.main.label;
&choice2a.server.main.label;
</label>
</row>
</rows>
@ -449,24 +449,25 @@
<deck id="chosenActionDeck">
<vbox id="chosenActionMerge" class="confirm">
<description class="normal">
&confirm.merge.label;
&confirm.merge2.label;
</description>
</vbox>
<vbox id="chosenActionWipeClient" class="confirm">
<description class="normal">
&confirm.client2.label;
&confirm.client3.label;
</description>
<separator class="thin"/>
<vbox id="dataList">
<label class="data indent" id="bookmarkCount"/>
<label class="data indent" id="historyCount"/>
<label class="data indent" id="passwordCount"/>
<label class="data indent" id="addonCount"/>
<label class="data indent" id="prefsWipe"
value="&engine.prefs.label;"/>
</vbox>
<separator class="thin"/>
<description class="normal">
&confirm.client.moreinfo.label;
&confirm.client2.moreinfo.label;
</description>
</vbox>
<vbox id="chosenActionWipeServer" class="confirm">

View File

@ -26,12 +26,14 @@
onselect="if (event.target.localName == 'tabpanels') this.parentNode.updateCurrentBrowser();">
<xul:tabpanels flex="1" class="plain" selectedIndex="0" anonid="panelcontainer">
<xul:notificationbox flex="1">
<xul:vbox flex="1" anonid="browserContainer">
<xul:stack flex="1" anonid="browserStack">
<xul:browser type="content-primary" message="true" disablehistory="true"
xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup"/>
</xul:stack>
</xul:vbox>
<xul:hbox flex="1" class="browserSidebarContainer">
<xul:vbox flex="1" class="browserContainer">
<xul:stack flex="1" class="browserStack">
<xul:browser anonid="initialBrowser" type="content-primary" message="true" disablehistory="true"
xbl:inherits="tooltip=contenttooltip,contextmenu=contentcontextmenu,autocompletepopup"/>
</xul:stack>
</xul:vbox>
</xul:hbox>
</xul:notificationbox>
</xul:tabpanels>
</xul:tabbox>
@ -292,6 +294,15 @@
</method>
<method name="getNotificationBox">
<parameter name="aBrowser"/>
<body>
<![CDATA[
return this.getSidebarContainer(aBrowser).parentNode;
]]>
</body>
</method>
<method name="getSidebarContainer">
<parameter name="aBrowser"/>
<body>
<![CDATA[
@ -1292,24 +1303,32 @@
var stack = document.createElementNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"stack");
stack.setAttribute("anonid", "browserStack");
stack.className = "browserStack";
stack.appendChild(b);
stack.setAttribute("flex", "1");
// Create the browserContainer
var box = document.createElementNS(
var browserContainer = document.createElementNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"vbox");
box.setAttribute("anonid", "browserContainer");
box.appendChild(stack);
box.setAttribute("flex", "1");
browserContainer.className = "browserContainer";
browserContainer.appendChild(stack);
browserContainer.setAttribute("flex", "1");
// Create the sidebar container
var browserSidebarContainer = document.createElementNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"hbox");
browserSidebarContainer.className = "browserSidebarContainer";
browserSidebarContainer.appendChild(browserContainer);
browserSidebarContainer.setAttribute("flex", "1");
// Add the Message and the Browser to the box
var notificationbox = document.createElementNS(
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
"notificationbox");
notificationbox.setAttribute("flex", "1");
notificationbox.appendChild(box);
notificationbox.appendChild(browserSidebarContainer);
var position = this.tabs.length - 1;
var uniqueId = "panel" + Date.now() + position;
@ -1754,7 +1773,7 @@
// This will unload the document. An unload handler could remove
// dependant tabs, so it's important that the tabbrowser is now in
// a consistent state (tab removed, tab positions updated, etc.).
panel.removeChild(this.getBrowserContainer(browser));
browser.parentNode.removeChild(browser);
// Release the browser in case something is erroneously holding a
// reference to the tab after its removal.
@ -2559,7 +2578,7 @@
<constructor>
<![CDATA[
this.mCurrentBrowser = this.mPanelContainer.firstChild.firstChild.firstChild.firstChild;
this.mCurrentBrowser = document.getAnonymousElementByAttribute(this, "anonid", "initialBrowser");
this.mCurrentTab = this.tabContainer.firstChild;
document.addEventListener("keypress", this, false);
window.addEventListener("sizemodechange", this, false);
@ -3110,7 +3129,7 @@
tab.style.MozMarginStart = - (width + scrollButtonWidth + paddingStart) + "px";
}
this.style.MozMarginStart = width + paddingStart + "px";
this.style.MozPaddingStart = width + paddingStart + "px";
} else {
this.removeAttribute("positionpinnedtabs");
@ -3120,7 +3139,7 @@
tab.style.MozMarginStart = "";
}
this.style.MozMarginStart = "";
this.style.MozPaddingStart = "";
}
this.mTabstrip.ensureElementIsVisible(this.selectedItem, false);
@ -3228,23 +3247,16 @@
</method>
<method name="_finishAnimateTabMove">
<parameter name="event"/>
<body><![CDATA[
if (this.getAttribute("movingtab") != "true")
return;
let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
if ("animDropIndex" in draggedTab._dragData) {
let newIndex = draggedTab._dragData.animDropIndex;
if (newIndex > draggedTab._tPos)
newIndex--;
this.tabbrowser.moveTabTo(draggedTab, newIndex);
}
for (let tab of this.tabbrowser.visibleTabs)
tab.style.transform = "";
this.removeAttribute("movingtab");
this._handleTabSelect();
]]></body>
</method>
@ -3563,7 +3575,7 @@
canvas.width = 160;
canvas.height = 90;
PageThumbs.captureToCanvas(browser.contentWindow, canvas);
dt.setDragImage(canvas, 0, 0);
dt.setDragImage(canvas, -16, -16);
// _dragData.offsetX/Y give the coordinates that the mouse should be
// positioned relative to the corner of the new window created upon
@ -3621,7 +3633,7 @@
return;
}
this._finishAnimateTabMove(event);
this._finishAnimateTabMove();
if (effects == "link") {
let tab = this._getDragTargetTab(event);
@ -3637,7 +3649,7 @@
var newIndex = this._getDropIndex(event);
var scrollRect = tabStrip.scrollClientRect;
var rect = this.getBoundingClientRect();
var rect = tabStrip.getBoundingClientRect();
var minMargin = scrollRect.left - rect.left;
var maxMargin = Math.min(minMargin + scrollRect.width,
scrollRect.right);
@ -3698,7 +3710,14 @@
if (draggedTab.parentNode != this || event.shiftKey)
this.selectedItem = newTab;
} else if (draggedTab && draggedTab.parentNode == this) {
this._finishAnimateTabMove(event);
// actually move the dragged tab
if ("animDropIndex" in draggedTab._dragData) {
let newIndex = draggedTab._dragData.animDropIndex;
if (newIndex > draggedTab._tPos)
newIndex--;
this.tabbrowser.moveTabTo(draggedTab, newIndex);
}
this._finishAnimateTabMove();
} else if (draggedTab) {
// swap the dropped tab with a new one we create and then close
// it in the other window (making it seem to have moved between
@ -3716,6 +3735,7 @@
this.tabbrowser.pinTab(newTab);
this.tabbrowser.moveTabTo(newTab, newIndex);
draggedTab.parentNode._finishAnimateTabMove();
this.tabbrowser.swapBrowsersAndCloseOther(newTab, draggedTab);
// We need to select the tab after we've done
@ -3766,7 +3786,7 @@
// isn't dispatched when the tab is moved within the tabstrip,
// see bug 460801.
this._finishAnimateTabMove(event);
this._finishAnimateTabMove();
var dt = event.dataTransfer;
var draggedTab = dt.mozGetDataAt(TAB_DROP_TYPE, 0);

View File

@ -15,7 +15,7 @@ var runs = [
is(tabbrowser.browsers.length, 1, "Window has one browser");
is(tabbrowser.selectedTab, newTab, "Remaining tab is selected");
is(tabbrowser.selectedBrowser, newBrowser, "Browser for remaining tab is selected");
is(tabbrowser.mTabBox.selectedPanel, newBrowser.parentNode.parentNode.parentNode, "Panel for remaining tab is selected");
is(tabbrowser.mTabBox.selectedPanel, newBrowser.parentNode.parentNode.parentNode.parentNode, "Panel for remaining tab is selected");
}
}
];

View File

@ -2,66 +2,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DEPTH := @DEPTH@
topsrcdir := @top_srcdir@
srcdir := @srcdir@
VPATH := @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = \
content \
locales \
$(NULL)
PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js
include $(topsrcdir)/config/rules.mk
WINDOWS_BRANDING_FILES = \
firefox.ico \
document.ico \
branding.nsi \
wizHeader.bmp \
wizHeaderRTL.bmp \
wizWatermark.bmp \
newwindow.ico \
newtab.ico \
pbmode.ico \
$(NULL)
OSX_BRANDING_FILES = \
background.png \
firefox.icns \
disk.icns \
document.icns \
dsstore \
$(NULL)
LINUX_BRANDING_FILES = \
default16.png \
default32.png \
default48.png \
mozicon128.png \
$(NULL)
OS2_BRANDING_FILES = \
firefox-os2.ico \
document-os2.ico \
$(NULL)
export::
$(NSINSTALL) -D $(DIST)/branding
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
$(NSINSTALL) -D $(DIST)/install
endif
ifeq ($(OS_ARCH),OS2)
cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
endif
include $(srcdir)/../branding.mk

View File

@ -0,0 +1,83 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This .mk file is included by all the branding Makefiles. It defines
# variables that are common to all.
ifndef top_srcdir
$(error Must define top_srcdir before including this file)
endif
ifndef srcdir
$(error Must define srcdir before including this file)
endif
DIRS := content locales
PREF_JS_EXPORTS := $(srcdir)/pref/firefox-branding.js
# These are the lists of branding files per platform. These are shared
# across all branding setups.
#
# If you add files to one branding config, you should define the
# corresponding variable in the respective Makefile and then include this
# file.
#
# If you remove a file from one branding config, that's not currently
# supported. You should add support for that in this file somehow.
# Alternatively, you can just reimplement the logic in this file.
windows_files += \
firefox.ico \
document.ico \
branding.nsi \
wizHeader.bmp \
wizHeaderRTL.bmp \
wizWatermark.bmp \
newwindow.ico \
newtab.ico \
pbmode.ico \
$(NULL)
osx_files += \
background.png \
firefox.icns \
disk.icns \
document.icns \
dsstore \
$(NULL)
linux_files += \
default16.png \
default32.png \
default48.png \
mozicon128.png \
$(NULL)
os2_files += \
firefox-os2.ico \
document-os2.ico \
$(NULL)
BRANDING_DEST := $(DIST)/branding
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
BRANDING_FILES := $(windows_files)
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
BRANDING_FILES := $(osx_files)
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
BRANDING_FILES := $(linux_files)
endif
ifeq ($(OS_ARCH),OS2)
BRANDING_FILES := $(os2_files)
endif
BRANDING_FILES := $(addprefix $(srcdir)/,$(BRANDING_FILES))
ifneq ($(BRANDING_FILES),)
INSTALL_TARGETS += BRANDING
endif
include $(topsrcdir)/config/rules.mk

View File

@ -8,60 +8,4 @@ srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = \
content \
locales \
$(NULL)
PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js
include $(topsrcdir)/config/rules.mk
WINDOWS_BRANDING_FILES = \
firefox.ico \
document.ico \
branding.nsi \
wizHeader.bmp \
wizHeaderRTL.bmp \
wizWatermark.bmp \
newwindow.ico \
newtab.ico \
pbmode.ico \
$(NULL)
OSX_BRANDING_FILES = \
background.png \
firefox.icns \
disk.icns \
document.icns \
dsstore \
$(NULL)
LINUX_BRANDING_FILES = \
default16.png \
default32.png \
default48.png \
mozicon128.png \
$(NULL)
OS2_BRANDING_FILES = \
firefox-os2.ico \
document-os2.ico \
$(NULL)
export::
$(NSINSTALL) -D $(DIST)/branding
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
$(NSINSTALL) -D $(DIST)/install
endif
ifeq ($(OS_ARCH),OS2)
cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
endif
include $(srcdir)/../branding.mk

View File

@ -8,60 +8,4 @@ srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = \
content \
locales \
$(NULL)
PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js
include $(topsrcdir)/config/rules.mk
WINDOWS_BRANDING_FILES = \
firefox.ico \
document.ico \
branding.nsi \
wizHeader.bmp \
wizHeaderRTL.bmp \
wizWatermark.bmp \
newwindow.ico \
newtab.ico \
pbmode.ico \
$(NULL)
OSX_BRANDING_FILES = \
background.png \
firefox.icns \
disk.icns \
document.icns \
dsstore \
$(NULL)
LINUX_BRANDING_FILES = \
default16.png \
default32.png \
default48.png \
mozicon128.png \
$(NULL)
OS2_BRANDING_FILES = \
firefox-os2.ico \
document-os2.ico \
$(NULL)
export::
$(NSINSTALL) -D $(DIST)/branding
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
$(NSINSTALL) -D $(DIST)/install
endif
ifeq ($(OS_ARCH),OS2)
cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
endif
include $(srcdir)/../branding.mk

View File

@ -8,60 +8,4 @@ srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = \
content \
locales \
$(NULL)
PREF_JS_EXPORTS = $(srcdir)/pref/firefox-branding.js
include $(topsrcdir)/config/rules.mk
WINDOWS_BRANDING_FILES = \
firefox.ico \
document.ico \
branding.nsi \
wizHeader.bmp \
wizHeaderRTL.bmp \
wizWatermark.bmp \
newwindow.ico \
newtab.ico \
pbmode.ico \
$(NULL)
OSX_BRANDING_FILES = \
background.png \
firefox.icns \
disk.icns \
document.icns \
dsstore \
$(NULL)
LINUX_BRANDING_FILES = \
default16.png \
default32.png \
default48.png \
mozicon128.png \
$(NULL)
OS2_BRANDING_FILES = \
firefox-os2.ico \
document-os2.ico \
$(NULL)
export::
$(NSINSTALL) -D $(DIST)/branding
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
cp $(addprefix $(srcdir)/, $(WINDOWS_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
cp $(addprefix $(srcdir)/, $(OSX_BRANDING_FILES)) $(DIST)/branding/
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
$(NSINSTALL) -D $(DIST)/install
endif
ifeq ($(OS_ARCH),OS2)
cp $(addprefix $(srcdir)/, $(OS2_BRANDING_FILES)) $(DIST)/branding/
endif
include $(srcdir)/../branding.mk

View File

@ -80,10 +80,10 @@ static RedirEntry kRedirMap[] = {
};
static const int kRedirTotal = NS_ARRAY_LENGTH(kRedirMap);
static nsCAutoString
static nsAutoCString
GetAboutModuleName(nsIURI *aURI)
{
nsCAutoString path;
nsAutoCString path;
aURI->GetPath(path);
int32_t f = path.FindChar('#');
@ -104,7 +104,7 @@ AboutRedirector::NewChannel(nsIURI *aURI, nsIChannel **result)
NS_ENSURE_ARG_POINTER(aURI);
NS_ASSERTION(result, "must not be null");
nsCAutoString path = GetAboutModuleName(aURI);
nsAutoCString path = GetAboutModuleName(aURI);
nsresult rv;
nsCOMPtr<nsIIOService> ioService = do_GetIOService(&rv);
@ -141,7 +141,7 @@ AboutRedirector::GetURIFlags(nsIURI *aURI, uint32_t *result)
{
NS_ENSURE_ARG_POINTER(aURI);
nsCAutoString name = GetAboutModuleName(aURI);
nsAutoCString name = GetAboutModuleName(aURI);
for (int i = 0; i < kRedirTotal; i++) {
if (name.Equals(kRedirMap[i].id)) {

View File

@ -55,7 +55,7 @@ nsFeedSniffer::ConvertEncodedData(nsIRequest* request,
if (!httpChannel)
return NS_ERROR_NO_INTERFACE;
nsCAutoString contentEncoding;
nsAutoCString contentEncoding;
httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("Content-Encoding"),
contentEncoding);
if (!contentEncoding.IsEmpty()) {
@ -205,7 +205,7 @@ nsFeedSniffer::GetMIMETypeFromContent(nsIRequest* request,
return NS_ERROR_NO_INTERFACE;
// Check that this is a GET request, since you can't subscribe to a POST...
nsCAutoString method;
nsAutoCString method;
channel->GetRequestMethod(method);
if (!method.Equals("GET")) {
sniffedType.Truncate();
@ -222,7 +222,7 @@ nsFeedSniffer::GetMIMETypeFromContent(nsIRequest* request,
nsCOMPtr<nsIURI> originalURI;
channel->GetOriginalURI(getter_AddRefs(originalURI));
nsCAutoString scheme;
nsAutoCString scheme;
originalURI->GetScheme(scheme);
if (scheme.EqualsLiteral("view-source")) {
sniffedType.Truncate();
@ -233,7 +233,7 @@ nsFeedSniffer::GetMIMETypeFromContent(nsIRequest* request,
// something specific that we think is a reliable indication of a feed, don't
// bother sniffing since we assume the site maintainer knows what they're
// doing.
nsCAutoString contentType;
nsAutoCString contentType;
channel->GetContentType(contentType);
bool noSniff = contentType.EqualsLiteral(TYPE_RSS) ||
contentType.EqualsLiteral(TYPE_ATOM);
@ -242,7 +242,7 @@ nsFeedSniffer::GetMIMETypeFromContent(nsIRequest* request,
// the feed: protocol. This is also a reliable indication.
// The value of the header doesn't matter.
if (!noSniff) {
nsCAutoString sniffHeader;
nsAutoCString sniffHeader;
nsresult foundHeader =
channel->GetRequestHeader(NS_LITERAL_CSTRING("X-Moz-Is-Feed"),
sniffHeader);

View File

@ -20,6 +20,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "AddonManager",
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
"resource://gre/modules/NetUtil.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "UserAgentOverrides",
"resource://gre/modules/UserAgentOverrides.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
"resource://gre/modules/PlacesUtils.jsm");
@ -311,6 +314,7 @@ BrowserGlue.prototype = {
os.removeObserver(this, "places-database-locked");
if (this._isPlacesShutdownObserver)
os.removeObserver(this, "places-shutdown");
UserAgentOverrides.uninit();
webappsUI.uninit();
SignInToWebsiteUX.uninit();
},
@ -337,14 +341,11 @@ BrowserGlue.prototype = {
// handle any UI migration
this._migrateUI();
// Initialize webapps UI
UserAgentOverrides.init();
webappsUI.init();
PageThumbs.init();
NewTabUtils.init();
SignInToWebsiteUX.init();
PdfJs.init();
Services.obs.notifyObservers(null, "browser-ui-startup-complete", "");

View File

@ -131,8 +131,8 @@
</columns>
<rows>
<row align="center">
<label value="&syncComputerName.label;"
accesskey="&syncComputerName.accesskey;"
<label value="&syncDeviceName.label;"
accesskey="&syncDeviceName.accesskey;"
control="syncComputerName"/>
<textbox id="syncComputerName"
onchange="gSyncUtils.changeName(this)"/>

View File

@ -135,8 +135,8 @@
</columns>
<rows>
<row align="center">
<label value="&syncComputerName.label;"
accesskey="&syncComputerName.accesskey;"
<label value="&syncDeviceName.label;"
accesskey="&syncDeviceName.accesskey;"
control="syncComputerName"/>
<textbox id="syncComputerName"
onchange="gSyncUtils.changeName(this)"/>

View File

@ -3035,7 +3035,7 @@ let SessionStoreInternal = {
},
/**
* Restory history for a window
* Restore history for a window
* @param aWindow
* Window reference
* @param aTabs
@ -3865,16 +3865,17 @@ let SessionStoreInternal = {
aState.windows.every(function (win)
win.tabs.every(function (tab) tab.pinned));
let hasFirstArgument = aWindow.arguments && aWindow.arguments[0];
if (!pinnedOnly) {
let defaultArgs = Cc["@mozilla.org/browser/clh;1"].
getService(Ci.nsIBrowserHandler).defaultArgs;
if (aWindow.arguments &&
aWindow.arguments[0] &&
aWindow.arguments[0] == defaultArgs)
aWindow.arguments[0] = null;
hasFirstArgument = false;
}
return !aWindow.arguments || !aWindow.arguments[0];
return !hasFirstArgument;
},
/**

View File

@ -179,7 +179,7 @@ nsGNOMEShellService::CheckHandlerMatchesAppName(const nsACString &handler) const
{
gint argc;
gchar **argv;
nsCAutoString command(handler);
nsAutoCString command(handler);
// The string will be something of the form: [/path/to/]browser "%s"
// We want to remove all of the parameters and get just the binary name.
@ -207,7 +207,7 @@ nsGNOMEShellService::IsDefaultBrowser(bool aStartupCheck,
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
bool enabled;
nsCAutoString handler;
nsAutoCString handler;
nsCOMPtr<nsIGIOMimeApp> gioApp;
for (unsigned int i = 0; i < ArrayLength(appProtocols); ++i) {
@ -254,7 +254,7 @@ nsGNOMEShellService::SetDefaultBrowser(bool aClaimAllTypes,
nsCOMPtr<nsIGConfService> gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
if (gconf) {
nsCAutoString appKeyValue;
nsAutoCString appKeyValue;
if (mAppIsInPath) {
// mAppPath is in the users path, so use only the basename as the launcher
gchar *tmp = g_path_get_basename(mAppPath.get());
@ -406,7 +406,7 @@ nsGNOMEShellService::SetDesktopBackground(nsIDOMElement* aElement,
if (!container) return rv;
// Set desktop wallpaper filling style
nsCAutoString options;
nsAutoCString options;
if (aPosition == BACKGROUND_TILE)
options.Assign("wallpaper");
else if (aPosition == BACKGROUND_STRETCH)
@ -419,7 +419,7 @@ nsGNOMEShellService::SetDesktopBackground(nsIDOMElement* aElement,
options.Assign("centered");
// Write the background file to the home directory.
nsCAutoString filePath(PR_GetEnv("HOME"));
nsAutoCString filePath(PR_GetEnv("HOME"));
// get the product brand name from localized strings
nsString brandName;
@ -499,7 +499,7 @@ nsGNOMEShellService::GetDesktopBackgroundColor(uint32_t *aColor)
nsCOMPtr<nsIGSettingsService> gsettings =
do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
nsCOMPtr<nsIGSettingsCollection> background_settings;
nsCAutoString background;
nsAutoCString background;
if (gsettings) {
gsettings->GetCollectionForSchema(
@ -551,7 +551,7 @@ NS_IMETHODIMP
nsGNOMEShellService::SetDesktopBackgroundColor(uint32_t aColor)
{
NS_ASSERTION(aColor <= 0xffffff, "aColor has extra bits");
nsCAutoString colorString;
nsAutoCString colorString;
ColorToCString(aColor, colorString);
nsCOMPtr<nsIGSettingsService> gsettings =
@ -579,7 +579,7 @@ nsGNOMEShellService::SetDesktopBackgroundColor(uint32_t aColor)
NS_IMETHODIMP
nsGNOMEShellService::OpenApplication(int32_t aApplication)
{
nsCAutoString scheme;
nsAutoCString scheme;
if (aApplication == APPLICATION_MAIL)
scheme.Assign("mailto");
else if (aApplication == APPLICATION_NEWS)
@ -600,7 +600,7 @@ nsGNOMEShellService::OpenApplication(int32_t aApplication)
return NS_ERROR_FAILURE;
bool enabled;
nsCAutoString appCommand;
nsAutoCString appCommand;
gconf->GetAppForProtocol(scheme, &enabled, appCommand);
if (!enabled)

View File

@ -160,7 +160,7 @@ nsMacShellService::SetDesktopBackground(nsIDOMElement* aElement,
return NS_ERROR_NOT_IMPLEMENTED;
}
nsCAutoString fileName;
nsAutoCString fileName;
imageURL->GetFileName(fileName);
nsCOMPtr<nsIProperties> fileLocator
(do_GetService("@mozilla.org/file/directory_service;1", &rv));
@ -247,7 +247,7 @@ nsMacShellService::OnStateChange(nsIWebProgress* aWebProgress,
if (!exists)
return NS_OK;
nsCAutoString nativePath;
nsAutoCString nativePath;
mBackgroundFile->GetNativePath(nativePath);
AEDesc tAEDesc = { typeNull, nil };

View File

@ -1,6 +1,6 @@
[
{
"clang_version": "r161022"
"clang_version": "r161152"
},
{
"size": 47,
@ -9,8 +9,8 @@
"filename": "setup.sh"
},
{
"size": 65670083,
"digest": "681a8f14d9e44e4220ac69f8c545406a40962472ee8fb342b619e04e1a316ddc8802f29f39765cbc06603cc9d4774ac5c2e2d320bf3ec6bc0c7502a5abdd080e",
"size": 69025199,
"digest": "924354fcaa711a3aa5bdd17bcaa395e49025fa942cef5a4d710200d5c529c7a96778ad78d80db19c022695baafaeed36c4da047f21c2d02753adc2299d81c8eb",
"algorithm": "sha512",
"filename": "clang.tar.bz2"
}

View File

@ -1,6 +1,6 @@
[
{
"clang_version": "r161022"
"clang_version": "r161152"
},
{
"size": 47,
@ -9,8 +9,8 @@
"filename": "setup.sh"
},
{
"size": 61189616,
"digest": "ec5d4787a11f5feff8ecfa2ec91f313cc7a6968ef419c74c25200ed7df92362d566142d405269ee2f0a14d291a834d39cd5dca826d819d6599426470e80bd2c8",
"size": 64382403,
"digest": "c0f02f07d6a9bd1b8fb6e86db04866393a2b973c07ca6c5a99f8f5794dd3438be687547329cec800a046a4f4ff4cc34450bd0320b152715d6dd51c5713eb6af1",
"algorithm": "sha512",
"filename": "clang.tar.bz2"
}

View File

@ -1,6 +1,6 @@
[
{
"clang_version": "r161022"
"clang_version": "r161152"
},
{
"size": 47,
@ -9,8 +9,8 @@
"filename": "setup.sh"
},
{
"size": 54405078,
"digest": "940f02ee8e4a760f52d6fe9cd1dc8dec01abc61b8086d46b4aa7d7292cf7c353a2cec1c9687491ade756ba2654b9e93986123155cb931bd18431fbbfdef671a9",
"size": 57249339,
"digest": "708bf18f40edd46517c6368b6b5ad5cd05904d3c60614cdb483248e035cdca0fc905f0e72e90d94de9dccaa18270aadfe07987ab95adcc0c6bb4ce51aa292623",
"algorithm": "sha512",
"filename": "clang.tar.bz2"
}

View File

@ -1,6 +1,6 @@
[
{
"clang_version": "r161022"
"clang_version": "r161152"
},
{
"size": 47,
@ -9,8 +9,8 @@
"filename": "setup.sh"
},
{
"size": 54405078,
"digest": "940f02ee8e4a760f52d6fe9cd1dc8dec01abc61b8086d46b4aa7d7292cf7c353a2cec1c9687491ade756ba2654b9e93986123155cb931bd18431fbbfdef671a9",
"size": 57249339,
"digest": "708bf18f40edd46517c6368b6b5ad5cd05904d3c60614cdb483248e035cdca0fc905f0e72e90d94de9dccaa18270aadfe07987ab95adcc0c6bb4ce51aa292623",
"algorithm": "sha512",
"filename": "clang.tar.bz2"
}

View File

@ -25,8 +25,7 @@ gcli.addCommand({
{
name: 'url',
type: 'string',
description: gcli.lookup('jsbUrlDesc'),
manual: 'The URL of the JS to prettify'
description: gcli.lookup('jsbUrlDesc')
},
{
name: 'indentSize',

View File

@ -9340,11 +9340,27 @@ Inputter.prototype.getDimensions = function() {
return undefined;
}
var fixedLoc = {};
var currentElement = this.element.parentNode;
while (currentElement && currentElement.nodeName !== '#document') {
var style = this.document.defaultView.getComputedStyle(currentElement, '');
if (style) {
var position = style.getPropertyValue('position');
if (position === 'absolute' || position === 'fixed') {
var bounds = currentElement.getBoundingClientRect();
fixedLoc.top = bounds.top;
fixedLoc.left = bounds.left;
break;
}
}
currentElement = currentElement.parentNode;
}
var rect = this.element.getBoundingClientRect();
return {
top: rect.top + 1,
top: rect.top - (fixedLoc.top || 0) + 1,
height: rect.bottom - rect.top - 1,
left: rect.left + 2,
left: rect.left - (fixedLoc.left || 0) + 2,
width: rect.right - rect.left
};
};

View File

@ -59,7 +59,7 @@ function testLocationChange()
ok(true, "tabNavigated event was fired.");
info("Still attached to the tab.");
gDebugger.addEventListener("Debugger:AfterScriptsAdded", function _onEvent(aEvent) {
gDebugger.addEventListener("Debugger:AfterNewScript", function _onEvent(aEvent) {
gDebugger.removeEventListener(aEvent.type, _onEvent);
isnot(gDebugger.DebuggerView.Scripts.selected, null,

View File

@ -95,7 +95,7 @@ function test()
else if (step === 2) {
testCurrentScript("-01.js", step);
expectedScript = "-02.js";
gView.Scripts.selectScript(gView.Scripts.scriptLocations[1]);
switchScript(1);
}
else if (step === 3) {
testCurrentScript("-02.js", step);
@ -105,7 +105,7 @@ function test()
else if (step === 4) {
testCurrentScript("-02.js", step);
expectedScript = "-01.js";
gView.Scripts.selectScript(gView.Scripts.scriptLocations[0]);
switchScript(0);
}
else if (step === 5) {
testCurrentScript("-01.js", step);
@ -125,7 +125,7 @@ function test()
else if (step === 8) {
testCurrentScript("-01.js", step);
expectedScript = "-02.js";
gView.Scripts.selectScript(gView.Scripts.scriptLocations[1]);
switchScript(1);
}
else if (step === 9) {
testCurrentScript("-02.js", step);
@ -145,7 +145,7 @@ function test()
else if (step === 12) {
testCurrentScript("-02.js", step);
expectedScript = "-01.js";
gView.Scripts.selectScript(gView.Scripts.scriptLocations[0]);
switchScript(0);
}
else if (step === 13) {
testCurrentScript("-01.js", step);
@ -166,6 +166,24 @@ function test()
"The shown script is not the the correct one. (" + step + ")");
}
function switchScript(index)
{
let scriptsView = gView.Scripts;
let scriptLocations = scriptsView.scriptLocations;
info("Available scripts: " + scriptLocations);
if (scriptLocations.length === 2) {
// We got all the scripts, it's safe to switch.
scriptsView.selectScript(scriptLocations[index]);
return;
}
window.addEventListener("Debugger:AfterNewScript", function _onEvent(aEvent) {
window.removeEventListener(aEvent.type, _onEvent);
switchScript(index);
});
}
function reloadPage()
{
gDebuggee.location.reload();

View File

@ -148,18 +148,18 @@ Highlighter.prototype = {
this.highlighterContainer.appendChild(outlineContainer);
this.highlighterContainer.appendChild(controlsBox);
stack.appendChild(this.highlighterContainer);
this.showOutline();
// Insert the highlighter right after the browser
stack.insertBefore(this.highlighterContainer, stack.childNodes[1]);
this.buildInfobar(controlsBox);
this.transitionDisabler = null;
this.pageEventsMuter = null;
this.computeZoomFactor();
this.unlock();
this.hide();
this.hidden = true;
this.show();
},
/**
@ -220,6 +220,10 @@ Highlighter.prototype = {
this.invalidateSize(!!aScroll);
if (this._highlighting) {
this.showOutline();
}
if (oldNode !== this.node) {
this.emitEvent("nodeselected");
}

View File

@ -896,6 +896,10 @@ InspectorUI.prototype = {
this.inspectCommand.setAttribute("checked", "false");
this.inspecting = false;
if (this.closing)
return;
if (this.highlighter.getNode()) {
this.select(this.highlighter.getNode(), true, !aPreventScroll);
} else {

View File

@ -93,7 +93,7 @@ function ResponsiveUI(aWindow, aTab)
this.browser = aTab.linkedBrowser;
this.chromeDoc = aWindow.document;
this.container = aWindow.gBrowser.getBrowserContainer(this.browser);
this.stack = this.container.querySelector("[anonid=browserStack]");
this.stack = this.container.querySelector(".browserStack");
// Try to load presets from prefs
if (Services.prefs.prefHasUserValue("devtools.responsiveUI.presets")) {
@ -282,12 +282,12 @@ ResponsiveUI.prototype = {
/**
* Build the toolbar and the resizers.
*
* <vbox anonid="browserContainer"> From tabbrowser.xml
* <vbox class="browserContainer"> From tabbrowser.xml
* <toolbar class="devtools-toolbar devtools-responsiveui-toolbar">
* <menulist class="devtools-menulist"/> // presets
* <toolbarbutton tabindex="0" class="devtools-toolbarbutton" label="rotate"/> // rotate
* </toolbar>
* <stack anonid="browserStack"> From tabbrowser.xml
* <stack class="browserStack"> From tabbrowser.xml
* <browser/>
* <box class="devtools-responsiveui-resizehandle" bottom="0" right="0"/>
* <box class="devtools-responsiveui-resizebar" top="0" right="0"/>

View File

@ -24,6 +24,19 @@ XPCOMUtils.defineLazyModuleGetter(this, "gcli",
XPCOMUtils.defineLazyModuleGetter(this, "CmdCommands",
"resource:///modules/devtools/CmdCmd.jsm");
/**
* Due to a number of panel bugs we need a way to check if we are running on
* Linux. See the comments for TooltipPanel and OutputPanel for further details.
*
* When bug 780102 is fixed all isLinux checks can be removed and we can revert
* to using panels.
*/
XPCOMUtils.defineLazyGetter(this, "isLinux", function () {
let os = Components.classes["@mozilla.org/xre/app-info;1"]
.getService(Components.interfaces.nsIXULRuntime).OS;
return os == "Linux";
});
/**
* A component to manage the global developer toolbar, which contains a GCLI
* and buttons for various developer tools.
@ -539,6 +552,18 @@ function DT_resetErrorsCount(aTab)
/**
* Panel to handle command line output.
*
* There is a tooltip bug on Windows and OSX that prevents tooltips from being
* positioned properly (bug 786975). There is a Gnome panel bug on Linux that
* causes ugly focus issues (https://bugzilla.gnome.org/show_bug.cgi?id=621848).
* We now use a tooltip on Linux and a panel on OSX & Windows.
*
* If a panel has no content and no height it is not shown when openPopup is
* called on Windows and OSX (bug 692348) ... this prevents the panel from
* appearing the first time it is shown. Setting the panel's height to 1px
* before calling openPopup works around this issue as we resize it ourselves
* anyway.
*
* @param aChromeDoc document from which we can pull the parts we need.
* @param aInput the input element that should get focus.
* @param aLoadCallback called when the panel is loaded properly.
@ -551,7 +576,7 @@ function OutputPanel(aChromeDoc, aInput, aLoadCallback)
this._loadCallback = aLoadCallback;
/*
<tooltip id="gcli-output"
<tooltip|panel id="gcli-output"
noautofocus="true"
noautohide="true"
class="gcli-panel">
@ -559,15 +584,31 @@ function OutputPanel(aChromeDoc, aInput, aLoadCallback)
id="gcli-output-frame"
src="chrome://browser/content/devtools/commandlineoutput.xhtml"
flex="1"/>
</tooltip>
</tooltip|panel>
*/
// TODO: Switch back from tooltip to panel when metacity focus issue is fixed:
// https://bugzilla.mozilla.org/show_bug.cgi?id=780102
this._panel = aChromeDoc.createElement("tooltip");
this._panel = aChromeDoc.createElement(isLinux ? "tooltip" : "panel");
this._panel.id = "gcli-output";
this._panel.classList.add("gcli-panel");
if (isLinux) {
this.canHide = false;
this._onpopuphiding = this._onpopuphiding.bind(this);
this._panel.addEventListener("popuphiding", this._onpopuphiding, true);
} else {
this._panel.setAttribute("noautofocus", "true");
this._panel.setAttribute("noautohide", "true");
// Bug 692348: On Windows and OSX if a panel has no content and no height
// openPopup fails to display it. Setting the height to 1px alows the panel
// to be displayed before has content or a real height i.e. the first time
// it is displayed.
this._panel.setAttribute("height", "1px");
}
this._toolbar.parentElement.insertBefore(this._panel, this._toolbar);
this._frame = aChromeDoc.createElementNS(NS_XHTML, "iframe");
@ -582,10 +623,6 @@ function OutputPanel(aChromeDoc, aInput, aLoadCallback)
this._frame.addEventListener("load", this._onload, true);
this.loaded = false;
this.canHide = false;
this._onpopuphiding = this._onpopuphiding.bind(this);
this._panel.addEventListener("popuphiding", this._onpopuphiding, true);
}
/**
@ -620,7 +657,7 @@ OutputPanel.prototype._onpopuphiding = function OP_onpopuphiding(aEvent)
{
// TODO: When we switch back from tooltip to panel we can remove this hack:
// https://bugzilla.mozilla.org/show_bug.cgi?id=780102
if (!this.canHide) {
if (isLinux && !this.canHide) {
aEvent.preventDefault();
}
};
@ -637,7 +674,9 @@ OutputPanel.prototype.show = function OP_show()
this._resize();
}.bind(this), 0);
this.canHide = false;
if (isLinux) {
this.canHide = false;
}
this._panel.openPopup(this._input, "before_start", 0, 0, false, false, null);
this._resize();
@ -698,7 +737,9 @@ OutputPanel.prototype.update = function OP_update()
*/
OutputPanel.prototype.remove = function OP_remove()
{
this.canHide = true;
if (isLinux) {
this.canHide = true;
}
if (this._panel) {
this._panel.hidePopup();
@ -743,7 +784,9 @@ OutputPanel.prototype._visibilityChanged = function OP_visibilityChanged(aEvent)
if (aEvent.outputVisible === true) {
// this.show is called by _outputChanged
} else {
this.canHide = true;
if (isLinux) {
this.canHide = true;
}
this._panel.hidePopup();
}
};
@ -751,6 +794,18 @@ OutputPanel.prototype._visibilityChanged = function OP_visibilityChanged(aEvent)
/**
* Panel to handle tooltips.
*
* There is a tooltip bug on Windows and OSX that prevents tooltips from being
* positioned properly (bug 786975). There is a Gnome panel bug on Linux that
* causes ugly focus issues (https://bugzilla.gnome.org/show_bug.cgi?id=621848).
* We now use a tooltip on Linux and a panel on OSX & Windows.
*
* If a panel has no content and no height it is not shown when openPopup is
* called on Windows and OSX (bug 692348) ... this prevents the panel from
* appearing the first time it is shown. Setting the panel's height to 1px
* before calling openPopup works around this issue as we resize it ourselves
* anyway.
*
* @param aChromeDoc document from which we can pull the parts we need.
* @param aInput the input element that should get focus.
* @param aLoadCallback called when the panel is loaded properly.
@ -764,7 +819,7 @@ function TooltipPanel(aChromeDoc, aInput, aLoadCallback)
this._onload = this._onload.bind(this);
this._loadCallback = aLoadCallback;
/*
<tooltip id="gcli-tooltip"
<tooltip|panel id="gcli-tooltip"
type="arrow"
noautofocus="true"
noautohide="true"
@ -773,15 +828,31 @@ function TooltipPanel(aChromeDoc, aInput, aLoadCallback)
id="gcli-tooltip-frame"
src="chrome://browser/content/devtools/commandlinetooltip.xhtml"
flex="1"/>
</tooltip>
</tooltip|panel>
*/
// TODO: Switch back from tooltip to panel when metacity focus issue is fixed:
// https://bugzilla.mozilla.org/show_bug.cgi?id=780102
this._panel = aChromeDoc.createElement("tooltip");
this._panel = aChromeDoc.createElement(isLinux ? "tooltip" : "panel");
this._panel.id = "gcli-tooltip";
this._panel.classList.add("gcli-panel");
if (isLinux) {
this.canHide = false;
this._onpopuphiding = this._onpopuphiding.bind(this);
this._panel.addEventListener("popuphiding", this._onpopuphiding, true);
} else {
this._panel.setAttribute("noautofocus", "true");
this._panel.setAttribute("noautohide", "true");
// Bug 692348: On Windows and OSX if a panel has no content and no height
// openPopup fails to display it. Setting the height to 1px alows the panel
// to be displayed before has content or a real height i.e. the first time
// it is displayed.
this._panel.setAttribute("height", "1px");
}
this._toolbar.parentElement.insertBefore(this._panel, this._toolbar);
this._frame = aChromeDoc.createElementNS(NS_XHTML, "iframe");
@ -793,10 +864,6 @@ function TooltipPanel(aChromeDoc, aInput, aLoadCallback)
this._frame.addEventListener("load", this._onload, true);
this.loaded = false;
this.canHide = false;
this._onpopuphiding = this._onpopuphiding.bind(this);
this._panel.addEventListener("popuphiding", this._onpopuphiding, true);
}
/**
@ -829,7 +896,7 @@ TooltipPanel.prototype._onpopuphiding = function TP_onpopuphiding(aEvent)
{
// TODO: When we switch back from tooltip to panel we can remove this hack:
// https://bugzilla.mozilla.org/show_bug.cgi?id=780102
if (!this.canHide) {
if (isLinux && !this.canHide) {
aEvent.preventDefault();
}
};
@ -851,7 +918,9 @@ TooltipPanel.prototype.show = function TP_show(aDimensions)
this._resize();
}.bind(this), 0);
this.canHide = false;
if (isLinux) {
this.canHide = false;
}
this._resize();
this._panel.openPopup(this._input, "before_start", aDimensions.start * 10, 0, false, false, null);
@ -896,7 +965,9 @@ TooltipPanel.prototype._resize = function TP_resize()
*/
TooltipPanel.prototype.remove = function TP_remove()
{
this.canHide = true;
if (isLinux) {
this.canHide = true;
}
this._panel.hidePopup();
};
@ -934,7 +1005,9 @@ TooltipPanel.prototype._visibilityChanged = function TP_visibilityChanged(aEvent
if (aEvent.tooltipVisible === true) {
this.show(aEvent.dimensions);
} else {
this.canHide = true;
if (isLinux) {
this.canHide = true;
}
this._panel.hidePopup();
}
};

View File

@ -562,7 +562,7 @@ CssHtmlTree.prototype = {
// Tidy up block headings by moving CSS property names and their values onto
// the same line and inserting a colon between them.
text = text.replace(/(.+)\r?\n\s+/g, "$1: ");
text = text.replace(/\t(.+)\t\t(.+)/g, "$1: $2");
// Remove any MDN link titles
text = text.replace(CssHtmlTree.HELP_LINK_TITLE, "");
@ -866,9 +866,9 @@ PropertyView.prototype = {
this.element = doc.createElementNS(HTML_NS, "tr");
this.element.setAttribute("class", this.propertyHeaderClassName);
this.propertyHeader = doc.createElementNS(HTML_NS, "td");
this.element.appendChild(this.propertyHeader);
this.propertyHeader.setAttribute("class", "property-header");
this.expanderContainer = doc.createElementNS(HTML_NS, "td");
this.element.appendChild(this.expanderContainer);
this.expanderContainer.setAttribute("class", "expander-container");
this.matchedExpander = doc.createElementNS(HTML_NS, "div");
this.matchedExpander.setAttribute("class", "match expander");
@ -885,10 +885,10 @@ PropertyView.prototype = {
this.matchedExpanderClick(aEvent);
}
}.bind(this), false);
this.propertyHeader.appendChild(this.matchedExpander);
this.expanderContainer.appendChild(this.matchedExpander);
this.nameNode = doc.createElementNS(HTML_NS, "div");
this.propertyHeader.appendChild(this.nameNode);
this.nameNode = doc.createElementNS(HTML_NS, "td");
this.element.appendChild(this.nameNode);
this.nameNode.setAttribute("class", "property-name");
this.nameNode.textContent = this.name;
this.nameNode.addEventListener("click", function(aEvent) {

View File

@ -112,10 +112,10 @@ function checkCopySelection()
let range = document.createRange();
range.setStart(props[0], 0);
range.setEnd(props[3], 3);
range.setEnd(props[3], 4);
contentWindow.getSelection().addRange(range);
info("Checking that cssHtmlTree.siBoundCopyPropertyValue() " +
info("Checking that cssHtmlTree.siBoundCopy() " +
" returns the correct clipboard value");
let expectedPattern = "color: rgb\\(255, 255, 0\\)[\\r\\n]+" +

View File

@ -61,14 +61,11 @@ const UNHIGHLIGHTING = Tilt.NOTIFICATIONS.UNHIGHLIGHTING;
const NODE_REMOVED = Tilt.NOTIFICATIONS.NODE_REMOVED;
const TILT_ENABLED = Services.prefs.getBoolPref("devtools.tilt.enabled");
const INSP_ENABLED = Services.prefs.getBoolPref("devtools.inspector.enabled");
function isTiltEnabled() {
let enabled = TILT_ENABLED && INSP_ENABLED;
info("Apparently, Tilt is" + (enabled ? "" : " not") + " enabled.");
return enabled;
info("Apparently, Tilt is" + (TILT_ENABLED ? "" : " not") + " enabled.");
return TILT_ENABLED;
}
function isWebGLSupported() {

View File

@ -37,17 +37,11 @@ function test()
{
addTab(TEST_URI);
let initialLoad = true;
browser.addEventListener("load", function onLoad() {
if (initialLoad) {
openConsole(null, function() {
HUDService.lastFinishedRequestCallback = performTest;
content.location.reload();
});
initialLoad = false;
} else {
browser.removeEventListener("load", onLoad, true);
}
browser.removeEventListener("load", onLoad, true);
openConsole(null, function() {
HUDService.lastFinishedRequestCallback = performTest;
content.location.reload();
});
}, true);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

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