author | David Anderson <danderson@mozilla.com> |
Wed, 05 Sep 2012 16:18:11 -0700 | |
changeset 106821 | ae68e6c539a21a7a2b65e33b1e9d7fd3401812a1 |
parent 106820 | 0b296feed34cac4db997aed188d02c23497d57da (current diff) |
parent 104340 | 627f6297acea92a8d3bab0989cb3242df02b92a6 (diff) |
child 106822 | 0bf5b7a628bb5af30773f302f8868b78357ee114 |
push id | 14706 |
push user | eakhgari@mozilla.com |
push date | Tue, 11 Sep 2012 20:39:52 +0000 |
treeherder | mozilla-inbound@d50bf1edaabe [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
milestone | 18.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/.gitignore +++ b/.gitignore @@ -40,11 +40,8 @@ js/src/tests/results-*.txt # Java HTML5 parser classes parser/html/java/htmlparser/ parser/html/java/javaparser/ # Ignore the files and directory that Eclipse IDE creates .project .cproject .settings/ - -# Python stuff installed at build-time -*.egg-info/
--- a/.hgignore +++ b/.hgignore @@ -40,11 +40,8 @@ # SVN directories \.svn/ # Ignore the files and directory that Eclipse IDE creates \.project$ \.cproject$ \.settings/ - -# Python stuff installed at build-time -\.egg-info/
--- a/accessible/src/atk/AccessibleWrap.cpp +++ b/accessible/src/atk/AccessibleWrap.cpp @@ -719,17 +719,17 @@ ConvertToAtkAttributeSet(nsIPersistentPr while (NS_SUCCEEDED(propEnum->HasMoreElements(&hasMore)) && hasMore) { nsCOMPtr<nsISupports> sup; rv = propEnum->GetNext(getter_AddRefs(sup)); NS_ENSURE_SUCCESS(rv, objAttributeSet); nsCOMPtr<nsIPropertyElement> propElem(do_QueryInterface(sup)); NS_ENSURE_TRUE(propElem, objAttributeSet); - nsCAutoString name; + nsAutoCString name; rv = propElem->GetKey(name); NS_ENSURE_SUCCESS(rv, objAttributeSet); nsAutoString value; rv = propElem->GetValue(value); NS_ENSURE_SUCCESS(rv, objAttributeSet); AtkAttribute *objAttr = (AtkAttribute *)g_malloc(sizeof(AtkAttribute));
--- a/accessible/src/atk/ApplicationAccessibleWrap.cpp +++ b/accessible/src/atk/ApplicationAccessibleWrap.cpp @@ -781,34 +781,34 @@ LoadGtkModule(GnomeAccessibilityModule& NS_ENSURE_ARG(aModule.libName); if (!(aModule.lib = PR_LoadLibrary(aModule.libName))) { MAI_LOG_DEBUG(("Fail to load lib: %s in default path\n", aModule.libName)); //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 libPath.Append(":/usr/lib"); #endif MAI_LOG_DEBUG(("Current Lib path=%s\n", libPath.get())); PR_FreeLibraryName(curLibPath); int16_t loc1 = 0, loc2 = 0; int16_t subLen = 0; while (loc2 >= 0) { loc2 = libPath.FindChar(':', loc1); if (loc2 < 0) 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()); if (aModule.lib) { MAI_LOG_DEBUG(("Ok, load %s from %s\n", aModule.libName, sub.get())); break; } loc1 = loc2+1;
--- a/accessible/src/atk/nsMaiHyperlink.cpp +++ b/accessible/src/atk/nsMaiHyperlink.cpp @@ -181,17 +181,17 @@ getUriCB(AtkHyperlink *aLink, gint aLink { Accessible* hyperlink = get_accessible_hyperlink(aLink); NS_ENSURE_TRUE(hyperlink, nullptr); nsCOMPtr<nsIURI> uri = hyperlink->AnchorURIAt(aLinkIndex); if (!uri) return nullptr; - nsCAutoString cautoStr; + nsAutoCString cautoStr; nsresult rv = uri->GetSpec(cautoStr); NS_ENSURE_SUCCESS(rv, nullptr); return g_strdup(cautoStr.get()); } AtkObject * getObjectCB(AtkHyperlink *aLink, gint aLinkIndex)
--- a/accessible/src/base/AccCollector.h +++ b/accessible/src/base/AccCollector.h @@ -1,16 +1,16 @@ /* 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/. */ #ifndef mozilla_a11y_AccCollector_h__ #define mozilla_a11y_AccCollector_h__ -#include "AccFilters.h" +#include "Filters.h" #include "nsTArray.h" class Accessible; namespace mozilla { namespace a11y {
--- a/accessible/src/base/AccIterator.h +++ b/accessible/src/base/AccIterator.h @@ -3,17 +3,17 @@ /* 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/. */ #ifndef mozilla_a11y_AccIterator_h__ #define mozilla_a11y_AccIterator_h__ #include "DocAccessible.h" -#include "AccFilters.h" +#include "Filters.h" #include "nsAccessibilityService.h" namespace mozilla { namespace a11y { /** * AccIterable is a basic interface for iterators over accessibles. */
rename from accessible/src/base/AccFilters.cpp rename to accessible/src/base/Filters.cpp --- a/accessible/src/base/AccFilters.cpp +++ b/accessible/src/base/Filters.cpp @@ -1,13 +1,13 @@ /* 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/. */ -#include "AccFilters.h" +#include "Filters.h" #include "Accessible-inl.h" #include "nsAccUtils.h" #include "Role.h" #include "States.h" using namespace mozilla::a11y; using namespace mozilla::a11y::filters;
--- a/accessible/src/base/FocusManager.h +++ b/accessible/src/base/FocusManager.h @@ -151,27 +151,27 @@ private: uint32_t msecs = PR_IntervalToMilliseconds(time) % 1000; \ printf("Time: %2d:%2d.%3d\n", mins, secs, msecs); \ } #define A11YDEBUG_FOCUS_LOG_DOMNODE(aNode) \ 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); \ printf("element %s@id='%s': %p", tag.get(), id.get(), (void*)aNode); \ } 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()); \ } \ } #define A11YDEBUG_FOCUS_LOG_ACCESSIBLE(aAccessible) \ printf("accessible: %p; ", (void*)aAccessible); \ if (aAccessible) { \
--- a/accessible/src/base/Logging.cpp +++ b/accessible/src/base/Logging.cpp @@ -75,27 +75,27 @@ EnableLogging(const char* aModulesStr) token++; // skip ',' char } } static void LogDocURI(nsIDocument* aDocumentNode) { nsIURI* uri = aDocumentNode->GetDocumentURI(); - nsCAutoString spec; + nsAutoCString spec; uri->GetSpec(spec); printf("uri: %s", spec.get()); } static void LogDocShellState(nsIDocument* aDocumentNode) { printf("docshell busy: "); - nsCAutoString docShellBusy; + nsAutoCString docShellBusy; nsCOMPtr<nsISupports> container = aDocumentNode->GetContainer(); if (container) { nsCOMPtr<nsIDocShell> docShell = do_QueryInterface(container); uint32_t busyFlags = nsIDocShell::BUSY_FLAGS_NONE; docShell->GetBusyFlags(&busyFlags); if (busyFlags == nsIDocShell::BUSY_FLAGS_NONE) printf("'none'"); if (busyFlags & nsIDocShell::BUSY_FLAGS_BUSY) @@ -291,17 +291,17 @@ LogShellLoadType(nsIDocShell* aDocShell) printf("unknown"); } } 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; aRequest->GetLoadFlags(&loadFlags); printf(" request load flags: %x; ", loadFlags); if (loadFlags & nsIChannel::LOAD_DOCUMENT_URI) printf("document uri; "); if (loadFlags & nsIChannel::LOAD_RETARGETED_DOCUMENT_URI) @@ -402,26 +402,26 @@ logging::DocLoad(const char* aMsg, nsIDo LogDocInfo(aDocumentNode, document); MsgEnd(); } void logging::DocLoadEventFired(AccEvent* aEvent) { - nsCAutoString strEventType; + nsAutoCString strEventType; GetDocLoadEventType(aEvent, strEventType); if (!strEventType.IsEmpty()) printf(" fire: %s\n", strEventType.get()); } void logging::DocLoadEventHandled(AccEvent* aEvent) { - nsCAutoString strEventType; + nsAutoCString strEventType; GetDocLoadEventType(aEvent, strEventType); if (strEventType.IsEmpty()) return; MsgBegin(sDocEventTitle, "handled '%s' event", strEventType.get()); nsINode* node = aEvent->GetNode(); if (node->IsNodeOfType(nsINode::eDOCUMENT)) { @@ -569,21 +569,21 @@ logging::Node(const char* aDescr, nsINod if (!aNode->IsElement()) { printf("%s: %p, not accessible node type, idx in parent: %d\n", aDescr, static_cast<void*>(aNode), idxInParent); return; } 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); printf("%s: %p, %s@id='%s', idx in parent: %d\n", aDescr, static_cast<void*>(elm), tag.get(), id.get(), idxInParent); } void
--- a/accessible/src/base/Makefile.in +++ b/accessible/src/base/Makefile.in @@ -14,17 +14,17 @@ LIBRARY_NAME = accessibility_base_s LIBXUL_LIBRARY = 1 CPPSRCS = \ AccCollector.cpp \ AccEvent.cpp \ AccGroupInfo.cpp \ AccIterator.cpp \ - AccFilters.cpp \ + Filters.cpp \ ARIAStateMap.cpp \ FocusManager.cpp \ NotificationController.cpp \ nsAccDocManager.cpp \ nsAccessNode.cpp \ nsARIAMap.cpp \ nsCoreUtils.cpp \ nsAccUtils.cpp \
--- a/accessible/src/base/nsAccDocManager.cpp +++ b/accessible/src/base/nsAccDocManager.cpp @@ -351,17 +351,17 @@ nsAccDocManager::CreateDocOrRootAccessib // Ignore temporary, hiding, resource documents and documents without // docshell. if (aDocument->IsInitialDocument() || !aDocument->IsVisible() || aDocument->IsResourceDoc() || !aDocument->IsActive()) return nullptr; // 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 // we get accessible document with wrong role. nsIContent *rootElm = nsCoreUtils::GetRoleContent(aDocument); if (!rootElm) return nullptr;
--- a/accessible/src/base/nsAccUtils.cpp +++ b/accessible/src/base/nsAccUtils.cpp @@ -35,17 +35,17 @@ nsAccUtils::GetAccAttr(nsIPersistentProp aAttributes->GetStringProperty(nsAtomCString(aAttrName), aAttrValue); } void nsAccUtils::SetAccAttr(nsIPersistentProperties *aAttributes, nsIAtom *aAttrName, const nsAString& aAttrValue) { nsAutoString oldValue; - nsCAutoString attrName; + nsAutoCString attrName; aAttributes->SetStringProperty(nsAtomCString(aAttrName), aAttrValue, oldValue); } void nsAccUtils::SetAccGroupAttrs(nsIPersistentProperties *aAttributes, int32_t aLevel, int32_t aSetSize, int32_t aPosInSet)
--- a/accessible/src/base/nsAccessNode.cpp +++ b/accessible/src/base/nsAccessNode.cpp @@ -150,22 +150,16 @@ nsAccessNode::GetNode() const } nsIDocument* nsAccessNode::GetDocumentNode() const { return mContent ? mContent->OwnerDoc() : nullptr; } -bool -nsAccessNode::IsPrimaryForNode() const -{ - return true; -} - void nsAccessNode::Language(nsAString& aLanguage) { aLanguage.Truncate(); if (!mDoc) return;
--- a/accessible/src/base/nsAccessNode.h +++ b/accessible/src/base/nsAccessNode.h @@ -92,25 +92,16 @@ public: } /** * Return the unique identifier of the accessible. */ 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. */ void Language(nsAString& aLocale); protected: void LastRelease(); nsCOMPtr<nsIContent> mContent;
--- a/accessible/src/base/nsCaretAccessible.cpp +++ b/accessible/src/base/nsCaretAccessible.cpp @@ -10,17 +10,16 @@ #include "nsAccUtils.h" #include "nsCoreUtils.h" #include "nsIAccessibleEvent.h" #include "RootAccessible.h" #include "nsCaret.h" #include "nsIDOMDocument.h" #include "nsIDOMHTMLAnchorElement.h" -#include "nsIDOMHTMLInputElement.h" #include "nsIDOMHTMLTextAreaElement.h" #include "nsIFrame.h" #include "nsIPresShell.h" #include "nsISelectionPrivate.h" #include "nsServiceManagerUtils.h" class nsIWidget;
--- a/accessible/src/base/nsCoreUtils.cpp +++ b/accessible/src/base/nsCoreUtils.cpp @@ -470,17 +470,17 @@ bool nsCoreUtils::IsErrorPage(nsIDocument *aDocument) { nsIURI *uri = aDocument->GetDocumentURI(); bool isAboutScheme = false; uri->SchemeIs("about", &isAboutScheme); if (!isAboutScheme) return false; - nsCAutoString path; + nsAutoCString path; uri->GetPath(path); NS_NAMED_LITERAL_CSTRING(neterror, "neterror"); NS_NAMED_LITERAL_CSTRING(certerror, "certerror"); return StringBeginsWith(path, neterror) || StringBeginsWith(path, certerror); }
--- a/accessible/src/generic/Accessible.h +++ b/accessible/src/generic/Accessible.h @@ -684,16 +684,25 @@ public: */ bool IsDefunct() const { return mFlags & eIsDefunct; } /** * Return true if the accessible is no longer in the document. */ 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: ////////////////////////////////////////////////////////////////////////////// // Initializing, cache and tree traverse methods /** * Cache accessible children. */ @@ -733,41 +742,42 @@ protected: { mFlags = (mFlags & ~kChildrenFlagsMask) | aFlag; } /** * Flags used to describe the state of this accessible. * @note keep these flags in sync with ChildrenFlags */ 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 }; /** * Flags describing the type of this accessible. * @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 }; ////////////////////////////////////////////////////////////////////////////// // Miscellaneous helpers /** * Return ARIA role (helper method). */
--- a/accessible/src/generic/ApplicationAccessible.cpp +++ b/accessible/src/generic/ApplicationAccessible.cpp @@ -21,17 +21,17 @@ #include "mozilla/Services.h" #include "nsIStringBundle.h" using namespace mozilla::a11y; ApplicationAccessible::ApplicationAccessible() : AccessibleWrap(nullptr, nullptr) { - mFlags |= eApplicationAccessible; + mFlags |= (eApplicationAccessible | eSharedNode); } //////////////////////////////////////////////////////////////////////////////// // nsISupports NS_IMPL_ISUPPORTS_INHERITED1(ApplicationAccessible, Accessible, nsIAccessibleApplication) @@ -213,33 +213,33 @@ ApplicationAccessible::DoAction(uint8_t NS_IMETHODIMP ApplicationAccessible::GetAppName(nsAString& aName) { aName.Truncate(); if (!mAppInfo) return NS_ERROR_FAILURE; - nsCAutoString cname; + nsAutoCString cname; nsresult rv = mAppInfo->GetName(cname); NS_ENSURE_SUCCESS(rv, rv); AppendUTF8toUTF16(cname, aName); return NS_OK; } NS_IMETHODIMP ApplicationAccessible::GetAppVersion(nsAString& aVersion) { aVersion.Truncate(); if (!mAppInfo) return NS_ERROR_FAILURE; - nsCAutoString cversion; + nsAutoCString cversion; nsresult rv = mAppInfo->GetVersion(cversion); NS_ENSURE_SUCCESS(rv, rv); AppendUTF8toUTF16(cversion, aVersion); return NS_OK; } NS_IMETHODIMP @@ -252,17 +252,17 @@ ApplicationAccessible::GetPlatformName(n NS_IMETHODIMP ApplicationAccessible::GetPlatformVersion(nsAString& aVersion) { aVersion.Truncate(); if (!mAppInfo) return NS_ERROR_FAILURE; - nsCAutoString cversion; + nsAutoCString cversion; nsresult rv = mAppInfo->GetPlatformVersion(cversion); NS_ENSURE_SUCCESS(rv, rv); AppendUTF8toUTF16(cversion, aVersion); return NS_OK; } //////////////////////////////////////////////////////////////////////////////// @@ -275,21 +275,16 @@ ApplicationAccessible::Init() } void ApplicationAccessible::Shutdown() { mAppInfo = nullptr; } -bool -ApplicationAccessible::IsPrimaryForNode() const -{ - return false; -} //////////////////////////////////////////////////////////////////////////////// // Accessible public methods void ApplicationAccessible::ApplyARIAState(uint64_t* aState) const { }
--- a/accessible/src/generic/ApplicationAccessible.h +++ b/accessible/src/generic/ApplicationAccessible.h @@ -58,17 +58,16 @@ public: NS_IMETHOD DoAction(uint8_t aIndex); // nsIAccessibleApplication NS_DECL_NSIACCESSIBLEAPPLICATION // nsAccessNode virtual void Init(); virtual void Shutdown(); - virtual bool IsPrimaryForNode() const; // Accessible virtual GroupPos GroupPosition(); virtual ENameValueFlag Name(nsString& aName); virtual void ApplyARIAState(uint64_t* aState) const; virtual void Description(nsString& aDescription); virtual void Value(nsString& aValue); virtual mozilla::a11y::role NativeRole();
--- a/accessible/src/generic/DocAccessible.cpp +++ b/accessible/src/generic/DocAccessible.cpp @@ -381,17 +381,17 @@ DocAccessible::TakeFocus() NS_IMETHODIMP DocAccessible::GetURL(nsAString& aURL) { if (IsDefunct()) return NS_ERROR_FAILURE; 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)); if (pURI) pURI->GetSpec(theURL); } CopyUTF8toUTF16(theURL, aURL); return NS_OK;
--- a/accessible/src/generic/FormControlAccessible.cpp +++ b/accessible/src/generic/FormControlAccessible.cpp @@ -4,17 +4,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // NOTE: alphabetically ordered #include "FormControlAccessible.h" #include "Role.h" #include "nsIDOMHTMLFormElement.h" -#include "nsIDOMHTMLInputElement.h" #include "nsIDOMXULElement.h" #include "nsIDOMXULControlElement.h" using namespace mozilla::a11y; //////////////////////////////////////////////////////////////////////////////// // ProgressMeterAccessible ////////////////////////////////////////////////////////////////////////////////
--- a/accessible/src/generic/ImageAccessible.cpp +++ b/accessible/src/generic/ImageAccessible.cpp @@ -131,17 +131,17 @@ ImageAccessible::DoAction(uint8_t aIndex // Get the long description uri and open in a new window. if (!IsLongDescIndex(aIndex)) return LinkableAccessible::DoAction(aIndex); nsCOMPtr<nsIURI> uri = GetLongDescURI(); if (!uri) return NS_ERROR_INVALID_ARG; - nsCAutoString utf8spec; + nsAutoCString utf8spec; uri->GetSpec(utf8spec); NS_ConvertUTF8toUTF16 spec(utf8spec); nsIDocument* document = mContent->OwnerDoc(); nsCOMPtr<nsPIDOMWindow> piWindow = document->GetWindow(); nsCOMPtr<nsIDOMWindow> win = do_QueryInterface(piWindow); NS_ENSURE_STATE(win);
--- a/accessible/src/html/HTMLFormControlAccessible.cpp +++ b/accessible/src/html/HTMLFormControlAccessible.cpp @@ -10,23 +10,20 @@ #include "nsARIAMap.h" #include "nsEventShell.h" #include "nsTextEquivUtils.h" #include "Relation.h" #include "Role.h" #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" #include "nsINameSpaceManager.h" #include "nsISelectionController.h" #include "jsapi.h" #include "nsIJSContextStack.h" #include "nsIServiceManager.h" @@ -89,33 +86,26 @@ HTMLCheckboxAccessible::DoAction(uint8_t } uint64_t HTMLCheckboxAccessible::NativeState() { uint64_t state = LeafAccessible::NativeState(); state |= states::CHECKABLE; - bool checkState = false; // Radio buttons and check boxes can be checked or mixed - - nsCOMPtr<nsIDOMHTMLInputElement> htmlCheckboxElement = - do_QueryInterface(mContent); - - if (htmlCheckboxElement) { - htmlCheckboxElement->GetIndeterminate(&checkState); + nsHTMLInputElement* input = nsHTMLInputElement::FromContent(mContent); + if (!input) + return state; - if (checkState) { - state |= states::MIXED; - } else { // indeterminate can't be checked at the same time. - htmlCheckboxElement->GetChecked(&checkState); - - if (checkState) - state |= states::CHECKED; - } - } + if (input->Indeterminate()) + return state | states::MIXED; + + if (input->Checked()) + return state | states::CHECKED; + return state; } //////////////////////////////////////////////////////////////////////////////// // HTMLCheckboxAccessible: Widgets bool HTMLCheckboxAccessible::IsWidget() const @@ -136,23 +126,18 @@ HTMLRadioButtonAccessible:: uint64_t HTMLRadioButtonAccessible::NativeState() { uint64_t state = AccessibleWrap::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; } void HTMLRadioButtonAccessible::GetPositionAndSizeInternal(int32_t* aPosInSet, int32_t* aSetSize) @@ -378,20 +363,19 @@ HTMLTextFieldAccessible::Value(nsString& return; nsCOMPtr<nsIDOMHTMLTextAreaElement> textArea(do_QueryInterface(mContent)); if (textArea) { textArea->GetValue(aValue); return; } - nsCOMPtr<nsIDOMHTMLInputElement> inputElement(do_QueryInterface(mContent)); - if (inputElement) { - inputElement->GetValue(aValue); - } + nsHTMLInputElement* input = nsHTMLInputElement::FromContent(mContent); + if (input) + input->GetValue(aValue); } void HTMLTextFieldAccessible::ApplyARIAState(uint64_t* aState) const { HyperTextAccessibleWrap::ApplyARIAState(aState); aria::MapToState(aria::eARIAAutoComplete, mContent->AsElement(), aState); @@ -427,18 +411,19 @@ HTMLTextFieldAccessible::NativeState() state |= states::PROTECTED; } if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::readonly)) { state |= states::READONLY; } // 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))) return state; // Expose autocomplete states if this input is part of autocomplete widget. Accessible* widget = ContainerWidget(); if (widget && widget-IsAutoComplete()) { @@ -458,19 +443,17 @@ HTMLTextFieldAccessible::NativeState() // for a page if the user asks it to be. However, the kind of autocomplete // we're talking here is based on what the user types, where a popup of // possible choices comes up. nsAutoString autocomplete; mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::autocomplete, 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); } if (!formContent || !autocomplete.LowerCaseEqualsLiteral("off")) state |= states::SUPPORTS_AUTOCOMPLETION; } @@ -494,17 +477,17 @@ HTMLTextFieldAccessible::GetActionName(u } return NS_ERROR_INVALID_ARG; } 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(); return NS_ERROR_FAILURE; } return NS_ERROR_INVALID_ARG; }
--- a/accessible/src/html/HTMLImageMapAccessible.cpp +++ b/accessible/src/html/HTMLImageMapAccessible.cpp @@ -147,16 +147,19 @@ HTMLImageMapAccessible::CacheChildren() //////////////////////////////////////////////////////////////////////////////// // HTMLAreaAccessible //////////////////////////////////////////////////////////////////////////////// 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; } //////////////////////////////////////////////////////////////////////////////// // HTMLAreaAccessible: nsIAccessible nsresult HTMLAreaAccessible::GetNameInternal(nsAString& aName) { @@ -179,27 +182,16 @@ HTMLAreaAccessible::Description(nsString // Still to do - follow IE's standard here nsCOMPtr<nsIDOMHTMLAreaElement> area(do_QueryInterface(mContent)); if (area) 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 Accessible* HTMLAreaAccessible::ChildAtPoint(int32_t aX, int32_t aY, EWhichChildAtPoint aWhichChild) { // Don't walk into area accessibles. return this;
--- a/accessible/src/html/HTMLImageMapAccessible.h +++ b/accessible/src/html/HTMLImageMapAccessible.h @@ -48,19 +48,16 @@ protected: * Accessible for image map areas - must be child of image. */ class HTMLAreaAccessible : public HTMLLinkAccessible { public: HTMLAreaAccessible(nsIContent* aContent, DocAccessible* aDoc); - // nsAccessNode - virtual bool IsPrimaryForNode() const; - // Accessible virtual void Description(nsString& aDescription); virtual nsresult GetNameInternal(nsAString& aName); virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY, EWhichChildAtPoint aWhichChild); virtual void GetBoundsRect(nsRect& aBounds, nsIFrame** aBoundingFrame); // HyperLinkAccessible
--- a/accessible/src/html/HTMLListAccessible.cpp +++ b/accessible/src/html/HTMLListAccessible.cpp @@ -136,33 +136,33 @@ HTMLLIAccessible::CacheChildren() // Cache children from subtree. AccessibleWrap::CacheChildren(); } //////////////////////////////////////////////////////////////////////////////// // HTMLListBulletAccessible //////////////////////////////////////////////////////////////////////////////// +HTMLListBulletAccessible:: + HTMLListBulletAccessible(nsIContent* aContent, DocAccessible* aDoc) : + LeafAccessible(aContent, aDoc) +{ + mFlags |= eSharedNode; +} //////////////////////////////////////////////////////////////////////////////// // HTMLListBulletAccessible: nsAccessNode nsIFrame* HTMLListBulletAccessible::GetFrame() const { nsBlockFrame* blockFrame = do_QueryFrame(mContent->GetPrimaryFrame()); return blockFrame ? blockFrame->GetBullet() : nullptr; } -bool -HTMLListBulletAccessible::IsPrimaryForNode() const -{ - return false; -} - //////////////////////////////////////////////////////////////////////////////// // HTMLListBulletAccessible: Accessible ENameValueFlag HTMLListBulletAccessible::Name(nsString &aName) { aName.Truncate();
--- a/accessible/src/html/HTMLListAccessible.h +++ b/accessible/src/html/HTMLListAccessible.h @@ -70,23 +70,21 @@ private: /** * Used for bullet of HTML list item element (for example, HTML li). */ 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); virtual a11y::role NativeRole(); virtual uint64_t NativeState(); virtual void AppendTextTo(nsAString& aText, uint32_t aStartOffset = 0, uint32_t aLength = PR_UINT32_MAX);
--- a/accessible/src/html/HTMLSelectAccessible.cpp +++ b/accessible/src/html/HTMLSelectAccessible.cpp @@ -11,25 +11,20 @@ #include "DocAccessible.h" #include "nsEventShell.h" #include "nsIAccessibleEvent.h" #include "nsTextEquivUtils.h" #include "Role.h" #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; //////////////////////////////////////////////////////////////////////////////// // HTMLSelectListAccessible //////////////////////////////////////////////////////////////////////////////// HTMLSelectListAccessible:: @@ -233,40 +228,34 @@ HTMLSelectOptionAccessible::NativeState( if (!select) return state; uint64_t selectState = select->State(); if (selectState & states::INVISIBLE) 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; // <select> is not collapsed: compare bounds to calculate OFFSCREEN Accessible* listAcc = Parent(); if (listAcc) { int32_t optionX, optionY, optionWidth, optionHeight; int32_t listX, listY, listWidth, listHeight; @@ -343,18 +332,18 @@ HTMLSelectOptionAccessible::DoAction(uin } NS_IMETHODIMP 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; } //////////////////////////////////////////////////////////////////////////////// // HTMLSelectOptionAccessible: Widgets Accessible* HTMLSelectOptionAccessible::ContainerWidget() const { @@ -641,16 +630,17 @@ HTMLComboboxAccessible::SelectedOption() // HTMLComboboxListAccessible //////////////////////////////////////////////////////////////////////////////// HTMLComboboxListAccessible:: HTMLComboboxListAccessible(nsIAccessible* aParent, nsIContent* aContent, DocAccessible* aDoc) : HTMLSelectListAccessible(aContent, aDoc) { + mFlags |= eSharedNode; } //////////////////////////////////////////////////////////////////////////////// // HTMLComboboxAccessible: nsAccessNode nsIFrame* HTMLComboboxListAccessible::GetFrame() const { @@ -661,22 +651,16 @@ HTMLComboboxListAccessible::GetFrame() c if (comboBox) { return comboBox->GetDropDown(); } } return nullptr; } -bool -HTMLComboboxListAccessible::IsPrimaryForNode() const -{ - return false; -} - //////////////////////////////////////////////////////////////////////////////// // HTMLComboboxAccessible: Accessible role HTMLComboboxListAccessible::NativeRole() { return roles::COMBOBOX_LIST; }
--- a/accessible/src/html/HTMLSelectAccessible.h +++ b/accessible/src/html/HTMLSelectAccessible.h @@ -2,19 +2,16 @@ /* 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/. */ #ifndef mozilla_a11y_HTMLSelectAccessible_h__ #define mozilla_a11y_HTMLSelectAccessible_h__ #include "HTMLFormControlAccessible.h" -#include "nsIDOMHTMLOptionsCollection.h" -#include "nsIDOMHTMLOptionElement.h" -#include "nsIDOMNode.h" class nsIMutableArray; namespace mozilla { namespace a11y { /** * Selects, Listboxes and Comboboxes, are made up of a number of different @@ -220,17 +217,16 @@ class HTMLComboboxListAccessible : publi public: HTMLComboboxListAccessible(nsIAccessible* aParent, nsIContent* aContent, DocAccessible* aDoc); virtual ~HTMLComboboxListAccessible() {} // nsAccessNode virtual nsIFrame* GetFrame() const; - virtual bool IsPrimaryForNode() const; // Accessible virtual a11y::role NativeRole(); virtual uint64_t NativeState(); virtual void GetBoundsRect(nsRect& aBounds, nsIFrame** aBoundingFrame); // Widgets virtual bool IsActiveWidget() const;
--- a/accessible/src/html/Makefile.in +++ b/accessible/src/html/Makefile.in @@ -31,16 +31,17 @@ CPPSRCS = \ FORCE_STATIC_LIB = 1 include $(topsrcdir)/config/rules.mk 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 \ $(NULL) ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) LOCAL_INCLUDES += \ -I$(srcdir)/../atk \
--- a/accessible/src/msaa/AccessibleWrap.cpp +++ b/accessible/src/msaa/AccessibleWrap.cpp @@ -1563,17 +1563,17 @@ AccessibleWrap::FirePlatformEvent(AccEve int32_t childID = GetChildIDFor(accessible); // get the id for the accessible if (!childID) return NS_OK; // Can't fire an event without a child ID HWND hWnd = GetHWNDFor(accessible); NS_ENSURE_TRUE(hWnd, NS_ERROR_FAILURE); nsAutoString tag; - nsCAutoString id; + nsAutoCString id; nsIContent* cnt = accessible->GetContent(); if (cnt) { cnt->Tag()->ToString(tag); nsIAtom* aid = cnt->GetID(); if (aid) aid->ToUTF8String(id); } @@ -1673,17 +1673,17 @@ AccessibleWrap::ConvertToIA2Attributes(n while (NS_SUCCEEDED(propEnum->HasMoreElements(&hasMore)) && hasMore) { nsCOMPtr<nsISupports> propSupports; propEnum->GetNext(getter_AddRefs(propSupports)); nsCOMPtr<nsIPropertyElement> propElem(do_QueryInterface(propSupports)); if (!propElem) return E_FAIL; - nsCAutoString name; + nsAutoCString name; if (NS_FAILED(propElem->GetKey(name))) return E_FAIL; uint32_t offset = 0; while ((offset = name.FindCharInSet(kCharsToEscape, offset)) != kNotFound) { name.Insert('\\', offset); offset += 2; }
--- a/accessible/src/msaa/ia2AccessibleHyperlink.cpp +++ b/accessible/src/msaa/ia2AccessibleHyperlink.cpp @@ -83,22 +83,22 @@ ia2AccessibleHyperlink::get_anchorTarget if (!thisObj->IsLink()) return S_FALSE; nsCOMPtr<nsIURI> uri = thisObj->AnchorURIAt(aIndex); 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); nsAutoString stringURI; AppendUTF8toUTF16(prePath, stringURI); AppendUTF8toUTF16(path, stringURI);
--- a/accessible/src/xul/XULFormControlAccessible.cpp +++ b/accessible/src/xul/XULFormControlAccessible.cpp @@ -12,17 +12,16 @@ #include "nsCoreUtils.h" #include "DocAccessible.h" #include "nsIAccessibleRelation.h" #include "Relation.h" #include "Role.h" #include "States.h" #include "XULMenuAccessible.h" -#include "nsIDOMHTMLInputElement.h" #include "nsIDOMNSEditableElement.h" #include "nsIDOMXULButtonElement.h" #include "nsIDOMXULCheckboxElement.h" #include "nsIDOMXULMenuListElement.h" #include "nsIDOMXULSelectCntrlItemEl.h" #include "nsIDOMXULTextboxElement.h" #include "nsIEditor.h" #include "nsIFrame.h"
--- a/accessible/src/xul/XULTreeAccessible.cpp +++ b/accessible/src/xul/XULTreeAccessible.cpp @@ -194,17 +194,17 @@ XULTreeAccessible::ChildAtPoint(int32_t nsIntRect rootRect = rootFrame->GetScreenRect(); int32_t clientX = presContext->DevPixelsToIntCSSPixels(aX) - rootRect.x; int32_t clientY = presContext->DevPixelsToIntCSSPixels(aY) - rootRect.y; int32_t row = -1; nsCOMPtr<nsITreeColumn> column; - nsCAutoString childEltUnused; + nsAutoCString childEltUnused; mTree->GetCellAt(clientX, clientY, &row, getter_AddRefs(column), childEltUnused); // If we failed to find tree cell for the given point then it might be // tree columns. if (row == -1 || !column) return AccessibleWrap::ChildAtPoint(aX, aY, aWhichChild); @@ -698,16 +698,17 @@ XULTreeAccessible::CreateTreeItemAccessi XULTreeItemAccessibleBase:: XULTreeItemAccessibleBase(nsIContent* aContent, DocAccessible* aDoc, Accessible* aParent, nsITreeBoxObject* aTree, nsITreeView* aTreeView, int32_t aRow) : AccessibleWrap(aContent, aDoc), mTree(aTree), mTreeView(aTreeView), mRow(aRow) { mParent = aParent; + mFlags |= eSharedNode; } //////////////////////////////////////////////////////////////////////////////// // XULTreeItemAccessibleBase: nsISupports implementation NS_IMPL_CYCLE_COLLECTION_CLASS(XULTreeItemAccessibleBase) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(XULTreeItemAccessibleBase, @@ -891,22 +892,16 @@ XULTreeItemAccessibleBase::Shutdown() { mTree = nullptr; mTreeView = nullptr; mRow = -1; AccessibleWrap::Shutdown(); } -bool -XULTreeItemAccessibleBase::IsPrimaryForNode() const -{ - return false; -} - //////////////////////////////////////////////////////////////////////////////// // XULTreeItemAccessibleBase: Accessible public methods // nsIAccessible::groupPosition GroupPos XULTreeItemAccessibleBase::GroupPosition() { GroupPos groupPos; @@ -1023,17 +1018,17 @@ XULTreeItemAccessibleBase::DispatchClick nsCOMPtr<nsITreeColumns> columns; mTree->GetColumns(getter_AddRefs(columns)); if (!columns) return; // Get column and pseudo element. nsCOMPtr<nsITreeColumn> column; - nsCAutoString pseudoElm; + nsAutoCString pseudoElm; if (aActionIndex == eAction_Click) { // Key column is visible and clickable. columns->GetKeyColumn(getter_AddRefs(column)); } else { // Primary column contains a twisty we should click on. columns->GetPrimaryColumn(getter_AddRefs(column)); pseudoElm = NS_LITERAL_CSTRING("twisty");
--- a/accessible/src/xul/XULTreeAccessible.h +++ b/accessible/src/xul/XULTreeAccessible.h @@ -149,17 +149,16 @@ public: NS_IMETHOD SetSelected(bool aSelect); NS_IMETHOD TakeFocus(); NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName); NS_IMETHOD DoAction(uint8_t aIndex); // nsAccessNode virtual void Shutdown(); - virtual bool IsPrimaryForNode() const; // Accessible virtual GroupPos GroupPosition(); virtual uint64_t NativeState(); virtual uint64_t NativeInteractiveState() const; virtual int32_t IndexInParent() const; virtual Relation RelationByType(uint32_t aType); virtual Accessible* FocusedChild();
--- a/accessible/src/xul/XULTreeGridAccessible.cpp +++ b/accessible/src/xul/XULTreeGridAccessible.cpp @@ -362,17 +362,17 @@ XULTreeGridRowAccessible::ChildAtPoint(i nsIntRect rootRect = rootFrame->GetScreenRect(); int32_t clientX = presContext->DevPixelsToIntCSSPixels(aX) - rootRect.x; int32_t clientY = presContext->DevPixelsToIntCSSPixels(aY) - rootRect.y; int32_t row = -1; nsCOMPtr<nsITreeColumn> column; - nsCAutoString childEltUnused; + nsAutoCString childEltUnused; mTree->GetCellAt(clientX, clientY, &row, getter_AddRefs(column), childEltUnused); // Return if we failed to find tree cell in the row for the given point. if (row != mRow || !column) return nullptr; return GetCellAccessible(column); @@ -464,16 +464,17 @@ XULTreeGridCellAccessible:: XULTreeGridCellAccessible(nsIContent* aContent, DocAccessible* aDoc, XULTreeGridRowAccessible* aRowAcc, nsITreeBoxObject* aTree, nsITreeView* aTreeView, int32_t aRow, nsITreeColumn* aColumn) : LeafAccessible(aContent, aDoc), xpcAccessibleTableCell(this), mTree(aTree), mTreeView(aTreeView), mRow(aRow), mColumn(aColumn) { mParent = aRowAcc; + mFlags |= eSharedNode; } //////////////////////////////////////////////////////////////////////////////// // XULTreeGridCellAccessible: nsISupports implementation NS_IMPL_CYCLE_COLLECTION_CLASS(XULTreeGridCellAccessible) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(XULTreeGridCellAccessible, @@ -789,22 +790,16 @@ XULTreeGridCellAccessible::Init() int16_t type; mColumn->GetType(&type); if (type == nsITreeColumn::TYPE_CHECKBOX) mTreeView->GetCellValue(mRow, mColumn, mCachedTextEquiv); else mTreeView->GetCellText(mRow, mColumn, mCachedTextEquiv); } -bool -XULTreeGridCellAccessible::IsPrimaryForNode() const -{ - return false; -} - //////////////////////////////////////////////////////////////////////////////// // XULTreeGridCellAccessible: Accessible public implementation nsresult XULTreeGridCellAccessible::GetAttributesInternal(nsIPersistentProperties* aAttributes) { NS_ENSURE_ARG_POINTER(aAttributes);
--- a/accessible/src/xul/XULTreeGridAccessible.h +++ b/accessible/src/xul/XULTreeGridAccessible.h @@ -146,17 +146,16 @@ public: NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName); NS_IMETHOD DoAction(uint8_t aIndex); // nsIAccessibleTableCell NS_DECL_OR_FORWARD_NSIACCESSIBLETABLECELL_WITH_XPCACCESSIBLETABLECELL // nsAccessNode virtual void Init(); - virtual bool IsPrimaryForNode() const; // Accessible virtual void Shutdown(); virtual ENameValueFlag Name(nsString& aName); virtual Accessible* FocusedChild(); virtual nsresult GetAttributesInternal(nsIPersistentProperties* aAttributes); virtual int32_t IndexInParent() const; virtual Relation RelationByType(uint32_t aType);
--- a/b2g/app/b2g.js +++ b/b2g/app/b2g.js @@ -137,20 +137,16 @@ pref("browser.search.suggest.enabled", t pref("browser.search.noCurrentEngine", true); // enable xul error pages 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); // prevent click image resizing for nsImageDocument pref("browser.enable_click_image_resizing", false); // controls which bits of private data to clear. by default we clear them all. pref("privacy.item.cache", true);
new file mode 100644 --- /dev/null +++ b/b2g/chrome/content/payment.js @@ -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; +});
--- a/b2g/chrome/content/shell.js +++ b/b2g/chrome/content/shell.js @@ -13,17 +13,18 @@ Cu.import('resource://gre/modules/XPCOMU Cu.import('resource://gre/modules/Services.jsm'); Cu.import('resource://gre/modules/ContactService.jsm'); Cu.import('resource://gre/modules/SettingsChangeNotifier.jsm'); Cu.import('resource://gre/modules/Webapps.jsm'); 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', 'nsIEnvironment'); XPCOMUtils.defineLazyServiceGetter(Services, 'ss', '@mozilla.org/content/style-sheet-service;1', 'nsIStyleSheetService'); @@ -67,17 +68,31 @@ var shell = { reportCrash: function shell_reportCrash() { let crashID; try { crashID = Cc["@mozilla.org/xre/app-info;1"] .getService(Ci.nsIXULRuntime).lastRunCrashID; } 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); } }, get contentBrowser() { delete this.contentBrowser; return this.contentBrowser = document.getElementById('homescreen'); }, @@ -169,16 +184,20 @@ var shell = { window.removeEventListener('keydown', this, true); window.removeEventListener('keypress', this, true); window.removeEventListener('keyup', this, true); window.removeEventListener('MozApplicationManifest', this); window.removeEventListener('mozfullscreenchange', this); 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; #endif }, // If this key event actually represents a hardware button, filter it here // and send a mozChromeEvent with detail.type set to xxx-button-press or @@ -234,18 +253,21 @@ var shell = { // the type of the last one, then don't send it. We'll never send // two presses or two releases in a row. // FIXME: https://bugzilla.mozilla.org/show_bug.cgi?id=761067 if (type !== this.lastHardwareButtonEventType) { this.lastHardwareButtonEventType = type; 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; switch (evt.type) { case 'keydown': case 'keyup': case 'keypress': this.filterHardwareKeys(evt); @@ -320,16 +342,28 @@ var shell = { content.dispatchEvent(event); }, sendChromeEvent: function shell_sendChromeEvent(details) { this.sendEvent(getContentWindow(), "mozChromeEvent", 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; } let handler = message.json; new MozActivity({ name: 'view', data: { @@ -369,25 +403,23 @@ nsBrowserAccess.prototype = { isTabContentWindow: function isTabContentWindow(contentWindow) { return contentWindow == window; } }; // 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) { shell.sendChromeEvent({ type: "fullscreenoriginchange", fullscreenorigin: aData }); }, "fullscreen-origin-change", false); (function Repl() { @@ -441,16 +473,28 @@ Services.obs.addObserver(function(aSubje serverSocket.asyncListen(listener); })(); var CustomEventManager = { init: function custevt_init() { 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); }, handleEvent: function custevt_handleEvent(evt) { let detail = evt.detail; dump('XXX FIXME : Got a mozContentEvent: ' + detail.type + "\n"); switch(detail.type) { @@ -654,16 +698,25 @@ window.addEventListener('ContentStart', shell.sendChromeEvent({ type: 'geolocation-status', active: (gGeolocationActiveCount == 1) }); } }, "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; Services.obs.addObserver(function(aSubject, aTopic, aData) { let oldCount = gRecordingActiveCount; if (aData == "starting") { gRecordingActiveCount += 1; } else if (aData == "shutdown") { @@ -674,8 +727,17 @@ window.addEventListener('ContentStart', if (gRecordingActiveCount + oldCount == 1) { shell.sendChromeEvent({ type: 'recording-status', active: (gRecordingActiveCount == 1) }); } }, "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); +})();
--- a/b2g/chrome/jar.mn +++ b/b2g/chrome/jar.mn @@ -16,16 +16,18 @@ chrome.jar: * content/shell.js (content/shell.js) #ifndef ANDROID content/screen.js (content/screen.js) content/runapp.js (content/runapp.js) #endif 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 content/netError.xhtml (content/netError.xhtml) content/netError.css (content/netError.css) content/images/errorpage-larry-black.png (content/images/errorpage-larry-black.png) content/images/errorpage-larry-white.png (content/images/errorpage-larry-white.png)
--- a/b2g/components/B2GComponents.manifest +++ b/b2g/components/B2GComponents.manifest @@ -38,8 +38,11 @@ contract @mozilla.org/dom/activities/ui- component {1a94c87a-5ece-4d11-91e1-d29c29f21b28} ProcessGlobal.js contract @mozilla.org/b2g-process-global;1 {1a94c87a-5ece-4d11-91e1-d29c29f21b28} category app-startup ProcessGlobal service,@mozilla.org/b2g-process-global;1 # ContentHandler.js 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}
--- a/b2g/components/DirectoryProvider.js +++ b/b2g/components/DirectoryProvider.js @@ -18,22 +18,27 @@ function DirectoryProvider() { DirectoryProvider.prototype = { classID: Components.ID("{9181eb7c-6f87-11e1-90b1-4f59d80dd2e5}"), QueryInterface: XPCOMUtils.generateQI([Ci.nsIDirectoryServiceProvider]), 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 return null; } };
--- a/b2g/components/Makefile.in +++ b/b2g/components/Makefile.in @@ -21,15 +21,16 @@ EXTRA_PP_COMPONENTS = \ AlertsService.js \ B2GComponents.manifest \ CameraContent.js \ ContentHandler.js \ ContentPermissionPrompt.js \ DirectoryProvider.js \ MozKeyboard.js \ ProcessGlobal.js \ + PaymentGlue.js \ $(NULL) ifdef MOZ_UPDATER EXTRA_PP_COMPONENTS += UpdatePrompt.js endif include $(topsrcdir)/config/rules.mk
--- a/b2g/components/MozKeyboard.js +++ b/b2g/components/MozKeyboard.js @@ -60,29 +60,29 @@ MozKeyboard.prototype = { sendKey: function mozKeyboardSendKey(keyCode, charCode) { charCode = (charCode == undefined) ? keyCode : charCode; ["keydown", "keypress", "keyup"].forEach((function sendKey(type) { this._utils.sendKeyEvent(type, keyCode, charCode, null); }).bind(this)); }, 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 || [] }); }, set onfocuschange(val) { this._focusHandler = val; },
new file mode 100644 --- /dev/null +++ b/b2g/components/PaymentGlue.js @@ -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]);
--- a/b2g/config/tooltool-manifests/ics.manifest +++ b/b2g/config/tooltool-manifests/ics.manifest @@ -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" } -] +] \ No newline at end of file
--- a/b2g/config/tooltool-manifests/macosx64/releng.manifest +++ b/b2g/config/tooltool-manifests/macosx64/releng.manifest @@ -1,17 +1,17 @@ [ { -"clang_version": "r161022" +"clang_version": "r161152" }, { "size": 47, "digest": "2005a41fe97a5e00997063705f39d42b6a43b1cf7ba306cbc7b1513de34cdcd050fc6326efa2107f19ba0cc67914745dbf13154fa748010a93cf072481ef4aaa", "algorithm": "sha512", "filename": "setup.sh" }, { -"size": 54405078, -"digest": "940f02ee8e4a760f52d6fe9cd1dc8dec01abc61b8086d46b4aa7d7292cf7c353a2cec1c9687491ade756ba2654b9e93986123155cb931bd18431fbbfdef671a9", +"size": 57249339, +"digest": "708bf18f40edd46517c6368b6b5ad5cd05904d3c60614cdb483248e035cdca0fc905f0e72e90d94de9dccaa18270aadfe07987ab95adcc0c6bb4ce51aa292623", "algorithm": "sha512", "filename": "clang.tar.bz2" } ]
--- a/b2g/confvars.sh +++ b/b2g/confvars.sh @@ -33,9 +33,11 @@ else MOZ_XULRUNNER= MOZ_PLACES=1 fi MOZ_APP_ID={3c2e2abc-06d4-11e1-ac3b-374f68613e61} MOZ_EXTENSION_MANAGER=1 MOZ_SYS_MSG=1 + +MOZ_PAY=1 MOZ_TOOLKIT_SEARCH=
--- a/b2g/installer/package-manifest.in +++ b/b2g/installer/package-manifest.in @@ -109,18 +109,18 @@ @BINPATH@/platform.ini #ifndef XP_OS2 @BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@ #else @BINPATH@/mozsqlt3@DLL_SUFFIX@ #endif @BINPATH@/blocklist.xml #ifdef XP_UNIX +#ifndef XP_MACOSX @BINPATH@/run-mozilla.sh -#ifndef XP_MACOSX @BINPATH@/mozilla-xremote-client #endif #endif ; [Components] @BINPATH@/components/components.manifest @BINPATH@/components/alerts.xpt #ifdef ACCESSIBILITY @@ -177,16 +177,17 @@ @BINPATH@/components/dom_file.xpt @BINPATH@/components/dom_geolocation.xpt @BINPATH@/components/dom_media.xpt @BINPATH@/components/dom_network.xpt @BINPATH@/components/dom_notification.xpt @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 #endif @BINPATH@/components/dom_browserelement.xpt @BINPATH@/components/dom_messages.xpt @BINPATH@/components/dom_power.xpt @BINPATH@/components/dom_range.xpt @@ -484,16 +485,21 @@ @BINPATH@/components/ActivityWrapper.js @BINPATH@/components/TCPSocket.js @BINPATH@/components/TCPSocket.manifest @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/* ; Safe Browsing @BINPATH@/components/nsURLClassifier.manifest @BINPATH@/components/nsUrlClassifierHashCompleter.js @BINPATH@/components/nsUrlClassifierListManager.js @BINPATH@/components/nsUrlClassifierLib.js @@ -685,12 +691,13 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DL #ifdef MOZ_UPDATER @BINPATH@/components/UpdatePrompt.js #endif @BINPATH@/components/MozKeyboard.js @BINPATH@/components/DirectoryProvider.js @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@ #endif
--- a/b2g/installer/removed-files.in +++ b/b2g/installer/removed-files.in @@ -1,3 +1,6 @@ README.txt @DLL_PREFIX@mozutils@DLL_SUFFIX@ jssubloader/ +#ifdef XP_MACOSX +run-mozilla.sh +#endif \ No newline at end of file
--- a/browser/app/blocklist.xml +++ b/browser/app/blocklist.xml @@ -1,10 +1,10 @@ <?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="*"> </versionRange> </emItem> <emItem blockID="i41" id="{99079a25-328f-4bd4-be04-00955acaa0a7}"> <versionRange minVersion="0.1" maxVersion="4.3.1.00" severity="1"> </versionRange> @@ -416,16 +416,22 @@ <match name="name" exp="\(TM\)" /> <match name="description" exp="[^\d\._]((0(\.\d+(\.\d+([_\.]\d+)?)?)?)|(1\.(([0-5](\.\d+([_\.]\d+)?)?)|(6(\.0([_\.](0?\d|1\d|2\d|30))?)?)|(7(\.0([_\.][0-2])?)?))))([^\d\._]|$)" /> <match name="filename" exp="(npjp2\.dll)|(libnpjp2\.so)" /> <versionRange severity="1"></versionRange> </pluginItem> <pluginItem blockID="p119"> <match name="name" exp="Java\(TM\) Plug-in 1\.(6\.0_(\d|[0-2]\d?|3[0-2])|7\.0(_0?([1-4]))?)([^\d\._]|$)" /> <match name="filename" exp="libnpjp2\.so" /> <versionRange severity="1"></versionRange> </pluginItem> <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> <pluginItem os="Darwin" blockID="p89"> <match name="filename" exp="AdobePDFViewerNPAPI\.plugin" /> <versionRange minVersion="0" maxVersion="10.1.3" severity="1"></versionRange> </pluginItem> <pluginItem blockID="p94"> <match name="filename" exp="(NPSWF32\.dll)|(Flash\ Player\.plugin)" /> <versionRange minVersion="0" maxVersion="10.2.159.1" severity="0"></versionRange>
--- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -217,16 +217,21 @@ pref("general.skins.selectedSkin", "clas pref("general.smoothScroll", true); #ifdef UNIX_BUT_NOT_MAC pref("general.autoScroll", false); #else 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); // 0 = blank, 1 = home (browser.startup.homepage), 2 = last visited page, 3 = resume previous browser session // The behavior of option 3 is detailed at: http://wiki.mozilla.org/Session_Restore pref("browser.startup.page", 1); pref("browser.startup.homepage", "chrome://branding/locale/browserconfig.properties"); @@ -1169,8 +1174,10 @@ pref("image.mem.max_decoded_image_kb", 2 // Example social provider pref("social.manifest.motown", "{\"origin\":\"https://motown-dev.mozillalabs.com\",\"name\":\"MoTown\",\"workerURL\":\"https://motown-dev.mozillalabs.com/social/worker.js\",\"iconURL\":\"https://motown-dev.mozillalabs.com/images/motown-icon.png\",\"sidebarURL\":\"https://motown-dev.mozillalabs.com/social/sidebar\"}"); // Comma-separated list of nsIURI::prePaths that are allowed to activate // built-in social functionality. pref("social.activation.whitelist", "https://motown-dev.mozillalabs.com"); pref("social.sidebar.open", true); pref("social.active", false); + +pref("dom.identity.enabled", false);
--- a/browser/base/content/browser-appmenu.inc +++ b/browser/base/content/browser-appmenu.inc @@ -283,17 +283,17 @@ <menuitem id="appmenu_sanitizeHistory" label="&clearRecentHistory.label;" key="key_sanitize" command="Tools:Sanitize"/> <menuseparator class="hide-if-empty-places-result"/> #ifdef MOZ_SERVICES_SYNC <menuitem id="appmenu_sync-tabs" class="syncTabsMenuItem" - label="&syncTabsMenu.label;" + label="&syncTabsMenu2.label;" oncommand="BrowserOpenSyncTabs();" disabled="true"/> #endif <menuitem id="appmenu_restoreLastSession" class="restoreLastSession" label="&historyRestoreLastSession.label;" oncommand="restoreLastSession();" disabled="true"/>
--- a/browser/base/content/browser-menubar.inc +++ b/browser/base/content/browser-menubar.inc @@ -357,17 +357,17 @@ #ifndef XP_MACOSX key="showAllHistoryKb" #endif command="Browser:ShowAllHistory"/> <menuseparator id="showAllHistorySeparator"/> #ifdef MOZ_SERVICES_SYNC <menuitem id="sync-tabs-menuitem" class="syncTabsMenuItem" - label="&syncTabsMenu.label;" + label="&syncTabsMenu2.label;" oncommand="BrowserOpenSyncTabs();" disabled="true"/> #endif <menuitem id="historyRestoreLastSession" class="restoreLastSession" label="&historyRestoreLastSession.label;" oncommand="restoreLastSession();" disabled="true"/>
--- a/browser/base/content/browser-sets.inc +++ b/browser/base/content/browser-sets.inc @@ -86,17 +86,17 @@ <command id="cmd_fullZoomToggle" oncommand="ZoomManager.toggleZoom();"/> <command id="Browser:OpenLocation" oncommand="openLocation();"/> <command id="Tools:Search" oncommand="BrowserSearch.webSearch();"/> <command id="Tools:Downloads" oncommand="BrowserDownloadsUI();"/> <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"/> <command id="Tools:Scratchpad" oncommand="Scratchpad.openScratchpad();" disabled="true" hidden="true"/> <command id="Tools:StyleEditor" oncommand="StyleEditor.toggle();" disabled="true" hidden="true"/> <command id="Tools:ResponsiveUI" oncommand="ResponsiveUI.toggle();" disabled="true" hidden="true"/> <command id="Tools:Addons" oncommand="BrowserOpenAddonsMgr();"/> <command id="Tools:ErrorConsole" oncommand="toJavaScriptConsole()" disabled="true" hidden="true"/>
--- a/browser/base/content/browser-social.js +++ b/browser/base/content/browser-social.js @@ -22,17 +22,17 @@ let SocialUI = { Services.obs.removeObserver(this, "social:ambient-notification-changed"); Services.obs.removeObserver(this, "social:profile-changed"); Services.prefs.removeObserver("social.sidebar.open", this); }, 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) { switch (topic) { case "social:pref-changed": // Exceptions here sometimes don't get reported properly, report them // manually :( try {
--- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -600,34 +600,34 @@ html|*#gcli-output-frame, /* We don't show the Style Editor button in the developer toolbar for now. See bug 771203 */ #developer-toolbar-styleeditor { display: none; } /* Responsive Mode */ -vbox[anonid=browserContainer][responsivemode] { +.browserContainer[responsivemode] { overflow: auto; } .devtools-responsiveui-toolbar:-moz-locale-dir(rtl) { -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; } chatbox { -moz-binding: url("chrome://browser/content/socialchat.xml#chatbox"); } chatbar {
--- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -1429,24 +1429,16 @@ var gBrowserInit = { document.getElementById("Tools:DevToolbarFocus").removeAttribute("disabled"); // Show the toolbar if it was previously visible if (gPrefService.getBoolPref("devtools.toolbar.visible