diff --git a/.gitignore b/.gitignore index 52c6e5489888..93ffa306da47 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,5 @@ parser/html/java/javaparser/ .cproject .settings/ +# Python stuff installed at build-time +*.egg-info/ diff --git a/.hgignore b/.hgignore index 45e1bf866722..6c4a78e9093d 100644 --- a/.hgignore +++ b/.hgignore @@ -45,3 +45,6 @@ _OPT\.OBJ/ \.project$ \.cproject$ \.settings/ + +# Python stuff installed at build-time +\.egg-info/ diff --git a/accessible/src/atk/AccessibleWrap.cpp b/accessible/src/atk/AccessibleWrap.cpp index 676334f4b48f..8e96cc3082a1 100644 --- a/accessible/src/atk/AccessibleWrap.cpp +++ b/accessible/src/atk/AccessibleWrap.cpp @@ -376,7 +376,7 @@ AccessibleWrap::CreateMaiInterfaces(void) interfacesBits |= 1 << MAI_INTERFACE_ACTION; // Text, Editabletext, and Hypertext interface. - nsHyperTextAccessible* hyperText = AsHyperText(); + HyperTextAccessible* hyperText = AsHyperText(); if (hyperText && hyperText->IsTextRole()) { interfacesBits |= 1 << MAI_INTERFACE_TEXT; interfacesBits |= 1 << MAI_INTERFACE_EDITABLE_TEXT; diff --git a/accessible/src/atk/nsHyperTextAccessibleWrap.h b/accessible/src/atk/HyperTextAccessibleWrap.h similarity index 63% rename from accessible/src/atk/nsHyperTextAccessibleWrap.h rename to accessible/src/atk/HyperTextAccessibleWrap.h index 55fc35a22e57..f178fe7aac97 100644 --- a/accessible/src/atk/nsHyperTextAccessibleWrap.h +++ b/accessible/src/atk/HyperTextAccessibleWrap.h @@ -4,12 +4,12 @@ * 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 _NSHYPERTEXTACCESSIBLEWRAP_H -#define _NSHYPERTEXTACCESSIBLEWRAP_H +#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__ +#define mozilla_a11y_HyperTextAccessibleWrap_h__ -#include "nsHyperTextAccessible.h" +#include "HyperTextAccessible.h" -typedef class nsHyperTextAccessible nsHyperTextAccessibleWrap; +typedef class HyperTextAccessible HyperTextAccessibleWrap; #endif diff --git a/accessible/src/atk/nsMaiInterfaceEditableText.cpp b/accessible/src/atk/nsMaiInterfaceEditableText.cpp index d3083fc1bd41..eb79261f93c8 100644 --- a/accessible/src/atk/nsMaiInterfaceEditableText.cpp +++ b/accessible/src/atk/nsMaiInterfaceEditableText.cpp @@ -6,7 +6,7 @@ #include "InterfaceInitFuncs.h" -#include "nsHyperTextAccessible.h" +#include "HyperTextAccessible.h" #include "nsMai.h" #include "nsString.h" diff --git a/accessible/src/atk/nsMaiInterfaceHypertext.cpp b/accessible/src/atk/nsMaiInterfaceHypertext.cpp index 5cfc193c0256..9cd065c4bdb0 100644 --- a/accessible/src/atk/nsMaiInterfaceHypertext.cpp +++ b/accessible/src/atk/nsMaiInterfaceHypertext.cpp @@ -6,7 +6,7 @@ #include "InterfaceInitFuncs.h" -#include "nsHyperTextAccessible.h" +#include "HyperTextAccessible.h" #include "nsMai.h" #include "nsMaiHyperlink.h" @@ -19,7 +19,7 @@ getLinkCB(AtkHypertext *aText, gint aLinkIndex) if (!accWrap) return nsnull; - nsHyperTextAccessible* hyperText = accWrap->AsHyperText(); + HyperTextAccessible* hyperText = accWrap->AsHyperText(); NS_ENSURE_TRUE(hyperText, nsnull); Accessible* hyperLink = hyperText->GetLinkAt(aLinkIndex); @@ -42,7 +42,7 @@ getLinkCountCB(AtkHypertext *aText) if (!accWrap) return -1; - nsHyperTextAccessible* hyperText = accWrap->AsHyperText(); + HyperTextAccessible* hyperText = accWrap->AsHyperText(); NS_ENSURE_TRUE(hyperText, -1); return hyperText->GetLinkCount(); @@ -55,7 +55,7 @@ getLinkIndexCB(AtkHypertext *aText, gint aCharIndex) if (!accWrap) return -1; - nsHyperTextAccessible* hyperText = accWrap->AsHyperText(); + HyperTextAccessible* hyperText = accWrap->AsHyperText(); NS_ENSURE_TRUE(hyperText, -1); PRInt32 index = -1; diff --git a/accessible/src/atk/nsMaiInterfaceText.cpp b/accessible/src/atk/nsMaiInterfaceText.cpp index f34dda003392..66b4ed2b5263 100644 --- a/accessible/src/atk/nsMaiInterfaceText.cpp +++ b/accessible/src/atk/nsMaiInterfaceText.cpp @@ -6,7 +6,7 @@ #include "InterfaceInitFuncs.h" -#include "nsHyperTextAccessible.h" +#include "HyperTextAccessible.h" #include "nsMai.h" #include "nsIPersistentProperties2.h" @@ -314,7 +314,7 @@ getCharacterCountCB(AtkText *aText) if (!accWrap) return 0; - nsHyperTextAccessible* textAcc = accWrap->AsHyperText(); + HyperTextAccessible* textAcc = accWrap->AsHyperText(); return textAcc->IsDefunct() ? 0 : static_cast(textAcc->CharacterCount()); } diff --git a/accessible/src/base/NotificationController.cpp b/accessible/src/base/NotificationController.cpp index 5cfa0581533e..b4693364aafd 100644 --- a/accessible/src/base/NotificationController.cpp +++ b/accessible/src/base/NotificationController.cpp @@ -646,7 +646,7 @@ NotificationController::CreateTextChangeEventFor(AccMutationEvent* aEvent) if (!container) return; - nsHyperTextAccessible* textAccessible = container->AsHyperText(); + HyperTextAccessible* textAccessible = container->AsHyperText(); if (!textAccessible) return; diff --git a/accessible/src/base/TextAttrs.cpp b/accessible/src/base/TextAttrs.cpp index d8ea070d4794..ef1184d27451 100644 --- a/accessible/src/base/TextAttrs.cpp +++ b/accessible/src/base/TextAttrs.cpp @@ -5,9 +5,9 @@ #include "TextAttrs.h" +#include "HyperTextAccessibleWrap.h" #include "nsAccUtils.h" #include "nsCoreUtils.h" -#include "nsHyperTextAccessibleWrap.h" #include "StyleInfo.h" #include "gfxFont.h" @@ -199,7 +199,7 @@ TextAttrsMgr::GetRange(TextAttr* aAttrArray[], PRUint32 aAttrArrayLen, //////////////////////////////////////////////////////////////////////////////// TextAttrsMgr::LangTextAttr:: - LangTextAttr(nsHyperTextAccessible* aRoot, + LangTextAttr(HyperTextAccessible* aRoot, nsIContent* aRootElm, nsIContent* aElm) : TTextAttr(!aElm), mRootContent(aRootElm) { diff --git a/accessible/src/base/TextAttrs.h b/accessible/src/base/TextAttrs.h index 69a112fc75d1..3d1d252b6b92 100644 --- a/accessible/src/base/TextAttrs.h +++ b/accessible/src/base/TextAttrs.h @@ -11,17 +11,17 @@ #include "nsIPersistentProperties2.h" #include "nsStyleConsts.h" -class nsHyperTextAccessible; +class HyperTextAccessible; namespace mozilla { namespace a11y { /** * Used to expose text attributes for the hyper text accessible (see - * nsHyperTextAccessible class). + * HyperTextAccessible class). * * @note "invalid: spelling" text attribute is implemented entirely in - * nsHyperTextAccessible class. + * HyperTextAccessible class. */ class TextAttrsMgr { @@ -29,7 +29,7 @@ public: /** * Constructor. Used to expose default text attributes. */ - TextAttrsMgr(nsHyperTextAccessible* aHyperTextAcc) : + TextAttrsMgr(HyperTextAccessible* aHyperTextAcc) : mOffsetAcc(nsnull), mHyperTextAcc(aHyperTextAcc), mOffsetAccIdx(-1), mIncludeDefAttrs(true) { } @@ -45,7 +45,7 @@ public: * should be calculated for * @param oOffsetAccIdx [optional] index in parent of offset accessible */ - TextAttrsMgr(nsHyperTextAccessible* aHyperTextAcc, + TextAttrsMgr(HyperTextAccessible* aHyperTextAcc, bool aIncludeDefAttrs, Accessible* aOffsetAcc, PRInt32 aOffsetAccIdx) : @@ -84,7 +84,7 @@ protected: private: Accessible* mOffsetAcc; - nsHyperTextAccessible* mHyperTextAcc; + HyperTextAccessible* mHyperTextAcc; PRInt32 mOffsetAccIdx; bool mIncludeDefAttrs; @@ -191,7 +191,7 @@ protected: class LangTextAttr : public TTextAttr { public: - LangTextAttr(nsHyperTextAccessible* aRoot, nsIContent* aRootElm, + LangTextAttr(HyperTextAccessible* aRoot, nsIContent* aRootElm, nsIContent* aElm); virtual ~LangTextAttr() { } diff --git a/accessible/src/base/TextUpdater.h b/accessible/src/base/TextUpdater.h index 033b4739f4c6..3d6e24c11f53 100644 --- a/accessible/src/base/TextUpdater.h +++ b/accessible/src/base/TextUpdater.h @@ -7,7 +7,7 @@ #define TextUpdater_h_ #include "AccEvent.h" -#include "nsHyperTextAccessible.h" +#include "HyperTextAccessible.h" /** * Used to find a difference between old and new text and fire text change @@ -85,7 +85,7 @@ private: private: DocAccessible* mDocument; mozilla::a11y::TextLeafAccessible* mTextLeaf; - nsHyperTextAccessible* mHyperText; + HyperTextAccessible* mHyperText; PRInt32 mTextOffset; }; diff --git a/accessible/src/base/nsAccUtils.cpp b/accessible/src/base/nsAccUtils.cpp index f048737e98e9..7b828bf5e574 100644 --- a/accessible/src/base/nsAccUtils.cpp +++ b/accessible/src/base/nsAccUtils.cpp @@ -10,7 +10,7 @@ #include "nsARIAMap.h" #include "nsCoreUtils.h" #include "DocAccessible.h" -#include "nsHyperTextAccessible.h" +#include "HyperTextAccessible.h" #include "nsIAccessibleTypes.h" #include "Role.h" #include "States.h" @@ -254,7 +254,7 @@ nsAccUtils::IsARIASelected(Accessible* aAccessible) nsGkAtoms::_true, eCaseMatters); } -nsHyperTextAccessible* +HyperTextAccessible* nsAccUtils::GetTextAccessibleFromSelection(nsISelection* aSelection) { // Get accessible from selection's focus DOM point (the DOM point where @@ -283,7 +283,7 @@ nsAccUtils::GetTextAccessibleFromSelection(nsISelection* aSelection) } do { - nsHyperTextAccessible* textAcc = accessible->AsHyperText(); + HyperTextAccessible* textAcc = accessible->AsHyperText(); if (textAcc) return textAcc; diff --git a/accessible/src/base/nsAccUtils.h b/accessible/src/base/nsAccUtils.h index e6bc7cd465d1..62d7a5e86940 100644 --- a/accessible/src/base/nsAccUtils.h +++ b/accessible/src/base/nsAccUtils.h @@ -23,7 +23,7 @@ class nsAccessNode; class Accessible; -class nsHyperTextAccessible; +class HyperTextAccessible; class nsHTMLTableAccessible; class DocAccessible; struct nsRoleMapEntry; @@ -157,7 +157,7 @@ public: * @param aSelection [in] the given selection * @return text accessible */ - static nsHyperTextAccessible* + static HyperTextAccessible* GetTextAccessibleFromSelection(nsISelection* aSelection); /** diff --git a/accessible/src/base/nsAccessibilityService.cpp b/accessible/src/base/nsAccessibilityService.cpp index eabc98b50531..6f202174f908 100644 --- a/accessible/src/base/nsAccessibilityService.cpp +++ b/accessible/src/base/nsAccessibilityService.cpp @@ -14,6 +14,7 @@ #endif #include "FocusManager.h" #include "HTMLListAccessible.h" +#include "HyperTextAccessibleWrap.h" #include "nsAccessiblePivot.h" #include "nsAccUtils.h" #include "nsARIAMap.h" @@ -24,7 +25,6 @@ #include "nsHTMLSelectAccessible.h" #include "nsHTMLTableAccessibleWrap.h" #include "nsHTMLTextAccessible.h" -#include "nsHyperTextAccessibleWrap.h" #include "nsXFormsFormControlsAccessible.h" #include "nsXFormsWidgetsAccessible.h" #include "OuterDocAccessible.h" @@ -205,7 +205,7 @@ nsAccessibilityService::CreateHyperTextAccessible(nsIContent* aContent, nsIPresShell* aPresShell) { Accessible* accessible = - new nsHyperTextAccessibleWrap(aContent, GetDocAccessible(aPresShell)); + new HyperTextAccessibleWrap(aContent, GetDocAccessible(aPresShell)); NS_ADDREF(accessible); return accessible; } @@ -1052,7 +1052,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode, return nsnull; } - newAcc = new nsHyperTextAccessibleWrap(content, docAcc); + newAcc = new HyperTextAccessibleWrap(content, docAcc); if (docAcc->BindToDocument(newAcc, aria::GetRoleMap(aNode))) return newAcc; return nsnull; @@ -1227,7 +1227,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode, // other accessibles can point to it, or so that it can hold a state, etc. if (isHTML) { // Interesting HTML container which may have selectable text and/or embedded objects - newAcc = new nsHyperTextAccessibleWrap(content, docAcc); + newAcc = new HyperTextAccessibleWrap(content, docAcc); } else { // XUL, SVG, MathML etc. // Interesting generic non-HTML container @@ -1657,7 +1657,7 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame, nsRoleMapEntry* roleMapEntry = aria::GetRoleMap(aContent); if (roleMapEntry && roleMapEntry->role != roles::NOTHING && roleMapEntry->role != roles::LINK) { - Accessible* accessible = new nsHyperTextAccessibleWrap(aContent, aDoc); + Accessible* accessible = new HyperTextAccessibleWrap(aContent, aDoc); NS_IF_ADDREF(accessible); return accessible; } @@ -1690,7 +1690,7 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame, tag == nsGkAtoms::h5 || tag == nsGkAtoms::h6 || tag == nsGkAtoms::q) { - Accessible* accessible = new nsHyperTextAccessibleWrap(aContent, aDoc); + Accessible* accessible = new HyperTextAccessibleWrap(aContent, aDoc); NS_IF_ADDREF(accessible); return accessible; } diff --git a/accessible/src/base/nsAccessiblePivot.cpp b/accessible/src/base/nsAccessiblePivot.cpp index 38871dcb9d68..707e1ddef70c 100644 --- a/accessible/src/base/nsAccessiblePivot.cpp +++ b/accessible/src/base/nsAccessiblePivot.cpp @@ -7,9 +7,9 @@ #include "nsAccessiblePivot.h" #include "Accessible-inl.h" -#include "nsAccUtils.h" -#include "nsHyperTextAccessible.h" #include "DocAccessible.h" +#include "HyperTextAccessible.h" +#include "nsAccUtils.h" #include "States.h" #include "nsArrayUtils.h" @@ -155,7 +155,7 @@ nsAccessiblePivot::SetTextRange(nsIAccessibleText* aTextAccessible, (aStartOffset >= 0 || (aStartOffset != -1 && aEndOffset != -1)), NS_ERROR_INVALID_ARG); - nsRefPtr newPosition = do_QueryObject(aTextAccessible); + nsRefPtr newPosition = do_QueryObject(aTextAccessible); if (!newPosition || !IsRootDescendant(newPosition)) return NS_ERROR_INVALID_ARG; diff --git a/accessible/src/base/nsBaseWidgetAccessible.cpp b/accessible/src/base/nsBaseWidgetAccessible.cpp index 242aabd00098..4624eb4f18c9 100644 --- a/accessible/src/base/nsBaseWidgetAccessible.cpp +++ b/accessible/src/base/nsBaseWidgetAccessible.cpp @@ -6,10 +6,10 @@ #include "nsBaseWidgetAccessible.h" #include "Accessible-inl.h" +#include "HyperTextAccessibleWrap.h" #include "nsAccessibilityService.h" #include "nsAccUtils.h" #include "nsCoreUtils.h" -#include "nsHyperTextAccessibleWrap.h" #include "Role.h" #include "States.h" diff --git a/accessible/src/base/nsBaseWidgetAccessible.h b/accessible/src/base/nsBaseWidgetAccessible.h index 33adc28af4dd..5bdbb8b7d68c 100644 --- a/accessible/src/base/nsBaseWidgetAccessible.h +++ b/accessible/src/base/nsBaseWidgetAccessible.h @@ -7,7 +7,7 @@ #define _nsBaseWidgetAccessible_H_ #include "AccessibleWrap.h" -#include "nsHyperTextAccessibleWrap.h" +#include "HyperTextAccessibleWrap.h" #include "nsIContent.h" /** diff --git a/accessible/src/base/nsCaretAccessible.cpp b/accessible/src/base/nsCaretAccessible.cpp index f7dd71cb786a..f5ec59100d4a 100644 --- a/accessible/src/base/nsCaretAccessible.cpp +++ b/accessible/src/base/nsCaretAccessible.cpp @@ -243,7 +243,7 @@ nsCaretAccessible::NormalSelectionChanged(nsISelection* aSelection) return; // No selection } - nsHyperTextAccessible* textAcc = + HyperTextAccessible* textAcc = nsAccUtils::GetTextAccessibleFromSelection(aSelection); if (!textAcc) return; @@ -278,7 +278,7 @@ nsCaretAccessible::SpellcheckSelectionChanged(nsISelection* aSelection) // misspelled word). If spellchecking is disabled (for example, // @spellcheck="false" on html:body) then we won't fire any event. - nsHyperTextAccessible* textAcc = + HyperTextAccessible* textAcc = nsAccUtils::GetTextAccessibleFromSelection(aSelection); if (!textAcc) return; diff --git a/accessible/src/base/nsCaretAccessible.h b/accessible/src/base/nsCaretAccessible.h index 4662af461938..1a4c9ca212e2 100644 --- a/accessible/src/base/nsCaretAccessible.h +++ b/accessible/src/base/nsCaretAccessible.h @@ -6,8 +6,8 @@ #ifndef __nsCaretAccessible_h__ #define __nsCaretAccessible_h__ +#include "HyperTextAccessible.h" #include "NotificationController.h" -#include "nsHyperTextAccessible.h" #include "nsISelectionListener.h" @@ -118,7 +118,7 @@ private: // If it was on a control, then its control's selection. Otherwise, it's for // a document where the selection changed. nsCOMPtr mLastUsedSelection; // Weak ref to nsISelection - nsRefPtr mLastTextAccessible; + nsRefPtr mLastTextAccessible; PRInt32 mLastCaretOffset; mozilla::a11y::RootAccessible* mRootAccessible; diff --git a/accessible/src/generic/ARIAGridAccessible.cpp b/accessible/src/generic/ARIAGridAccessible.cpp index 4dae5f719f2f..6e95f6b5e1a5 100644 --- a/accessible/src/generic/ARIAGridAccessible.cpp +++ b/accessible/src/generic/ARIAGridAccessible.cpp @@ -774,7 +774,7 @@ ARIAGridAccessible::GetSelectedColumnsArray(PRUint32* aColumnCount, ARIAGridCellAccessible:: ARIAGridCellAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } @@ -782,7 +782,7 @@ ARIAGridCellAccessible:: // nsISupports NS_IMPL_ISUPPORTS_INHERITED1(ARIAGridCellAccessible, - nsHyperTextAccessible, + HyperTextAccessible, nsIAccessibleTableCell) //////////////////////////////////////////////////////////////////////////////// @@ -956,7 +956,7 @@ ARIAGridCellAccessible::IsSelected(bool* aIsSelected) void ARIAGridCellAccessible::ApplyARIAState(PRUint64* aState) const { - nsHyperTextAccessibleWrap::ApplyARIAState(aState); + HyperTextAccessibleWrap::ApplyARIAState(aState); // Return if the gridcell has aria-selected="true". if (*aState & states::SELECTED) @@ -982,7 +982,7 @@ ARIAGridCellAccessible::GetAttributesInternal(nsIPersistentProperties* aAttribut if (IsDefunct()) return NS_ERROR_FAILURE; - nsresult rv = nsHyperTextAccessibleWrap::GetAttributesInternal(aAttributes); + nsresult rv = HyperTextAccessibleWrap::GetAttributesInternal(aAttributes); NS_ENSURE_SUCCESS(rv, rv); // Expose "table-cell-index" attribute. diff --git a/accessible/src/generic/ARIAGridAccessible.h b/accessible/src/generic/ARIAGridAccessible.h index f3dd2caec2f7..c35effeb38aa 100644 --- a/accessible/src/generic/ARIAGridAccessible.h +++ b/accessible/src/generic/ARIAGridAccessible.h @@ -8,7 +8,7 @@ #include "nsIAccessibleTable.h" -#include "nsHyperTextAccessibleWrap.h" +#include "HyperTextAccessibleWrap.h" #include "TableAccessible.h" #include "xpcAccessibleTable.h" @@ -88,7 +88,7 @@ protected: /** * Accessible for ARIA gridcell and rowheader/columnheader. */ -class ARIAGridCellAccessible : public nsHyperTextAccessibleWrap, +class ARIAGridCellAccessible : public HyperTextAccessibleWrap, public nsIAccessibleTableCell { public: diff --git a/accessible/src/generic/Accessible.cpp b/accessible/src/generic/Accessible.cpp index d787fe49b911..293c10d9c46d 100644 --- a/accessible/src/generic/Accessible.cpp +++ b/accessible/src/generic/Accessible.cpp @@ -2736,7 +2736,7 @@ Accessible::StartOffset() { NS_PRECONDITION(IsLink(), "StartOffset is called not on hyper link!"); - nsHyperTextAccessible* hyperText = mParent ? mParent->AsHyperText() : nsnull; + HyperTextAccessible* hyperText = mParent ? mParent->AsHyperText() : nsnull; return hyperText ? hyperText->GetChildOffset(this) : 0; } @@ -2745,7 +2745,7 @@ Accessible::EndOffset() { NS_PRECONDITION(IsLink(), "EndOffset is called on not hyper link!"); - nsHyperTextAccessible* hyperText = mParent ? mParent->AsHyperText() : nsnull; + HyperTextAccessible* hyperText = mParent ? mParent->AsHyperText() : nsnull; return hyperText ? (hyperText->GetChildOffset(this) + 1) : 0; } diff --git a/accessible/src/generic/Accessible.h b/accessible/src/generic/Accessible.h index b2bb5baa6bba..226543f2c44a 100644 --- a/accessible/src/generic/Accessible.h +++ b/accessible/src/generic/Accessible.h @@ -26,7 +26,7 @@ class AccGroupInfo; class EmbeddedObjCollector; class KeyBinding; class Accessible; -class nsHyperTextAccessible; +class HyperTextAccessible; class nsHTMLImageAccessible; class nsHTMLImageMapAccessible; struct nsRoleMapEntry; @@ -244,7 +244,6 @@ public: */ virtual mozilla::a11y::GroupPos GroupPosition(); - /** /** * Used by ChildAtPoint() method to get direct or deepest child at point. */ @@ -473,7 +472,7 @@ public: DocAccessible* AsDoc(); inline bool IsHyperText() const { return mFlags & eHyperTextAccessible; } - nsHyperTextAccessible* AsHyperText(); + HyperTextAccessible* AsHyperText(); inline bool IsHTMLFileInput() const { return mFlags & eHTMLFileInputAccessible; } diff --git a/accessible/src/generic/DocAccessible.cpp b/accessible/src/generic/DocAccessible.cpp index e8bb4a104988..17d0585ce5c1 100644 --- a/accessible/src/generic/DocAccessible.cpp +++ b/accessible/src/generic/DocAccessible.cpp @@ -78,7 +78,7 @@ static const PRUint32 kRelationAttrsLen = NS_ARRAY_LENGTH(kRelationAttrs); DocAccessible:: DocAccessible(nsIDocument* aDocument, nsIContent* aRootContent, nsIPresShell* aPresShell) : - nsHyperTextAccessibleWrap(aRootContent, this), + HyperTextAccessibleWrap(aRootContent, this), mDocument(aDocument), mScrollPositionChangedTicks(0), mLoadState(eTreeConstructionPending), mLoadEventType(0), mVirtualCursor(nsnull), @@ -162,14 +162,13 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DocAccessible) nsresult status; if (!foundInterface) { - // HTML document accessible must inherit from nsHyperTextAccessible to get + // HTML document accessible must inherit from HyperTextAccessible to get // support text interfaces. XUL document accessible doesn't need this. // However at some point we may push to implement the interfaces and // return DocAccessible to inherit from AccessibleWrap. status = IsHyperText() ? - nsHyperTextAccessible::QueryInterface(aIID, - (void**)&foundInterface) : + HyperTextAccessible::QueryInterface(aIID, (void**)&foundInterface) : Accessible::QueryInterface(aIID, (void**)&foundInterface); } else { NS_ADDREF(foundInterface); @@ -180,8 +179,8 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DocAccessible) return status; } -NS_IMPL_ADDREF_INHERITED(DocAccessible, nsHyperTextAccessible) -NS_IMPL_RELEASE_INHERITED(DocAccessible, nsHyperTextAccessible) +NS_IMPL_ADDREF_INHERITED(DocAccessible, HyperTextAccessible) +NS_IMPL_RELEASE_INHERITED(DocAccessible, HyperTextAccessible) //////////////////////////////////////////////////////////////////////////////// // nsIAccessible @@ -531,7 +530,7 @@ DocAccessible::GetVirtualCursor(nsIAccessiblePivot** aVirtualCursor) return NS_OK; } -// nsHyperTextAccessible method +// HyperTextAccessible method already_AddRefed DocAccessible::GetEditor() const { @@ -663,7 +662,7 @@ DocAccessible::Shutdown() mNodeToAccessibleMap.Clear(); ClearCache(mAccessibleCache); - nsHyperTextAccessibleWrap::Shutdown(); + HyperTextAccessibleWrap::Shutdown(); GetAccService()->NotifyOfDocumentShutdown(kungFuDeathGripDoc); } @@ -1305,7 +1304,7 @@ DocAccessible::HandleAccEvent(AccEvent* aEvent) if (logging::IsEnabled(logging::eDocLoad)) logging::DocLoadEventHandled(aEvent); - return nsHyperTextAccessible::HandleAccEvent(aEvent); + return HyperTextAccessible::HandleAccEvent(aEvent); } #endif @@ -1762,7 +1761,7 @@ DocAccessible::ProcessPendingEvent(AccEvent* aEvent) { PRUint32 eventType = aEvent->GetEventType(); if (eventType == nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED) { - nsHyperTextAccessible* hyperText = aEvent->GetAccessible()->AsHyperText(); + HyperTextAccessible* hyperText = aEvent->GetAccessible()->AsHyperText(); PRInt32 caretOffset; if (hyperText && NS_SUCCEEDED(hyperText->GetCaretOffset(&caretOffset))) { diff --git a/accessible/src/generic/DocAccessible.h b/accessible/src/generic/DocAccessible.h index 89f116d4768c..a9f3d8db53c1 100644 --- a/accessible/src/generic/DocAccessible.h +++ b/accessible/src/generic/DocAccessible.h @@ -10,8 +10,8 @@ #include "nsIAccessibleDocument.h" #include "nsIAccessiblePivot.h" +#include "HyperTextAccessibleWrap.h" #include "nsEventShell.h" -#include "nsHyperTextAccessibleWrap.h" #include "NotificationController.h" #include "nsClassHashtable.h" @@ -31,7 +31,7 @@ class nsAccessiblePivot; const PRUint32 kDefaultCacheSize = 256; -class DocAccessible : public nsHyperTextAccessibleWrap, +class DocAccessible : public HyperTextAccessibleWrap, public nsIAccessibleDocument, public nsIDocumentObserver, public nsIObserver, @@ -91,7 +91,7 @@ public: virtual void GetBoundsRect(nsRect& aRect, nsIFrame** aRelativeFrame); - // nsHyperTextAccessible + // HyperTextAccessible virtual already_AddRefed GetEditor() const; // DocAccessible diff --git a/accessible/src/html/nsHyperTextAccessible.cpp b/accessible/src/generic/HyperTextAccessible.cpp similarity index 88% rename from accessible/src/html/nsHyperTextAccessible.cpp rename to accessible/src/generic/HyperTextAccessible.cpp index f8ca950621bb..dd3cde3f9023 100644 --- a/accessible/src/html/nsHyperTextAccessible.cpp +++ b/accessible/src/generic/HyperTextAccessible.cpp @@ -3,7 +3,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 "nsHyperTextAccessible.h" +#include "HyperTextAccessible.h" #include "Accessible-inl.h" #include "nsAccessibilityService.h" @@ -37,25 +37,26 @@ using namespace mozilla::a11y; //////////////////////////////////////////////////////////////////////////////// -// nsHyperTextAccessible +// HyperTextAccessible //////////////////////////////////////////////////////////////////////////////// -nsHyperTextAccessible:: - nsHyperTextAccessible(nsIContent* aNode, DocAccessible* aDoc) : +HyperTextAccessible:: + HyperTextAccessible(nsIContent* aNode, DocAccessible* aDoc) : AccessibleWrap(aNode, aDoc) { mFlags |= eHyperTextAccessible; } -NS_IMPL_ADDREF_INHERITED(nsHyperTextAccessible, AccessibleWrap) -NS_IMPL_RELEASE_INHERITED(nsHyperTextAccessible, AccessibleWrap) +NS_IMPL_ADDREF_INHERITED(HyperTextAccessible, AccessibleWrap) +NS_IMPL_RELEASE_INHERITED(HyperTextAccessible, AccessibleWrap) -nsresult nsHyperTextAccessible::QueryInterface(REFNSIID aIID, void** aInstancePtr) +nsresult +HyperTextAccessible::QueryInterface(REFNSIID aIID, void** aInstancePtr) { *aInstancePtr = nsnull; - if (aIID.Equals(NS_GET_IID(nsHyperTextAccessible))) { - *aInstancePtr = static_cast(this); + if (aIID.Equals(NS_GET_IID(HyperTextAccessible))) { + *aInstancePtr = static_cast(this); NS_ADDREF_THIS(); return NS_OK; } @@ -86,7 +87,7 @@ nsresult nsHyperTextAccessible::QueryInterface(REFNSIID aIID, void** aInstancePt } role -nsHyperTextAccessible::NativeRole() +HyperTextAccessible::NativeRole() { nsIAtom *tag = mContent->Tag(); @@ -127,7 +128,7 @@ nsHyperTextAccessible::NativeRole() } PRUint64 -nsHyperTextAccessible::NativeState() +HyperTextAccessible::NativeState() { PRUint64 states = AccessibleWrap::NativeState(); @@ -147,8 +148,9 @@ nsHyperTextAccessible::NativeState() } // Substring must be entirely within the same text node -nsIntRect nsHyperTextAccessible::GetBoundsForString(nsIFrame *aFrame, PRUint32 aStartRenderedOffset, - PRUint32 aEndRenderedOffset) +nsIntRect +HyperTextAccessible::GetBoundsForString(nsIFrame* aFrame, PRUint32 aStartRenderedOffset, + PRUint32 aEndRenderedOffset) { nsIntRect screenRect; NS_ENSURE_TRUE(aFrame, screenRect); @@ -215,11 +217,11 @@ nsIntRect nsHyperTextAccessible::GetBoundsForString(nsIFrame *aFrame, PRUint32 a * Gets the specified text. */ nsIFrame* -nsHyperTextAccessible::GetPosAndText(PRInt32& aStartOffset, PRInt32& aEndOffset, - nsAString *aText, nsIFrame **aEndFrame, - nsIntRect *aBoundsRect, - Accessible** aStartAcc, - Accessible** aEndAcc) +HyperTextAccessible::GetPosAndText(PRInt32& aStartOffset, PRInt32& aEndOffset, + nsAString* aText, nsIFrame** aEndFrame, + nsIntRect* aBoundsRect, + Accessible** aStartAcc, + Accessible** aEndAcc) { if (aStartOffset == nsIAccessibleText::TEXT_OFFSET_END_OF_TEXT) { aStartOffset = CharacterCount(); @@ -414,8 +416,8 @@ nsHyperTextAccessible::GetPosAndText(PRInt32& aStartOffset, PRInt32& aEndOffset, } NS_IMETHODIMP -nsHyperTextAccessible::GetText(PRInt32 aStartOffset, PRInt32 aEndOffset, - nsAString &aText) +HyperTextAccessible::GetText(PRInt32 aStartOffset, PRInt32 aEndOffset, + nsAString& aText) { aText.Truncate(); @@ -469,7 +471,8 @@ nsHyperTextAccessible::GetText(PRInt32 aStartOffset, PRInt32 aEndOffset, /* * Gets the character count. */ -NS_IMETHODIMP nsHyperTextAccessible::GetCharacterCount(PRInt32 *aCharacterCount) +NS_IMETHODIMP +HyperTextAccessible::GetCharacterCount(PRInt32* aCharacterCount) { NS_ENSURE_ARG_POINTER(aCharacterCount); *aCharacterCount = 0; @@ -484,7 +487,8 @@ NS_IMETHODIMP nsHyperTextAccessible::GetCharacterCount(PRInt32 *aCharacterCount) /* * Gets the specified character. */ -NS_IMETHODIMP nsHyperTextAccessible::GetCharacterAtOffset(PRInt32 aOffset, PRUnichar *aCharacter) +NS_IMETHODIMP +HyperTextAccessible::GetCharacterAtOffset(PRInt32 aOffset, PRUnichar* aCharacter) { NS_ENSURE_ARG_POINTER(aCharacter); *aCharacter = nsnull; @@ -502,10 +506,10 @@ NS_IMETHODIMP nsHyperTextAccessible::GetCharacterAtOffset(PRInt32 aOffset, PRUni } Accessible* -nsHyperTextAccessible::DOMPointToHypertextOffset(nsINode *aNode, - PRInt32 aNodeOffset, - PRInt32 *aHyperTextOffset, - bool aIsEndOffset) +HyperTextAccessible::DOMPointToHypertextOffset(nsINode* aNode, + PRInt32 aNodeOffset, + PRInt32* aHyperTextOffset, + bool aIsEndOffset) { if (!aHyperTextOffset) return nsnull; @@ -637,9 +641,9 @@ nsHyperTextAccessible::DOMPointToHypertextOffset(nsINode *aNode, } nsresult -nsHyperTextAccessible::HypertextOffsetToDOMPoint(PRInt32 aHTOffset, - nsIDOMNode **aNode, - PRInt32 *aOffset) +HyperTextAccessible::HypertextOffsetToDOMPoint(PRInt32 aHTOffset, + nsIDOMNode** aNode, + PRInt32* aOffset) { nsCOMPtr endNode; PRInt32 endOffset; @@ -649,12 +653,12 @@ nsHyperTextAccessible::HypertextOffsetToDOMPoint(PRInt32 aHTOffset, } nsresult -nsHyperTextAccessible::HypertextOffsetsToDOMRange(PRInt32 aStartHTOffset, - PRInt32 aEndHTOffset, - nsIDOMNode **aStartNode, - PRInt32 *aStartOffset, - nsIDOMNode **aEndNode, - PRInt32 *aEndOffset) +HyperTextAccessible::HypertextOffsetsToDOMRange(PRInt32 aStartHTOffset, + PRInt32 aEndHTOffset, + nsIDOMNode** aStartNode, + PRInt32* aStartOffset, + nsIDOMNode** aEndNode, + PRInt32* aEndOffset) { NS_ENSURE_ARG_POINTER(aStartNode); *aStartNode = nsnull; @@ -725,13 +729,13 @@ nsHyperTextAccessible::HypertextOffsetsToDOMRange(PRInt32 aStartHTOffset, } PRInt32 -nsHyperTextAccessible::GetRelativeOffset(nsIPresShell *aPresShell, - nsIFrame *aFromFrame, - PRInt32 aFromOffset, - Accessible* aFromAccessible, - nsSelectionAmount aAmount, - nsDirection aDirection, - bool aNeedsStart) +HyperTextAccessible::GetRelativeOffset(nsIPresShell* aPresShell, + nsIFrame* aFromFrame, + PRInt32 aFromOffset, + Accessible* aFromAccessible, + nsSelectionAmount aAmount, + nsDirection aDirection, + bool aNeedsStart) { const bool kIsJumpLinesOk = true; // okay to jump lines const bool kIsScrollViewAStop = false; // do not stop at scroll views @@ -834,9 +838,9 @@ BOUNDARY_LINE_END From the line end before/at/after the offset to the ne */ nsresult -nsHyperTextAccessible::GetTextHelper(EGetTextType aType, AccessibleTextBoundary aBoundaryType, - PRInt32 aOffset, PRInt32 *aStartOffset, PRInt32 *aEndOffset, - nsAString &aText) +HyperTextAccessible::GetTextHelper(EGetTextType aType, AccessibleTextBoundary aBoundaryType, + PRInt32 aOffset, PRInt32* aStartOffset, PRInt32* aEndOffset, + nsAString& aText) { aText.Truncate(); @@ -1017,8 +1021,10 @@ nsHyperTextAccessible::GetTextHelper(EGetTextType aType, AccessibleTextBoundary * nsIAccessibleText impl. */ NS_IMETHODIMP -nsHyperTextAccessible::GetTextBeforeOffset(PRInt32 aOffset, AccessibleTextBoundary aBoundaryType, - PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText) +HyperTextAccessible::GetTextBeforeOffset(PRInt32 aOffset, + AccessibleTextBoundary aBoundaryType, + PRInt32* aStartOffset, + PRInt32* aEndOffset, nsAString& aText) { if (aBoundaryType == BOUNDARY_CHAR) { GetCharAt(aOffset, eGetBefore, aText, aStartOffset, aEndOffset); @@ -1029,8 +1035,10 @@ nsHyperTextAccessible::GetTextBeforeOffset(PRInt32 aOffset, AccessibleTextBounda } NS_IMETHODIMP -nsHyperTextAccessible::GetTextAtOffset(PRInt32 aOffset, AccessibleTextBoundary aBoundaryType, - PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText) +HyperTextAccessible::GetTextAtOffset(PRInt32 aOffset, + AccessibleTextBoundary aBoundaryType, + PRInt32* aStartOffset, + PRInt32* aEndOffset, nsAString& aText) { if (aBoundaryType == BOUNDARY_CHAR) { GetCharAt(aOffset, eGetAt, aText, aStartOffset, aEndOffset); @@ -1041,8 +1049,8 @@ nsHyperTextAccessible::GetTextAtOffset(PRInt32 aOffset, AccessibleTextBoundary a } NS_IMETHODIMP -nsHyperTextAccessible::GetTextAfterOffset(PRInt32 aOffset, AccessibleTextBoundary aBoundaryType, - PRInt32 *aStartOffset, PRInt32 *aEndOffset, nsAString & aText) +HyperTextAccessible::GetTextAfterOffset(PRInt32 aOffset, AccessibleTextBoundary aBoundaryType, + PRInt32* aStartOffset, PRInt32* aEndOffset, nsAString& aText) { if (aBoundaryType == BOUNDARY_CHAR) { GetCharAt(aOffset, eGetAfter, aText, aStartOffset, aEndOffset); @@ -1058,11 +1066,11 @@ nsHyperTextAccessible::GetTextAfterOffset(PRInt32 aOffset, AccessibleTextBoundar // out long rangeStartOffset, // out long rangeEndOffset); NS_IMETHODIMP -nsHyperTextAccessible::GetTextAttributes(bool aIncludeDefAttrs, - PRInt32 aOffset, - PRInt32 *aStartOffset, - PRInt32 *aEndOffset, - nsIPersistentProperties **aAttributes) +HyperTextAccessible::GetTextAttributes(bool aIncludeDefAttrs, + PRInt32 aOffset, + PRInt32* aStartOffset, + PRInt32* aEndOffset, + nsIPersistentProperties** aAttributes) { // 1. Get each attribute and its ranges one after another. // 2. As we get each new attribute, we pass the current start and end offsets @@ -1134,7 +1142,7 @@ nsHyperTextAccessible::GetTextAttributes(bool aIncludeDefAttrs, // nsIPersistentProperties // nsIAccessibleText::defaultTextAttributes NS_IMETHODIMP -nsHyperTextAccessible::GetDefaultTextAttributes(nsIPersistentProperties **aAttributes) +HyperTextAccessible::GetDefaultTextAttributes(nsIPersistentProperties** aAttributes) { NS_ENSURE_ARG_POINTER(aAttributes); *aAttributes = nsnull; @@ -1154,7 +1162,7 @@ nsHyperTextAccessible::GetDefaultTextAttributes(nsIPersistentProperties **aAttri } PRInt32 -nsHyperTextAccessible::GetLevelInternal() +HyperTextAccessible::GetLevelInternal() { nsIAtom *tag = mContent->Tag(); if (tag == nsGkAtoms::h1) @@ -1174,7 +1182,7 @@ nsHyperTextAccessible::GetLevelInternal() } nsresult -nsHyperTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes) +HyperTextAccessible::GetAttributesInternal(nsIPersistentProperties* aAttributes) { nsresult rv = AccessibleWrap::GetAttributesInternal(aAttributes); NS_ENSURE_SUCCESS(rv, rv); @@ -1223,9 +1231,10 @@ nsHyperTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttribute /* * Given an offset, the x, y, width, and height values are filled appropriately. */ -NS_IMETHODIMP nsHyperTextAccessible::GetCharacterExtents(PRInt32 aOffset, PRInt32 *aX, PRInt32 *aY, - PRInt32 *aWidth, PRInt32 *aHeight, - PRUint32 aCoordType) +NS_IMETHODIMP +HyperTextAccessible::GetCharacterExtents(PRInt32 aOffset, PRInt32* aX, PRInt32* aY, + PRInt32* aWidth, PRInt32* aHeight, + PRUint32 aCoordType) { return GetRangeExtents(aOffset, aOffset + 1, aX, aY, aWidth, aHeight, aCoordType); } @@ -1233,10 +1242,11 @@ NS_IMETHODIMP nsHyperTextAccessible::GetCharacterExtents(PRInt32 aOffset, PRInt3 /* * Given a start & end offset, the x, y, width, and height values are filled appropriately. */ -NS_IMETHODIMP nsHyperTextAccessible::GetRangeExtents(PRInt32 aStartOffset, PRInt32 aEndOffset, - PRInt32 *aX, PRInt32 *aY, - PRInt32 *aWidth, PRInt32 *aHeight, - PRUint32 aCoordType) +NS_IMETHODIMP +HyperTextAccessible::GetRangeExtents(PRInt32 aStartOffset, PRInt32 aEndOffset, + PRInt32* aX, PRInt32* aY, + PRInt32* aWidth, PRInt32* aHeight, + PRUint32 aCoordType) { nsIntRect boundsRect; nsIFrame *endFrameUnused; @@ -1258,8 +1268,8 @@ NS_IMETHODIMP nsHyperTextAccessible::GetRangeExtents(PRInt32 aStartOffset, PRInt * the screen or this widget's window depending on coords. */ NS_IMETHODIMP -nsHyperTextAccessible::GetOffsetAtPoint(PRInt32 aX, PRInt32 aY, - PRUint32 aCoordType, PRInt32 *aOffset) +HyperTextAccessible::GetOffsetAtPoint(PRInt32 aX, PRInt32 aY, + PRUint32 aCoordType, PRInt32* aOffset) { *aOffset = -1; @@ -1339,7 +1349,7 @@ nsHyperTextAccessible::GetOffsetAtPoint(PRInt32 aX, PRInt32 aY, // nsIAccessibleHyperText NS_IMETHODIMP -nsHyperTextAccessible::GetLinkCount(PRInt32 *aLinkCount) +HyperTextAccessible::GetLinkCount(PRInt32* aLinkCount) { NS_ENSURE_ARG_POINTER(aLinkCount); *aLinkCount = 0; @@ -1352,7 +1362,7 @@ nsHyperTextAccessible::GetLinkCount(PRInt32 *aLinkCount) } NS_IMETHODIMP -nsHyperTextAccessible::GetLinkAt(PRInt32 aIndex, nsIAccessibleHyperLink** aLink) +HyperTextAccessible::GetLinkAt(PRInt32 aIndex, nsIAccessibleHyperLink** aLink) { NS_ENSURE_ARG_POINTER(aLink); *aLink = nsnull; @@ -1368,8 +1378,8 @@ nsHyperTextAccessible::GetLinkAt(PRInt32 aIndex, nsIAccessibleHyperLink** aLink) } NS_IMETHODIMP -nsHyperTextAccessible::GetLinkIndex(nsIAccessibleHyperLink* aLink, - PRInt32* aIndex) +HyperTextAccessible::GetLinkIndex(nsIAccessibleHyperLink* aLink, + PRInt32* aIndex) { NS_ENSURE_ARG_POINTER(aLink); @@ -1382,8 +1392,7 @@ nsHyperTextAccessible::GetLinkIndex(nsIAccessibleHyperLink* aLink, } NS_IMETHODIMP -nsHyperTextAccessible::GetLinkIndexAtOffset(PRInt32 aOffset, - PRInt32* aLinkIndex) +HyperTextAccessible::GetLinkIndexAtOffset(PRInt32 aOffset, PRInt32* aLinkIndex) { NS_ENSURE_ARG_POINTER(aLinkIndex); *aLinkIndex = -1; // API says this magic value means 'not found' @@ -1398,13 +1407,15 @@ nsHyperTextAccessible::GetLinkIndexAtOffset(PRInt32 aOffset, /** * nsIAccessibleEditableText impl. */ -NS_IMETHODIMP nsHyperTextAccessible::SetAttributes(PRInt32 aStartPos, PRInt32 aEndPos, - nsISupports *aAttributes) +NS_IMETHODIMP +HyperTextAccessible::SetAttributes(PRInt32 aStartPos, PRInt32 aEndPos, + nsISupports* aAttributes) { return NS_ERROR_NOT_IMPLEMENTED; } -NS_IMETHODIMP nsHyperTextAccessible::SetTextContents(const nsAString &aText) +NS_IMETHODIMP +HyperTextAccessible::SetTextContents(const nsAString& aText) { PRInt32 numChars = CharacterCount(); if (numChars == 0 || NS_SUCCEEDED(DeleteText(0, numChars))) { @@ -1414,7 +1425,7 @@ NS_IMETHODIMP nsHyperTextAccessible::SetTextContents(const nsAString &aText) } NS_IMETHODIMP -nsHyperTextAccessible::InsertText(const nsAString &aText, PRInt32 aPosition) +HyperTextAccessible::InsertText(const nsAString& aText, PRInt32 aPosition) { if (IsDefunct()) return NS_ERROR_FAILURE; @@ -1431,7 +1442,7 @@ nsHyperTextAccessible::InsertText(const nsAString &aText, PRInt32 aPosition) } NS_IMETHODIMP -nsHyperTextAccessible::CopyText(PRInt32 aStartPos, PRInt32 aEndPos) +HyperTextAccessible::CopyText(PRInt32 aStartPos, PRInt32 aEndPos) { if (IsDefunct()) return NS_ERROR_FAILURE; @@ -1446,7 +1457,7 @@ nsHyperTextAccessible::CopyText(PRInt32 aStartPos, PRInt32 aEndPos) } NS_IMETHODIMP -nsHyperTextAccessible::CutText(PRInt32 aStartPos, PRInt32 aEndPos) +HyperTextAccessible::CutText(PRInt32 aStartPos, PRInt32 aEndPos) { if (IsDefunct()) return NS_ERROR_FAILURE; @@ -1461,7 +1472,7 @@ nsHyperTextAccessible::CutText(PRInt32 aStartPos, PRInt32 aEndPos) } NS_IMETHODIMP -nsHyperTextAccessible::DeleteText(PRInt32 aStartPos, PRInt32 aEndPos) +HyperTextAccessible::DeleteText(PRInt32 aStartPos, PRInt32 aEndPos) { if (IsDefunct()) return NS_ERROR_FAILURE; @@ -1476,7 +1487,7 @@ nsHyperTextAccessible::DeleteText(PRInt32 aStartPos, PRInt32 aEndPos) } NS_IMETHODIMP -nsHyperTextAccessible::PasteText(PRInt32 aPosition) +HyperTextAccessible::PasteText(PRInt32 aPosition) { if (IsDefunct()) return NS_ERROR_FAILURE; @@ -1491,13 +1502,13 @@ nsHyperTextAccessible::PasteText(PRInt32 aPosition) } already_AddRefed -nsHyperTextAccessible::GetEditor() const +HyperTextAccessible::GetEditor() const { if (!mContent->HasFlag(NODE_IS_EDITABLE)) { // If we're inside an editable container, then return that container's editor Accessible* ancestor = Parent(); while (ancestor) { - nsHyperTextAccessible* hyperText = ancestor->AsHyperText(); + HyperTextAccessible* hyperText = ancestor->AsHyperText(); if (hyperText) { // Recursion will stop at container doc because it has its own impl // of GetEditor() @@ -1528,7 +1539,7 @@ nsHyperTextAccessible::GetEditor() const */ nsresult -nsHyperTextAccessible::SetSelectionRange(PRInt32 aStartPos, PRInt32 aEndPos) +HyperTextAccessible::SetSelectionRange(PRInt32 aStartPos, PRInt32 aEndPos) { bool isFocusable = State() & states::FOCUSABLE; @@ -1581,7 +1592,7 @@ nsHyperTextAccessible::SetSelectionRange(PRInt32 aStartPos, PRInt32 aEndPos) } NS_IMETHODIMP -nsHyperTextAccessible::SetCaretOffset(PRInt32 aCaretOffset) +HyperTextAccessible::SetCaretOffset(PRInt32 aCaretOffset) { return SetSelectionRange(aCaretOffset, aCaretOffset); } @@ -1590,7 +1601,7 @@ nsHyperTextAccessible::SetCaretOffset(PRInt32 aCaretOffset) * Gets the offset position of the caret (cursor). */ NS_IMETHODIMP -nsHyperTextAccessible::GetCaretOffset(PRInt32 *aCaretOffset) +HyperTextAccessible::GetCaretOffset(PRInt32* aCaretOffset) { NS_ENSURE_ARG_POINTER(aCaretOffset); *aCaretOffset = -1; @@ -1647,7 +1658,7 @@ nsHyperTextAccessible::GetCaretOffset(PRInt32 *aCaretOffset) } PRInt32 -nsHyperTextAccessible::CaretLineNumber() +HyperTextAccessible::CaretLineNumber() { // Provide the line number for the caret, relative to the // currently focused node. Use a 1-based index @@ -1714,15 +1725,15 @@ nsHyperTextAccessible::CaretLineNumber() } already_AddRefed -nsHyperTextAccessible::FrameSelection() +HyperTextAccessible::FrameSelection() { nsIFrame* frame = GetFrame(); return frame ? frame->GetFrameSelection() : nsnull; } void -nsHyperTextAccessible::GetSelectionDOMRanges(PRInt16 aType, - nsTArray* aRanges) +HyperTextAccessible::GetSelectionDOMRanges(PRInt16 aType, + nsTArray* aRanges) { nsRefPtr frameSelection = FrameSelection(); if (!frameSelection) @@ -1765,7 +1776,7 @@ nsHyperTextAccessible::GetSelectionDOMRanges(PRInt16 aType, * Gets the number of selected regions. */ NS_IMETHODIMP -nsHyperTextAccessible::GetSelectionCount(PRInt32* aSelectionCount) +HyperTextAccessible::GetSelectionCount(PRInt32* aSelectionCount) { NS_ENSURE_ARG_POINTER(aSelectionCount); *aSelectionCount = 0; @@ -1781,9 +1792,9 @@ nsHyperTextAccessible::GetSelectionCount(PRInt32* aSelectionCount) * Gets the start and end offset of the specified selection. */ NS_IMETHODIMP -nsHyperTextAccessible::GetSelectionBounds(PRInt32 aSelectionNum, - PRInt32* aStartOffset, - PRInt32* aEndOffset) +HyperTextAccessible::GetSelectionBounds(PRInt32 aSelectionNum, + PRInt32* aStartOffset, + PRInt32* aEndOffset) { NS_ENSURE_ARG_POINTER(aStartOffset); NS_ENSURE_ARG_POINTER(aEndOffset); @@ -1830,9 +1841,9 @@ nsHyperTextAccessible::GetSelectionBounds(PRInt32 aSelectionNum, * Changes the start and end offset of the specified selection. */ NS_IMETHODIMP -nsHyperTextAccessible::SetSelectionBounds(PRInt32 aSelectionNum, - PRInt32 aStartOffset, - PRInt32 aEndOffset) +HyperTextAccessible::SetSelectionBounds(PRInt32 aSelectionNum, + PRInt32 aStartOffset, + PRInt32 aEndOffset) { nsRefPtr frameSelection = FrameSelection(); NS_ENSURE_STATE(frameSelection); @@ -1887,7 +1898,7 @@ nsHyperTextAccessible::SetSelectionBounds(PRInt32 aSelectionNum, * Adds a selection bounded by the specified offsets. */ NS_IMETHODIMP -nsHyperTextAccessible::AddSelection(PRInt32 aStartOffset, PRInt32 aEndOffset) +HyperTextAccessible::AddSelection(PRInt32 aStartOffset, PRInt32 aEndOffset) { nsRefPtr frameSelection = FrameSelection(); NS_ENSURE_STATE(frameSelection); @@ -1906,7 +1917,7 @@ nsHyperTextAccessible::AddSelection(PRInt32 aStartOffset, PRInt32 aEndOffset) * Removes the specified selection. */ NS_IMETHODIMP -nsHyperTextAccessible::RemoveSelection(PRInt32 aSelectionNum) +HyperTextAccessible::RemoveSelection(PRInt32 aSelectionNum) { nsRefPtr frameSelection = FrameSelection(); NS_ENSURE_STATE(frameSelection); @@ -1929,8 +1940,8 @@ nsHyperTextAccessible::RemoveSelection(PRInt32 aSelectionNum) // scrollSubstringTo(in long startIndex, in long endIndex, // in unsigned long scrollType); NS_IMETHODIMP -nsHyperTextAccessible::ScrollSubstringTo(PRInt32 aStartIndex, PRInt32 aEndIndex, - PRUint32 aScrollType) +HyperTextAccessible::ScrollSubstringTo(PRInt32 aStartIndex, PRInt32 aEndIndex, + PRUint32 aScrollType) { PRInt32 startOffset, endOffset; nsCOMPtr startNode, endNode; @@ -1951,10 +1962,10 @@ nsHyperTextAccessible::ScrollSubstringTo(PRInt32 aStartIndex, PRInt32 aEndIndex, // in unsigned long coordinateType, // in long x, in long y); NS_IMETHODIMP -nsHyperTextAccessible::ScrollSubstringToPoint(PRInt32 aStartIndex, - PRInt32 aEndIndex, - PRUint32 aCoordinateType, - PRInt32 aX, PRInt32 aY) +HyperTextAccessible::ScrollSubstringToPoint(PRInt32 aStartIndex, + PRInt32 aEndIndex, + PRUint32 aCoordinateType, + PRInt32 aX, PRInt32 aY) { nsIFrame *frame = GetFrame(); if (!frame) @@ -2023,7 +2034,7 @@ nsHyperTextAccessible::ScrollSubstringToPoint(PRInt32 aStartIndex, // Accessible public nsresult -nsHyperTextAccessible::GetNameInternal(nsAString& aName) +HyperTextAccessible::GetNameInternal(nsAString& aName) { nsresult rv = AccessibleWrap::GetNameInternal(aName); NS_ENSURE_SUCCESS(rv, rv); @@ -2042,7 +2053,7 @@ nsHyperTextAccessible::GetNameInternal(nsAString& aName) } void -nsHyperTextAccessible::InvalidateChildren() +HyperTextAccessible::InvalidateChildren() { mOffsets.Clear(); @@ -2050,7 +2061,7 @@ nsHyperTextAccessible::InvalidateChildren() } bool -nsHyperTextAccessible::RemoveChild(Accessible* aAccessible) +HyperTextAccessible::RemoveChild(Accessible* aAccessible) { PRInt32 childIndex = aAccessible->IndexInParent(); PRInt32 count = mOffsets.Length() - childIndex; @@ -2061,10 +2072,11 @@ nsHyperTextAccessible::RemoveChild(Accessible* aAccessible) } //////////////////////////////////////////////////////////////////////////////// -// nsHyperTextAccessible public static +// HyperTextAccessible public static -nsresult nsHyperTextAccessible::ContentToRenderedOffset(nsIFrame *aFrame, PRInt32 aContentOffset, - PRUint32 *aRenderedOffset) +nsresult +HyperTextAccessible::ContentToRenderedOffset(nsIFrame* aFrame, PRInt32 aContentOffset, + PRUint32* aRenderedOffset) { if (!aFrame) { // Current frame not rendered -- this can happen if text is set on @@ -2092,8 +2104,9 @@ nsresult nsHyperTextAccessible::ContentToRenderedOffset(nsIFrame *aFrame, PRInt3 return NS_OK; } -nsresult nsHyperTextAccessible::RenderedToContentOffset(nsIFrame *aFrame, PRUint32 aRenderedOffset, - PRInt32 *aContentOffset) +nsresult +HyperTextAccessible::RenderedToContentOffset(nsIFrame* aFrame, PRUint32 aRenderedOffset, + PRInt32* aContentOffset) { *aContentOffset = 0; NS_ENSURE_TRUE(aFrame, NS_ERROR_FAILURE); @@ -2118,12 +2131,12 @@ nsresult nsHyperTextAccessible::RenderedToContentOffset(nsIFrame *aFrame, PRUint } //////////////////////////////////////////////////////////////////////////////// -// nsHyperTextAccessible public +// HyperTextAccessible public bool -nsHyperTextAccessible::GetCharAt(PRInt32 aOffset, EGetTextType aShift, - nsAString& aChar, PRInt32* aStartOffset, - PRInt32* aEndOffset) +HyperTextAccessible::GetCharAt(PRInt32 aOffset, EGetTextType aShift, + nsAString& aChar, PRInt32* aStartOffset, + PRInt32* aEndOffset) { aChar.Truncate(); @@ -2144,8 +2157,8 @@ nsHyperTextAccessible::GetCharAt(PRInt32 aOffset, EGetTextType aShift, } PRInt32 -nsHyperTextAccessible::GetChildOffset(PRUint32 aChildIndex, - bool aInvalidateAfter) +HyperTextAccessible::GetChildOffset(PRUint32 aChildIndex, + bool aInvalidateAfter) { if (aChildIndex == 0) { if (aInvalidateAfter) @@ -2175,7 +2188,7 @@ nsHyperTextAccessible::GetChildOffset(PRUint32 aChildIndex, } PRInt32 -nsHyperTextAccessible::GetChildIndexAtOffset(PRUint32 aOffset) +HyperTextAccessible::GetChildIndexAtOffset(PRUint32 aOffset) { PRUint32 lastOffset = 0; PRUint32 offsetCount = mOffsets.Length(); @@ -2216,14 +2229,14 @@ nsHyperTextAccessible::GetChildIndexAtOffset(PRUint32 aOffset) } //////////////////////////////////////////////////////////////////////////////// -// nsHyperTextAccessible protected +// HyperTextAccessible protected nsresult -nsHyperTextAccessible::GetDOMPointByFrameOffset(nsIFrame* aFrame, - PRInt32 aOffset, - Accessible* aAccessible, - nsIDOMNode** aNode, - PRInt32* aNodeOffset) +HyperTextAccessible::GetDOMPointByFrameOffset(nsIFrame* aFrame, + PRInt32 aOffset, + Accessible* aAccessible, + nsIDOMNode** aNode, + PRInt32* aNodeOffset) { NS_ENSURE_ARG(aAccessible); @@ -2268,12 +2281,12 @@ nsHyperTextAccessible::GetDOMPointByFrameOffset(nsIFrame* aFrame, return NS_OK; } -// nsHyperTextAccessible +// HyperTextAccessible nsresult -nsHyperTextAccessible::RangeBoundToHypertextOffset(nsRange *aRange, - bool aIsStartBound, - bool aIsStartHTOffset, - PRInt32 *aHTOffset) +HyperTextAccessible::RangeBoundToHypertextOffset(nsRange* aRange, + bool aIsStartBound, + bool aIsStartHTOffset, + PRInt32* aHTOffset) { nsINode* node = nsnull; PRInt32 nodeOffset = 0; @@ -2295,13 +2308,13 @@ nsHyperTextAccessible::RangeBoundToHypertextOffset(nsRange *aRange, return NS_OK; } -// nsHyperTextAccessible +// HyperTextAccessible nsresult -nsHyperTextAccessible::GetSpellTextAttribute(nsINode* aNode, - PRInt32 aNodeOffset, - PRInt32 *aHTStartOffset, - PRInt32 *aHTEndOffset, - nsIPersistentProperties *aAttributes) +HyperTextAccessible::GetSpellTextAttribute(nsINode* aNode, + PRInt32 aNodeOffset, + PRInt32* aHTStartOffset, + PRInt32* aHTEndOffset, + nsIPersistentProperties* aAttributes) { nsTArray ranges; GetSelectionDOMRanges(nsISelectionController::SELECTION_SPELLCHECK, &ranges); @@ -2372,7 +2385,7 @@ nsHyperTextAccessible::GetSpellTextAttribute(nsINode* aNode, } bool -nsHyperTextAccessible::IsTextRole() +HyperTextAccessible::IsTextRole() { if (mRoleMapEntry && (mRoleMapEntry->role == roles::GRAPHIC || diff --git a/accessible/src/html/nsHyperTextAccessible.h b/accessible/src/generic/HyperTextAccessible.h similarity index 94% rename from accessible/src/html/nsHyperTextAccessible.h rename to accessible/src/generic/HyperTextAccessible.h index 08ec9bfc65c9..bf0a4b6c1c01 100644 --- a/accessible/src/html/nsHyperTextAccessible.h +++ b/accessible/src/generic/HyperTextAccessible.h @@ -3,8 +3,8 @@ * 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 _nsHyperTextAccessible_H_ -#define _nsHyperTextAccessible_H_ +#ifndef mozilla_a11y_HyperTextAccessible_h__ +#define mozilla_a11y_HyperTextAccessible_h__ #include "nsIAccessibleText.h" #include "nsIAccessibleHyperText.h" @@ -35,14 +35,14 @@ const PRUnichar kForcedNewLineChar = '\n'; /** * Special Accessible that knows how contain both text and embedded objects */ -class nsHyperTextAccessible : public AccessibleWrap, - public nsIAccessibleText, - public nsIAccessibleHyperText, - public nsIAccessibleEditableText +class HyperTextAccessible : public AccessibleWrap, + public nsIAccessibleText, + public nsIAccessibleHyperText, + public nsIAccessibleEditableText { public: - nsHyperTextAccessible(nsIContent* aContent, DocAccessible* aDoc); - virtual ~nsHyperTextAccessible() { } + HyperTextAccessible(nsIContent* aContent, DocAccessible* aDoc); + virtual ~HyperTextAccessible() { } NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSIACCESSIBLETEXT @@ -60,7 +60,7 @@ public: virtual void InvalidateChildren(); virtual bool RemoveChild(Accessible* aAccessible); - // nsHyperTextAccessible (static helper method) + // HyperTextAccessible (static helper method) // Convert content offset to rendered text offset static nsresult ContentToRenderedOffset(nsIFrame *aFrame, PRInt32 aContentOffset, @@ -107,7 +107,7 @@ public: } ////////////////////////////////////////////////////////////////////////////// - // nsHyperTextAccessible: DOM point to text offset conversions. + // HyperTextAccessible: DOM point to text offset conversions. /** * Turn a DOM Node and offset into a character offset into this hypertext. @@ -121,7 +121,7 @@ public: * if >=0 and aNode is text, this represents a char offset * if >=0 and aNode is not text, this represents a child node offset * @param aResultOffset - the character offset into the current - * nsHyperTextAccessible + * HyperTextAccessible * @param aIsEndOffset - if true, then then this offset is not inclusive. The character * indicated by the offset returned is at [offset - 1]. This means * if the passed-in offset is really in a descendant, then the offset returned @@ -131,7 +131,7 @@ public: * descendant, then the returned offset will be on the relevant embedded object char. * * @return the accessible child which contained the offset, if - * it is within the current nsHyperTextAccessible, + * it is within the current HyperTextAccessible, * otherwise nsnull */ Accessible* DOMPointToHypertextOffset(nsINode *aNode, @@ -261,7 +261,7 @@ public: virtual already_AddRefed GetEditor() const; protected: - // nsHyperTextAccessible + // HyperTextAccessible /** * Transform magic offset into text offset. @@ -410,19 +410,19 @@ private: nsTArray mOffsets; }; -NS_DEFINE_STATIC_IID_ACCESSOR(nsHyperTextAccessible, +NS_DEFINE_STATIC_IID_ACCESSOR(HyperTextAccessible, NS_HYPERTEXTACCESSIBLE_IMPL_CID) //////////////////////////////////////////////////////////////////////////////// // Accessible downcasting method -inline nsHyperTextAccessible* +inline HyperTextAccessible* Accessible::AsHyperText() { return mFlags & eHyperTextAccessible ? - static_cast(this) : nsnull; + static_cast(this) : nsnull; } -#endif // _nsHyperTextAccessible_H_ +#endif diff --git a/accessible/src/generic/Makefile.in b/accessible/src/generic/Makefile.in index c671722a92d3..383c679a7457 100644 --- a/accessible/src/generic/Makefile.in +++ b/accessible/src/generic/Makefile.in @@ -20,10 +20,12 @@ CPPSRCS = \ ARIAGridAccessible.cpp \ DocAccessible.cpp \ FormControlAccessible.cpp \ + HyperTextAccessible.cpp \ OuterDocAccessible.cpp \ RootAccessible.cpp \ TextLeafAccessible.cpp \ $(NULL) + EXPORTS_NAMESPACES = mozilla/a11y EXPORTS_mozilla/a11y = \ diff --git a/accessible/src/html/HTMLFormControlAccessible.cpp b/accessible/src/html/HTMLFormControlAccessible.cpp index 5333998bea5b..0853943c898b 100644 --- a/accessible/src/html/HTMLFormControlAccessible.cpp +++ b/accessible/src/html/HTMLFormControlAccessible.cpp @@ -204,7 +204,7 @@ HTMLRadioButtonAccessible::GetPositionAndSizeInternal(PRInt32* aPosInSet, HTMLButtonAccessible:: HTMLButtonAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } @@ -237,7 +237,7 @@ HTMLButtonAccessible::DoAction(PRUint8 aIndex) PRUint64 HTMLButtonAccessible::State() { - PRUint64 state = nsHyperTextAccessibleWrap::State(); + PRUint64 state = HyperTextAccessibleWrap::State(); if (state == states::DEFUNCT) return state; @@ -256,7 +256,7 @@ HTMLButtonAccessible::State() PRUint64 HTMLButtonAccessible::NativeState() { - PRUint64 state = nsHyperTextAccessibleWrap::NativeState(); + PRUint64 state = HyperTextAccessibleWrap::NativeState(); nsEventStates elmState = mContent->AsElement()->State(); if (elmState.HasState(NS_EVENT_STATE_DEFAULT)) @@ -320,13 +320,13 @@ HTMLButtonAccessible::IsWidget() const HTMLTextFieldAccessible:: HTMLTextFieldAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } NS_IMPL_ISUPPORTS_INHERITED3(HTMLTextFieldAccessible, Accessible, - nsHyperTextAccessible, + HyperTextAccessible, nsIAccessibleText, nsIAccessibleEditableText) @@ -393,7 +393,7 @@ HTMLTextFieldAccessible::Value(nsString& aValue) void HTMLTextFieldAccessible::ApplyARIAState(PRUint64* aState) const { - nsHyperTextAccessibleWrap::ApplyARIAState(aState); + HyperTextAccessibleWrap::ApplyARIAState(aState); aria::MapToState(aria::eARIAAutoComplete, mContent->AsElement(), aState); } @@ -401,7 +401,7 @@ HTMLTextFieldAccessible::ApplyARIAState(PRUint64* aState) const PRUint64 HTMLTextFieldAccessible::State() { - PRUint64 state = nsHyperTextAccessibleWrap::State(); + PRUint64 state = HyperTextAccessibleWrap::State(); if (state & states::DEFUNCT) return state; @@ -420,7 +420,7 @@ HTMLTextFieldAccessible::State() PRUint64 HTMLTextFieldAccessible::NativeState() { - PRUint64 state = nsHyperTextAccessibleWrap::NativeState(); + PRUint64 state = HyperTextAccessibleWrap::NativeState(); // can be focusable, focused, protected. readonly, unavailable, selected if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type, @@ -557,7 +557,7 @@ HTMLTextFieldAccessible::ContainerWidget() const HTMLFileInputAccessible:: HTMLFileInputAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { mFlags |= eHTMLFileInputAccessible; } @@ -573,7 +573,7 @@ HTMLFileInputAccessible::NativeRole() nsresult HTMLFileInputAccessible::HandleAccEvent(AccEvent* aEvent) { - nsresult rv = nsHyperTextAccessibleWrap::HandleAccEvent(aEvent); + nsresult rv = HyperTextAccessibleWrap::HandleAccEvent(aEvent); NS_ENSURE_SUCCESS(rv, rv); // Redirect state change events for inherited states to child controls. Note, @@ -612,7 +612,7 @@ HTMLFileInputAccessible::HandleAccEvent(AccEvent* aEvent) HTMLGroupboxAccessible:: HTMLGroupboxAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } @@ -658,7 +658,7 @@ HTMLGroupboxAccessible::GetNameInternal(nsAString& aName) Relation HTMLGroupboxAccessible::RelationByType(PRUint32 aType) { - Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType); + Relation rel = HyperTextAccessibleWrap::RelationByType(aType); // No override for label, so use for this
if (aType == nsIAccessibleRelation::RELATION_LABELLED_BY) rel.AppendTarget(mDoc, GetLegend()); @@ -672,14 +672,14 @@ HTMLGroupboxAccessible::RelationByType(PRUint32 aType) HTMLLegendAccessible:: HTMLLegendAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } Relation HTMLLegendAccessible::RelationByType(PRUint32 aType) { - Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType); + Relation rel = HyperTextAccessibleWrap::RelationByType(aType); if (aType != nsIAccessibleRelation::RELATION_LABEL_FOR) return rel; @@ -702,14 +702,14 @@ HTMLLegendAccessible::NativeRole() HTMLFigureAccessible:: HTMLFigureAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } nsresult HTMLFigureAccessible::GetAttributesInternal(nsIPersistentProperties* aAttributes) { - nsresult rv = nsHyperTextAccessibleWrap::GetAttributesInternal(aAttributes); + nsresult rv = HyperTextAccessibleWrap::GetAttributesInternal(aAttributes); NS_ENSURE_SUCCESS(rv, rv); // Expose figure xml-role. @@ -727,7 +727,7 @@ HTMLFigureAccessible::NativeRole() nsresult HTMLFigureAccessible::GetNameInternal(nsAString& aName) { - nsresult rv = nsHyperTextAccessibleWrap::GetNameInternal(aName); + nsresult rv = HyperTextAccessibleWrap::GetNameInternal(aName); NS_ENSURE_SUCCESS(rv, rv); if (!aName.IsEmpty()) @@ -745,7 +745,7 @@ HTMLFigureAccessible::GetNameInternal(nsAString& aName) Relation HTMLFigureAccessible::RelationByType(PRUint32 aType) { - Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType); + Relation rel = HyperTextAccessibleWrap::RelationByType(aType); if (aType == nsIAccessibleRelation::RELATION_LABELLED_BY) rel.AppendTarget(mDoc, Caption()); @@ -772,7 +772,7 @@ HTMLFigureAccessible::Caption() const HTMLFigcaptionAccessible:: HTMLFigcaptionAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } @@ -785,7 +785,7 @@ HTMLFigcaptionAccessible::NativeRole() Relation HTMLFigcaptionAccessible::RelationByType(PRUint32 aType) { - Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType); + Relation rel = HyperTextAccessibleWrap::RelationByType(aType); if (aType != nsIAccessibleRelation::RELATION_LABEL_FOR) return rel; diff --git a/accessible/src/html/HTMLFormControlAccessible.h b/accessible/src/html/HTMLFormControlAccessible.h index 6deb55d83396..21f9f6329ffd 100644 --- a/accessible/src/html/HTMLFormControlAccessible.h +++ b/accessible/src/html/HTMLFormControlAccessible.h @@ -7,7 +7,7 @@ #define MOZILLA_A11Y_HTMLFormControlAccessible_H_ #include "FormControlAccessible.h" -#include "nsHyperTextAccessibleWrap.h" +#include "HyperTextAccessibleWrap.h" namespace mozilla { namespace a11y { @@ -64,7 +64,7 @@ public: * Accessible for HTML input@type="button", @type="submit", @type="image" * and HTML button elements. */ -class HTMLButtonAccessible : public nsHyperTextAccessibleWrap +class HTMLButtonAccessible : public HyperTextAccessibleWrap { public: @@ -93,7 +93,7 @@ public: /** * Accessible for HTML input@type="text" element. */ -class HTMLTextFieldAccessible : public nsHyperTextAccessibleWrap +class HTMLTextFieldAccessible : public HyperTextAccessibleWrap { public: @@ -107,7 +107,7 @@ public: NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName); NS_IMETHOD DoAction(PRUint8 index); - // nsHyperTextAccessible + // HyperTextAccessible virtual already_AddRefed GetEditor() const; // Accessible @@ -130,7 +130,7 @@ public: /** * Accessible for input@type="file" element. */ -class HTMLFileInputAccessible : public nsHyperTextAccessibleWrap +class HTMLFileInputAccessible : public HyperTextAccessibleWrap { public: HTMLFileInputAccessible(nsIContent* aContent, DocAccessible* aDoc); @@ -143,7 +143,7 @@ public: /** * Accessible for HTML fieldset element. */ -class HTMLGroupboxAccessible : public nsHyperTextAccessibleWrap +class HTMLGroupboxAccessible : public HyperTextAccessibleWrap { public: HTMLGroupboxAccessible(nsIContent* aContent, DocAccessible* aDoc); @@ -161,7 +161,7 @@ protected: /** * Accessible for HTML legend element. */ -class HTMLLegendAccessible : public nsHyperTextAccessibleWrap +class HTMLLegendAccessible : public HyperTextAccessibleWrap { public: HTMLLegendAccessible(nsIContent* aContent, DocAccessible* aDoc); @@ -174,7 +174,7 @@ public: /** * Accessible for HTML5 figure element. */ -class HTMLFigureAccessible : public nsHyperTextAccessibleWrap +class HTMLFigureAccessible : public HyperTextAccessibleWrap { public: HTMLFigureAccessible(nsIContent* aContent, DocAccessible* aDoc); @@ -193,7 +193,7 @@ protected: /** * Accessible for HTML5 figcaption element. */ -class HTMLFigcaptionAccessible : public nsHyperTextAccessibleWrap +class HTMLFigcaptionAccessible : public HyperTextAccessibleWrap { public: HTMLFigcaptionAccessible(nsIContent* aContent, DocAccessible* aDoc); diff --git a/accessible/src/html/HTMLListAccessible.cpp b/accessible/src/html/HTMLListAccessible.cpp index bf0b74e24fcb..aef759281784 100644 --- a/accessible/src/html/HTMLListAccessible.cpp +++ b/accessible/src/html/HTMLListAccessible.cpp @@ -20,7 +20,7 @@ using namespace mozilla::a11y; // HTMLListAccessible //////////////////////////////////////////////////////////////////////////////// -NS_IMPL_ISUPPORTS_INHERITED0(HTMLListAccessible, nsHyperTextAccessible) +NS_IMPL_ISUPPORTS_INHERITED0(HTMLListAccessible, HyperTextAccessible) role HTMLListAccessible::NativeRole() @@ -34,7 +34,7 @@ HTMLListAccessible::NativeRole() PRUint64 HTMLListAccessible::NativeState() { - return nsHyperTextAccessibleWrap::NativeState() | states::READONLY; + return HyperTextAccessibleWrap::NativeState() | states::READONLY; } @@ -44,7 +44,7 @@ HTMLListAccessible::NativeState() HTMLLIAccessible:: HTMLLIAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc), mBullet(nsnull) + HyperTextAccessibleWrap(aContent, aDoc), mBullet(nsnull) { mFlags |= eHTMLListItemAccessible; @@ -56,14 +56,14 @@ HTMLLIAccessible:: } } -NS_IMPL_ISUPPORTS_INHERITED0(HTMLLIAccessible, nsHyperTextAccessible) +NS_IMPL_ISUPPORTS_INHERITED0(HTMLLIAccessible, HyperTextAccessible) void HTMLLIAccessible::Shutdown() { mBullet = nsnull; - nsHyperTextAccessibleWrap::Shutdown(); + HyperTextAccessibleWrap::Shutdown(); } role @@ -78,7 +78,7 @@ HTMLLIAccessible::NativeRole() PRUint64 HTMLLIAccessible::NativeState() { - return nsHyperTextAccessibleWrap::NativeState() | states::READONLY; + return HyperTextAccessibleWrap::NativeState() | states::READONLY; } NS_IMETHODIMP diff --git a/accessible/src/html/HTMLListAccessible.h b/accessible/src/html/HTMLListAccessible.h index a840fb9a2ab3..fb4e3ad32f2e 100644 --- a/accessible/src/html/HTMLListAccessible.h +++ b/accessible/src/html/HTMLListAccessible.h @@ -7,7 +7,7 @@ #ifndef mozilla_a11y_HTMLListAccessible_h__ #define mozilla_a11y_HTMLListAccessible_h__ -#include "nsHyperTextAccessibleWrap.h" +#include "HyperTextAccessibleWrap.h" #include "nsBaseWidgetAccessible.h" namespace mozilla { @@ -18,11 +18,11 @@ class HTMLListBulletAccessible; /** * Used for HTML list (like HTML ul). */ -class HTMLListAccessible : public nsHyperTextAccessibleWrap +class HTMLListAccessible : public HyperTextAccessibleWrap { public: HTMLListAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) { } + HyperTextAccessibleWrap(aContent, aDoc) { } virtual ~HTMLListAccessible() { } // nsISupports @@ -37,7 +37,7 @@ public: /** * Used for HTML list item (e.g. HTML li). */ -class HTMLLIAccessible : public nsHyperTextAccessibleWrap +class HTMLLIAccessible : public HyperTextAccessibleWrap { public: HTMLLIAccessible(nsIContent* aContent, DocAccessible* aDoc); diff --git a/accessible/src/html/Makefile.in b/accessible/src/html/Makefile.in index e45427eef5a5..9ed1155b4925 100644 --- a/accessible/src/html/Makefile.in +++ b/accessible/src/html/Makefile.in @@ -26,11 +26,6 @@ CPPSRCS = \ nsHTMLSelectAccessible.cpp \ nsHTMLTableAccessible.cpp \ nsHTMLTextAccessible.cpp \ - nsHyperTextAccessible.cpp \ - $(NULL) - -EXPORTS = \ - nsHyperTextAccessible.h \ $(NULL) # we don't want the shared lib, but we want to force the creation of a static lib. diff --git a/accessible/src/html/nsHTMLCanvasAccessible.cpp b/accessible/src/html/nsHTMLCanvasAccessible.cpp index 6ffdcc99adde..c3d25adc1304 100644 --- a/accessible/src/html/nsHTMLCanvasAccessible.cpp +++ b/accessible/src/html/nsHTMLCanvasAccessible.cpp @@ -11,7 +11,7 @@ using namespace mozilla::a11y; nsHTMLCanvasAccessible:: nsHTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessible(aContent, aDoc) + HyperTextAccessible(aContent, aDoc) { } diff --git a/accessible/src/html/nsHTMLCanvasAccessible.h b/accessible/src/html/nsHTMLCanvasAccessible.h index 8ed4ae4fdbf8..8b79bc1686d5 100644 --- a/accessible/src/html/nsHTMLCanvasAccessible.h +++ b/accessible/src/html/nsHTMLCanvasAccessible.h @@ -3,7 +3,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 "nsHyperTextAccessible.h" +#include "HyperTextAccessible.h" #ifndef _nsHTMLCanvasAccessible_H_ #define _nsHTMLCanvasAccessible_H_ @@ -11,7 +11,7 @@ /** * HTML canvas accessible (html:canvas). */ -class nsHTMLCanvasAccessible : public nsHyperTextAccessible +class nsHTMLCanvasAccessible : public HyperTextAccessible { public: nsHTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc); diff --git a/accessible/src/html/nsHTMLLinkAccessible.cpp b/accessible/src/html/nsHTMLLinkAccessible.cpp index 8d06b9daefc5..4bbb2459cf2b 100644 --- a/accessible/src/html/nsHTMLLinkAccessible.cpp +++ b/accessible/src/html/nsHTMLLinkAccessible.cpp @@ -22,12 +22,12 @@ using namespace mozilla::a11y; nsHTMLLinkAccessible:: nsHTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } // Expose nsIAccessibleHyperLink unconditionally -NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLLinkAccessible, nsHyperTextAccessibleWrap, +NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLLinkAccessible, HyperTextAccessibleWrap, nsIAccessibleHyperLink) //////////////////////////////////////////////////////////////////////////////// @@ -42,7 +42,7 @@ nsHTMLLinkAccessible::NativeRole() PRUint64 nsHTMLLinkAccessible::NativeState() { - PRUint64 states = nsHyperTextAccessibleWrap::NativeState(); + PRUint64 states = HyperTextAccessibleWrap::NativeState(); states &= ~states::READONLY; @@ -77,7 +77,7 @@ nsHTMLLinkAccessible::Value(nsString& aValue) { aValue.Truncate(); - nsHyperTextAccessible::Value(aValue); + HyperTextAccessible::Value(aValue); if (aValue.IsEmpty()) nsContentUtils::GetLinkLocation(mContent->AsElement(), aValue); } @@ -85,7 +85,7 @@ nsHTMLLinkAccessible::Value(nsString& aValue) PRUint8 nsHTMLLinkAccessible::ActionCount() { - return IsLinked() ? 1 : nsHyperTextAccessible::ActionCount(); + return IsLinked() ? 1 : HyperTextAccessible::ActionCount(); } NS_IMETHODIMP @@ -94,7 +94,7 @@ nsHTMLLinkAccessible::GetActionName(PRUint8 aIndex, nsAString& aName) aName.Truncate(); if (!IsLinked()) - return nsHyperTextAccessible::GetActionName(aIndex, aName); + return HyperTextAccessible::GetActionName(aIndex, aName); // Action 0 (default action): Jump to link if (aIndex != eAction_Jump) @@ -108,7 +108,7 @@ NS_IMETHODIMP nsHTMLLinkAccessible::DoAction(PRUint8 aIndex) { if (!IsLinked()) - return nsHyperTextAccessible::DoAction(aIndex); + return HyperTextAccessible::DoAction(aIndex); // Action 0 (default action): Jump to link if (aIndex != eAction_Jump) diff --git a/accessible/src/html/nsHTMLLinkAccessible.h b/accessible/src/html/nsHTMLLinkAccessible.h index 3d6db0a6315f..c0f8db3ad8d6 100644 --- a/accessible/src/html/nsHTMLLinkAccessible.h +++ b/accessible/src/html/nsHTMLLinkAccessible.h @@ -6,9 +6,9 @@ #ifndef _nsHTMLLinkAccessible_H_ #define _nsHTMLLinkAccessible_H_ -#include "nsHyperTextAccessibleWrap.h" +#include "HyperTextAccessibleWrap.h" -class nsHTMLLinkAccessible : public nsHyperTextAccessibleWrap +class nsHTMLLinkAccessible : public HyperTextAccessibleWrap { public: nsHTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc); diff --git a/accessible/src/html/nsHTMLSelectAccessible.cpp b/accessible/src/html/nsHTMLSelectAccessible.cpp index 6796b4f6342b..fb0cd64fd8f6 100644 --- a/accessible/src/html/nsHTMLSelectAccessible.cpp +++ b/accessible/src/html/nsHTMLSelectAccessible.cpp @@ -174,7 +174,7 @@ nsHTMLSelectListAccessible::CacheOptSiblings(nsIContent *aParentContent) nsHTMLSelectOptionAccessible:: nsHTMLSelectOptionAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } @@ -225,7 +225,7 @@ nsHTMLSelectOptionAccessible::NativeState() { // As a nsHTMLSelectOptionAccessible we can have the following states: // SELECTABLE, SELECTED, FOCUSED, FOCUSABLE, OFFSCREEN - // Upcall to Accessible, but skip nsHyperTextAccessible impl + // Upcall to Accessible, but skip HyperTextAccessible impl // because we don't want EDITABLE or SELECTABLE_TEXT PRUint64 state = Accessible::NativeState(); @@ -307,7 +307,7 @@ nsHTMLSelectOptionAccessible::GetBoundsRect(nsRect& aTotalBounds, if (combobox && (combobox->State() & states::COLLAPSED)) combobox->GetBoundsRect(aTotalBounds, aBoundingFrame); else - nsHyperTextAccessibleWrap::GetBoundsRect(aTotalBounds, aBoundingFrame); + HyperTextAccessibleWrap::GetBoundsRect(aTotalBounds, aBoundingFrame); } /** select us! close combo box if necessary*/ diff --git a/accessible/src/html/nsHTMLSelectAccessible.h b/accessible/src/html/nsHTMLSelectAccessible.h index 9758e23991b7..44429a1c964a 100644 --- a/accessible/src/html/nsHTMLSelectAccessible.h +++ b/accessible/src/html/nsHTMLSelectAccessible.h @@ -69,7 +69,7 @@ protected: /* * Options inside the select, contained within the list */ -class nsHTMLSelectOptionAccessible : public nsHyperTextAccessibleWrap +class nsHTMLSelectOptionAccessible : public HyperTextAccessibleWrap { public: enum { eAction_Select = 0 }; diff --git a/accessible/src/html/nsHTMLTableAccessible.cpp b/accessible/src/html/nsHTMLTableAccessible.cpp index ea1f12cbeaba..a5d7237fc480 100644 --- a/accessible/src/html/nsHTMLTableAccessible.cpp +++ b/accessible/src/html/nsHTMLTableAccessible.cpp @@ -44,7 +44,7 @@ using namespace mozilla::a11y; nsHTMLTableCellAccessible:: nsHTMLTableCellAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } @@ -52,7 +52,7 @@ nsHTMLTableCellAccessible:: // nsHTMLTableCellAccessible: nsISupports implementation NS_IMPL_ISUPPORTS_INHERITED1(nsHTMLTableCellAccessible, - nsHyperTextAccessible, + HyperTextAccessible, nsIAccessibleTableCell) //////////////////////////////////////////////////////////////////////////////// @@ -67,7 +67,7 @@ nsHTMLTableCellAccessible::NativeRole() PRUint64 nsHTMLTableCellAccessible::NativeState() { - PRUint64 state = nsHyperTextAccessibleWrap::NativeState(); + PRUint64 state = HyperTextAccessibleWrap::NativeState(); nsIFrame *frame = mContent->GetPrimaryFrame(); NS_ASSERTION(frame, "No frame for valid cell accessible!"); @@ -87,7 +87,7 @@ nsHTMLTableCellAccessible::GetAttributesInternal(nsIPersistentProperties *aAttri if (IsDefunct()) return NS_ERROR_FAILURE; - nsresult rv = nsHyperTextAccessibleWrap::GetAttributesInternal(aAttributes); + nsresult rv = HyperTextAccessibleWrap::GetAttributesInternal(aAttributes); NS_ENSURE_SUCCESS(rv, rv); // table-cell-index attribute @@ -1512,7 +1512,7 @@ nsHTMLTableAccessible::IsProbablyLayoutTable() Relation nsHTMLCaptionAccessible::RelationByType(PRUint32 aType) { - Relation rel = nsHyperTextAccessible::RelationByType(aType); + Relation rel = HyperTextAccessible::RelationByType(aType); if (aType == nsIAccessibleRelation::RELATION_LABEL_FOR) rel.AppendTarget(Parent()); diff --git a/accessible/src/html/nsHTMLTableAccessible.h b/accessible/src/html/nsHTMLTableAccessible.h index 3d83e766fced..e10dd939adaa 100644 --- a/accessible/src/html/nsHTMLTableAccessible.h +++ b/accessible/src/html/nsHTMLTableAccessible.h @@ -6,7 +6,7 @@ #ifndef _nsHTMLTableAccessible_H_ #define _nsHTMLTableAccessible_H_ -#include "nsHyperTextAccessibleWrap.h" +#include "HyperTextAccessibleWrap.h" #include "nsIAccessibleTable.h" #include "TableAccessible.h" #include "xpcAccessibleTable.h" @@ -17,7 +17,7 @@ class nsITableCellLayout; /** * HTML table cell accessible (html:td). */ -class nsHTMLTableCellAccessible : public nsHyperTextAccessibleWrap, +class nsHTMLTableCellAccessible : public HyperTextAccessibleWrap, public nsIAccessibleTableCell { public: @@ -178,11 +178,11 @@ protected: /** * HTML caption accessible (html:caption). */ -class nsHTMLCaptionAccessible : public nsHyperTextAccessibleWrap +class nsHTMLCaptionAccessible : public HyperTextAccessibleWrap { public: nsHTMLCaptionAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) { } + HyperTextAccessibleWrap(aContent, aDoc) { } virtual ~nsHTMLCaptionAccessible() { } // nsIAccessible diff --git a/accessible/src/html/nsHTMLTextAccessible.cpp b/accessible/src/html/nsHTMLTextAccessible.cpp index da1f4bb53b9a..9fb55e3103b9 100644 --- a/accessible/src/html/nsHTMLTextAccessible.cpp +++ b/accessible/src/html/nsHTMLTextAccessible.cpp @@ -67,11 +67,11 @@ nsHTMLBRAccessible::GetNameInternal(nsAString& aName) nsHTMLLabelAccessible:: nsHTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } -NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLLabelAccessible, nsHyperTextAccessible) +NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLLabelAccessible, HyperTextAccessible) nsresult nsHTMLLabelAccessible::GetNameInternal(nsAString& aName) @@ -91,11 +91,11 @@ nsHTMLLabelAccessible::NativeRole() nsHTMLOutputAccessible:: nsHTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } -NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLOutputAccessible, nsHyperTextAccessible) +NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLOutputAccessible, HyperTextAccessible) Relation nsHTMLOutputAccessible::RelationByType(PRUint32 aType) diff --git a/accessible/src/html/nsHTMLTextAccessible.h b/accessible/src/html/nsHTMLTextAccessible.h index 46a2075253db..717d70d123b4 100644 --- a/accessible/src/html/nsHTMLTextAccessible.h +++ b/accessible/src/html/nsHTMLTextAccessible.h @@ -38,7 +38,7 @@ public: /** * Used for HTML label element. */ -class nsHTMLLabelAccessible : public nsHyperTextAccessibleWrap +class nsHTMLLabelAccessible : public HyperTextAccessibleWrap { public: nsHTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc); @@ -53,7 +53,7 @@ public: /** * Used for HTML output element. */ -class nsHTMLOutputAccessible : public nsHyperTextAccessibleWrap +class nsHTMLOutputAccessible : public HyperTextAccessibleWrap { public: nsHTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc); diff --git a/accessible/src/other/nsHyperTextAccessibleWrap.h b/accessible/src/mac/HyperTextAccessibleWrap.h similarity index 60% rename from accessible/src/other/nsHyperTextAccessibleWrap.h rename to accessible/src/mac/HyperTextAccessibleWrap.h index f249ad709cb6..a212a53955de 100644 --- a/accessible/src/other/nsHyperTextAccessibleWrap.h +++ b/accessible/src/mac/HyperTextAccessibleWrap.h @@ -3,12 +3,12 @@ * 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 _NSHYPERTEXTACCESSIBLEWRAP_H -#define _NSHYPERTEXTACCESSIBLEWRAP_H +#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__ +#define mozilla_a11y_HyperTextAccessibleWrap_h__ -#include "nsHyperTextAccessible.h" +#include "HyperTextAccessible.h" -typedef class nsHyperTextAccessible nsHyperTextAccessibleWrap; +typedef class HyperTextAccessible HyperTextAccessibleWrap; #endif diff --git a/accessible/src/mac/mozHTMLAccessible.mm b/accessible/src/mac/mozHTMLAccessible.mm index a3c758311ddf..00cbe9eac564 100644 --- a/accessible/src/mac/mozHTMLAccessible.mm +++ b/accessible/src/mac/mozHTMLAccessible.mm @@ -7,7 +7,7 @@ #import "mozHTMLAccessible.h" -#import "nsHyperTextAccessible.h" +#import "HyperTextAccessible.h" #import "nsCocoaUtils.h" diff --git a/accessible/src/mac/mozTextAccessible.h b/accessible/src/mac/mozTextAccessible.h index 9cc52c3a460b..d3668f1bbd1f 100644 --- a/accessible/src/mac/mozTextAccessible.h +++ b/accessible/src/mac/mozTextAccessible.h @@ -4,13 +4,13 @@ #import "mozAccessible.h" -#import "nsHyperTextAccessible.h" +#import "HyperTextAccessible.h" @interface mozTextAccessible : mozAccessible { // both of these are the same old mGeckoAccessible, but already // QI'd for us, to the right type, for convenience. - nsHyperTextAccessible *mGeckoTextAccessible; // strong + HyperTextAccessible *mGeckoTextAccessible; // strong nsIAccessibleEditableText *mGeckoEditableTextAccessible; // strong } @end diff --git a/accessible/src/msaa/ARIAGridAccessibleWrap.cpp b/accessible/src/msaa/ARIAGridAccessibleWrap.cpp index 5d3136676528..84fec414bd96 100644 --- a/accessible/src/msaa/ARIAGridAccessibleWrap.cpp +++ b/accessible/src/msaa/ARIAGridAccessibleWrap.cpp @@ -30,6 +30,6 @@ NS_IMPL_ISUPPORTS_INHERITED0(ARIAGridCellAccessibleWrap, ARIAGridCellAccessible) IMPL_IUNKNOWN_INHERITED1(ARIAGridCellAccessibleWrap, - nsHyperTextAccessibleWrap, + HyperTextAccessibleWrap, CAccessibleTableCell) diff --git a/accessible/src/msaa/CAccessibleEditableText.cpp b/accessible/src/msaa/CAccessibleEditableText.cpp index 795ef14e26ae..9f90aa1989a0 100644 --- a/accessible/src/msaa/CAccessibleEditableText.cpp +++ b/accessible/src/msaa/CAccessibleEditableText.cpp @@ -8,7 +8,7 @@ #include "CAccessibleEditableText.h" #include "AccessibleEditableText_i.c" -#include "nsHyperTextAccessible.h" +#include "HyperTextAccessible.h" #include "nsCOMPtr.h" #include "nsString.h" @@ -38,7 +38,7 @@ STDMETHODIMP CAccessibleEditableText::copyText(long aStartOffset, long aEndOffset) { __try { - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -53,7 +53,7 @@ STDMETHODIMP CAccessibleEditableText::deleteText(long aStartOffset, long aEndOffset) { __try { - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -68,7 +68,7 @@ STDMETHODIMP CAccessibleEditableText::insertText(long aOffset, BSTR *aText) { __try { - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -86,7 +86,7 @@ STDMETHODIMP CAccessibleEditableText::cutText(long aStartOffset, long aEndOffset) { __try { - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -101,7 +101,7 @@ STDMETHODIMP CAccessibleEditableText::pasteText(long aOffset) { __try { - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -117,7 +117,7 @@ CAccessibleEditableText::replaceText(long aStartOffset, long aEndOffset, BSTR *aText) { __try { - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; diff --git a/accessible/src/msaa/CAccessibleText.cpp b/accessible/src/msaa/CAccessibleText.cpp index c1ddc148a205..16ed7ef3281c 100644 --- a/accessible/src/msaa/CAccessibleText.cpp +++ b/accessible/src/msaa/CAccessibleText.cpp @@ -10,7 +10,7 @@ #include "Accessible2.h" #include "AccessibleText_i.c" -#include "nsHyperTextAccessible.h" +#include "HyperTextAccessible.h" #include "nsIPersistentProperties2.h" @@ -40,7 +40,7 @@ STDMETHODIMP CAccessibleText::addSelection(long aStartOffset, long aEndOffset) { __try { - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -63,7 +63,7 @@ __try { *aEndOffset = 0; *aTextAttributes = NULL; - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -95,7 +95,7 @@ CAccessibleText::get_caretOffset(long *aOffset) __try { *aOffset = -1; - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -123,7 +123,7 @@ __try { *aWidth = 0; *aHeight = 0; - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -153,7 +153,7 @@ CAccessibleText::get_nSelections(long *aNSelections) __try { *aNSelections = 0; - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -177,7 +177,7 @@ CAccessibleText::get_offsetAtPoint(long aX, long aY, __try { *aOffset = 0; - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -205,7 +205,7 @@ __try { *aStartOffset = 0; *aEndOffset = 0; - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -229,7 +229,7 @@ CAccessibleText::get_text(long aStartOffset, long aEndOffset, BSTR *aText) __try { *aText = NULL; - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -259,7 +259,7 @@ __try { *aEndOffset = 0; *aText = NULL; - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -306,7 +306,7 @@ __try { *aEndOffset = 0; *aText = NULL; - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -353,7 +353,7 @@ __try { *aEndOffset = 0; *aText = NULL; - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -393,7 +393,7 @@ STDMETHODIMP CAccessibleText::removeSelection(long aSelectionIndex) { __try { - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -408,7 +408,7 @@ STDMETHODIMP CAccessibleText::setCaretOffset(long aOffset) { __try { - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -424,7 +424,7 @@ CAccessibleText::setSelection(long aSelectionIndex, long aStartOffset, long aEndOffset) { __try { - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -442,7 +442,7 @@ CAccessibleText::get_nCharacters(long *aNCharacters) __try { *aNCharacters = 0; - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -458,7 +458,7 @@ CAccessibleText::scrollSubstringTo(long aStartIndex, long aEndIndex, enum IA2ScrollType aScrollType) { __try { - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -475,7 +475,7 @@ CAccessibleText::scrollSubstringToPoint(long aStartIndex, long aEndIndex, long aX, long aY) { __try { - nsRefPtr textAcc(do_QueryObject(this)); + nsRefPtr textAcc(do_QueryObject(this)); if (textAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; diff --git a/accessible/src/msaa/DocAccessibleWrap.cpp b/accessible/src/msaa/DocAccessibleWrap.cpp index 9d283d7c6d3e..90c272b01703 100644 --- a/accessible/src/msaa/DocAccessibleWrap.cpp +++ b/accessible/src/msaa/DocAccessibleWrap.cpp @@ -67,7 +67,7 @@ DocAccessibleWrap::QueryInterface(REFIID iid, void** ppv) *ppv = NULL; if (IID_ISimpleDOMDocument != iid) - return nsHyperTextAccessibleWrap::QueryInterface(iid, ppv); + return HyperTextAccessibleWrap::QueryInterface(iid, ppv); statistics::ISimpleDOMUsed(); *ppv = static_cast(this); diff --git a/accessible/src/msaa/nsHyperTextAccessibleWrap.cpp b/accessible/src/msaa/HyperTextAccessibleWrap.cpp similarity index 75% rename from accessible/src/msaa/nsHyperTextAccessibleWrap.cpp rename to accessible/src/msaa/HyperTextAccessibleWrap.cpp index f3987170ec68..3421910fe417 100644 --- a/accessible/src/msaa/nsHyperTextAccessibleWrap.cpp +++ b/accessible/src/msaa/HyperTextAccessibleWrap.cpp @@ -5,20 +5,20 @@ * 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 "nsHyperTextAccessibleWrap.h" +#include "HyperTextAccessibleWrap.h" #include "nsEventShell.h" -NS_IMPL_ISUPPORTS_INHERITED0(nsHyperTextAccessibleWrap, - nsHyperTextAccessible) +NS_IMPL_ISUPPORTS_INHERITED0(HyperTextAccessibleWrap, + HyperTextAccessible) -IMPL_IUNKNOWN_INHERITED2(nsHyperTextAccessibleWrap, +IMPL_IUNKNOWN_INHERITED2(HyperTextAccessibleWrap, AccessibleWrap, ia2AccessibleHypertext, CAccessibleEditableText); nsresult -nsHyperTextAccessibleWrap::HandleAccEvent(AccEvent* aEvent) +HyperTextAccessibleWrap::HandleAccEvent(AccEvent* aEvent) { PRUint32 eventType = aEvent->GetEventType(); @@ -41,14 +41,14 @@ nsHyperTextAccessibleWrap::HandleAccEvent(AccEvent* aEvent) } } - return nsHyperTextAccessible::HandleAccEvent(aEvent); + return HyperTextAccessible::HandleAccEvent(aEvent); } nsresult -nsHyperTextAccessibleWrap::GetModifiedText(bool aGetInsertedText, - nsAString& aText, - PRUint32 *aStartOffset, - PRUint32 *aEndOffset) +HyperTextAccessibleWrap::GetModifiedText(bool aGetInsertedText, + nsAString& aText, + PRUint32* aStartOffset, + PRUint32* aEndOffset) { aText.Truncate(); *aStartOffset = 0; diff --git a/accessible/src/msaa/nsHyperTextAccessibleWrap.h b/accessible/src/msaa/HyperTextAccessibleWrap.h similarity index 65% rename from accessible/src/msaa/nsHyperTextAccessibleWrap.h rename to accessible/src/msaa/HyperTextAccessibleWrap.h index bb3f06c39ce3..fdde2f1b7e52 100644 --- a/accessible/src/msaa/nsHyperTextAccessibleWrap.h +++ b/accessible/src/msaa/HyperTextAccessibleWrap.h @@ -5,21 +5,21 @@ * 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 _NSHYPERTEXTACCESSIBLEWRAP_H -#define _NSHYPERTEXTACCESSIBLEWRAP_H +#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__ +#define mozilla_a11y_HyperTextAccessibleWrap_h__ -#include "nsHyperTextAccessible.h" +#include "HyperTextAccessible.h" #include "CAccessibleText.h" #include "CAccessibleEditableText.h" #include "ia2AccessibleHyperText.h" -class nsHyperTextAccessibleWrap : public nsHyperTextAccessible, - public ia2AccessibleHypertext, - public CAccessibleEditableText +class HyperTextAccessibleWrap : public HyperTextAccessible, + public ia2AccessibleHypertext, + public CAccessibleEditableText { public: - nsHyperTextAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessible(aContent, aDoc) {} + HyperTextAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) : + HyperTextAccessible(aContent, aDoc) {} // IUnknown DECL_IUNKNOWN_INHERITED diff --git a/accessible/src/msaa/Makefile.in b/accessible/src/msaa/Makefile.in index 43fb963e7b69..b71e5ee314f1 100644 --- a/accessible/src/msaa/Makefile.in +++ b/accessible/src/msaa/Makefile.in @@ -20,12 +20,12 @@ CPPSRCS = \ ApplicationAccessibleWrap.cpp \ ARIAGridAccessibleWrap.cpp \ DocAccessibleWrap.cpp \ + HyperTextAccessibleWrap.cpp \ nsAccessNodeWrap.cpp \ nsHTMLWin32ObjectAccessible.cpp \ nsXULMenuAccessibleWrap.cpp \ nsXULListboxAccessibleWrap.cpp \ nsXULTreeGridAccessibleWrap.cpp \ - nsHyperTextAccessibleWrap.cpp \ nsHTMLImageAccessibleWrap.cpp \ nsHTMLTableAccessibleWrap.cpp \ nsWinUtils.cpp \ diff --git a/accessible/src/msaa/ia2AccessibleHypertext.cpp b/accessible/src/msaa/ia2AccessibleHypertext.cpp index 196ab5a1e97a..98f82235f51d 100644 --- a/accessible/src/msaa/ia2AccessibleHypertext.cpp +++ b/accessible/src/msaa/ia2AccessibleHypertext.cpp @@ -9,7 +9,7 @@ #include "AccessibleHypertext_i.c" -#include "nsHyperTextAccessibleWrap.h" +#include "HyperTextAccessibleWrap.h" // IUnknown @@ -18,7 +18,7 @@ ia2AccessibleHypertext::QueryInterface(REFIID iid, void** ppv) { *ppv = NULL; if (IID_IAccessibleHypertext == iid) { - nsHyperTextAccessibleWrap* hyperAcc = static_cast(this); + HyperTextAccessibleWrap* hyperAcc = static_cast(this); if (hyperAcc->IsTextRole()) { *ppv = static_cast(this); (reinterpret_cast(*ppv))->AddRef(); @@ -38,7 +38,7 @@ ia2AccessibleHypertext::get_nHyperlinks(long* aHyperlinkCount) __try { *aHyperlinkCount = 0; - nsHyperTextAccessibleWrap* hyperText = static_cast(this); + HyperTextAccessibleWrap* hyperText = static_cast(this); if (hyperText->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -56,7 +56,7 @@ ia2AccessibleHypertext::get_hyperlink(long aLinkIndex, __try { *aHyperlink = NULL; - nsHyperTextAccessibleWrap* hyperText = static_cast(this); + HyperTextAccessibleWrap* hyperText = static_cast(this); if (hyperText->IsDefunct()) return CO_E_OBJNOTCONNECTED; @@ -84,7 +84,7 @@ ia2AccessibleHypertext::get_hyperlinkIndex(long aCharIndex, long* aHyperlinkInde __try { *aHyperlinkIndex = 0; - nsHyperTextAccessibleWrap* hyperAcc = static_cast(this); + HyperTextAccessibleWrap* hyperAcc = static_cast(this); if (hyperAcc->IsDefunct()) return CO_E_OBJNOTCONNECTED; diff --git a/accessible/src/msaa/nsAccessNodeWrap.h b/accessible/src/msaa/nsAccessNodeWrap.h index 10af94c43c2e..64f86ec722c2 100644 --- a/accessible/src/msaa/nsAccessNodeWrap.h +++ b/accessible/src/msaa/nsAccessNodeWrap.h @@ -132,7 +132,7 @@ protected: ISimpleDOMNode *MakeAccessNode(nsINode *aNode); /** - * It is used in nsHyperTextAccessibleWrap for IA2::newText/oldText + * It is used in HyperTextAccessibleWrap for IA2::newText/oldText * implementation. */ static AccTextChangeEvent* gTextEvent; diff --git a/accessible/src/msaa/nsHTMLTableAccessibleWrap.cpp b/accessible/src/msaa/nsHTMLTableAccessibleWrap.cpp index b273267b3247..6c1d169a9236 100644 --- a/accessible/src/msaa/nsHTMLTableAccessibleWrap.cpp +++ b/accessible/src/msaa/nsHTMLTableAccessibleWrap.cpp @@ -27,7 +27,7 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLTableCellAccessibleWrap, nsHTMLTableCellAccessible) IMPL_IUNKNOWN_INHERITED1(nsHTMLTableCellAccessibleWrap, - nsHyperTextAccessibleWrap, + HyperTextAccessibleWrap, CAccessibleTableCell) @@ -39,5 +39,5 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLTableHeaderCellAccessibleWrap, nsHTMLTableHeaderCellAccessible) IMPL_IUNKNOWN_INHERITED1(nsHTMLTableHeaderCellAccessibleWrap, - nsHyperTextAccessibleWrap, + HyperTextAccessibleWrap, CAccessibleTableCell) diff --git a/accessible/src/msaa/nsXULListboxAccessibleWrap.cpp b/accessible/src/msaa/nsXULListboxAccessibleWrap.cpp index a572d9a1aac5..9a409e307d91 100644 --- a/accessible/src/msaa/nsXULListboxAccessibleWrap.cpp +++ b/accessible/src/msaa/nsXULListboxAccessibleWrap.cpp @@ -38,5 +38,5 @@ NS_IMPL_ISUPPORTS_INHERITED0(nsXULListCellAccessibleWrap, nsXULListCellAccessible) IMPL_IUNKNOWN_INHERITED1(nsXULListCellAccessibleWrap, - nsHyperTextAccessibleWrap, + HyperTextAccessibleWrap, CAccessibleTableCell) diff --git a/accessible/src/mac/nsHyperTextAccessibleWrap.h b/accessible/src/other/HyperTextAccessibleWrap.h similarity index 60% rename from accessible/src/mac/nsHyperTextAccessibleWrap.h rename to accessible/src/other/HyperTextAccessibleWrap.h index f249ad709cb6..a212a53955de 100644 --- a/accessible/src/mac/nsHyperTextAccessibleWrap.h +++ b/accessible/src/other/HyperTextAccessibleWrap.h @@ -3,12 +3,12 @@ * 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 _NSHYPERTEXTACCESSIBLEWRAP_H -#define _NSHYPERTEXTACCESSIBLEWRAP_H +#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__ +#define mozilla_a11y_HyperTextAccessibleWrap_h__ -#include "nsHyperTextAccessible.h" +#include "HyperTextAccessible.h" -typedef class nsHyperTextAccessible nsHyperTextAccessibleWrap; +typedef class HyperTextAccessible HyperTextAccessibleWrap; #endif diff --git a/accessible/src/xforms/nsXFormsAccessible.cpp b/accessible/src/xforms/nsXFormsAccessible.cpp index 3d76caaadce6..8ad3eed58add 100644 --- a/accessible/src/xforms/nsXFormsAccessible.cpp +++ b/accessible/src/xforms/nsXFormsAccessible.cpp @@ -48,7 +48,7 @@ nsXFormsAccessibleBase::nsXFormsAccessibleBase() nsXFormsAccessible:: nsXFormsAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } @@ -135,7 +135,7 @@ nsXFormsAccessible::NativeState() rv = sXFormsService->IsValid(DOMNode, &isValid); NS_ENSURE_SUCCESS(rv, 0); - PRUint64 states = nsHyperTextAccessibleWrap::NativeState(); + PRUint64 states = HyperTextAccessibleWrap::NativeState(); if (!isRelevant) states |= states::UNAVAILABLE; diff --git a/accessible/src/xforms/nsXFormsAccessible.h b/accessible/src/xforms/nsXFormsAccessible.h index ab2ccb3e84d3..de353243d741 100644 --- a/accessible/src/xforms/nsXFormsAccessible.h +++ b/accessible/src/xforms/nsXFormsAccessible.h @@ -6,7 +6,7 @@ #ifndef _nsXFormsAccessible_H_ #define _nsXFormsAccessible_H_ -#include "nsHyperTextAccessibleWrap.h" +#include "HyperTextAccessibleWrap.h" #include "nsIXFormsUtilityService.h" #define NS_NAMESPACE_XFORMS "http://www.w3.org/2002/xforms" @@ -33,7 +33,7 @@ protected: * XForms hint and XForms label elements should have accessible object. This * class is base class for accessible objects for these XForms elements. */ -class nsXFormsAccessible : public nsHyperTextAccessibleWrap, +class nsXFormsAccessible : public HyperTextAccessibleWrap, public nsXFormsAccessibleBase { public: @@ -109,7 +109,7 @@ class nsXFormsEditableAccessible : public nsXFormsAccessible public: nsXFormsEditableAccessible(nsIContent* aContent, DocAccessible* aDoc); - // nsHyperTextAccessible + // HyperTextAccessible virtual already_AddRefed GetEditor() const; // Accessible diff --git a/accessible/src/xforms/nsXFormsFormControlsAccessible.cpp b/accessible/src/xforms/nsXFormsFormControlsAccessible.cpp index ce73a6d16201..cd01b3bceb35 100644 --- a/accessible/src/xforms/nsXFormsFormControlsAccessible.cpp +++ b/accessible/src/xforms/nsXFormsFormControlsAccessible.cpp @@ -119,7 +119,11 @@ nsXFormsInputAccessible:: { } -NS_IMPL_ISUPPORTS_INHERITED3(nsXFormsInputAccessible, Accessible, nsHyperTextAccessible, nsIAccessibleText, nsIAccessibleEditableText) +NS_IMPL_ISUPPORTS_INHERITED3(nsXFormsInputAccessible, + Accessible, + HyperTextAccessible, + nsIAccessibleText, + nsIAccessibleEditableText) role nsXFormsInputAccessible::NativeRole() diff --git a/accessible/src/xul/XULFormControlAccessible.cpp b/accessible/src/xul/XULFormControlAccessible.cpp index d4ccfa068db9..fad076dced13 100644 --- a/accessible/src/xul/XULFormControlAccessible.cpp +++ b/accessible/src/xul/XULFormControlAccessible.cpp @@ -688,13 +688,13 @@ XULToolbarSeparatorAccessible::NativeState() XULTextFieldAccessible:: XULTextFieldAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } NS_IMPL_ISUPPORTS_INHERITED3(XULTextFieldAccessible, Accessible, - nsHyperTextAccessible, + HyperTextAccessible, nsIAccessibleText, nsIAccessibleEditableText) @@ -722,7 +722,7 @@ XULTextFieldAccessible::Value(nsString& aValue) void XULTextFieldAccessible::ApplyARIAState(PRUint64* aState) const { - nsHyperTextAccessibleWrap::ApplyARIAState(aState); + HyperTextAccessibleWrap::ApplyARIAState(aState); aria::MapToState(aria::eARIAAutoComplete, mContent->AsElement(), aState); } @@ -730,7 +730,7 @@ XULTextFieldAccessible::ApplyARIAState(PRUint64* aState) const PRUint64 XULTextFieldAccessible::NativeState() { - PRUint64 state = nsHyperTextAccessibleWrap::NativeState(); + PRUint64 state = HyperTextAccessibleWrap::NativeState(); nsCOMPtr inputField(GetInputField()); NS_ENSURE_TRUE(inputField, state); @@ -846,7 +846,7 @@ XULTextFieldAccessible::CacheChildren() } //////////////////////////////////////////////////////////////////////////////// -// XULTextFieldAccessible: nsHyperTextAccessible protected +// XULTextFieldAccessible: HyperTextAccessible protected already_AddRefed XULTextFieldAccessible::FrameSelection() diff --git a/accessible/src/xul/XULFormControlAccessible.h b/accessible/src/xul/XULFormControlAccessible.h index 5a6f48cc88f5..a3597fda3b0a 100644 --- a/accessible/src/xul/XULFormControlAccessible.h +++ b/accessible/src/xul/XULFormControlAccessible.h @@ -9,7 +9,7 @@ // NOTE: alphabetically ordered #include "AccessibleWrap.h" #include "FormControlAccessible.h" -#include "nsHyperTextAccessibleWrap.h" +#include "HyperTextAccessibleWrap.h" #include "XULSelectControlAccessible.h" namespace mozilla { @@ -213,7 +213,7 @@ public: /** * Used for XUL textbox element. */ -class XULTextFieldAccessible : public nsHyperTextAccessibleWrap +class XULTextFieldAccessible : public HyperTextAccessibleWrap { public: enum { eAction_Click = 0 }; @@ -226,7 +226,7 @@ public: NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName); NS_IMETHOD DoAction(PRUint8 index); - // nsHyperTextAccessible + // HyperTextAccessible virtual already_AddRefed GetEditor() const; // Accessible @@ -243,7 +243,7 @@ protected: // Accessible virtual void CacheChildren(); - // nsHyperTextAccessible + // HyperTextAccessible virtual already_AddRefed FrameSelection(); // nsXULTextFieldAccessible diff --git a/accessible/src/xul/nsXULListboxAccessible.cpp b/accessible/src/xul/nsXULListboxAccessible.cpp index 927967fe9f03..2193d0a77675 100644 --- a/accessible/src/xul/nsXULListboxAccessible.cpp +++ b/accessible/src/xul/nsXULListboxAccessible.cpp @@ -926,7 +926,7 @@ nsXULListitemAccessible::ContainerWidget() const nsXULListCellAccessible:: nsXULListCellAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } @@ -934,7 +934,7 @@ nsXULListCellAccessible:: // nsISupports NS_IMPL_ISUPPORTS_INHERITED1(nsXULListCellAccessible, - nsHyperTextAccessible, + HyperTextAccessible, nsIAccessibleTableCell) //////////////////////////////////////////////////////////////////////////////// diff --git a/accessible/src/xul/nsXULListboxAccessible.h b/accessible/src/xul/nsXULListboxAccessible.h index 62eaf631159b..7091db18c95f 100644 --- a/accessible/src/xul/nsXULListboxAccessible.h +++ b/accessible/src/xul/nsXULListboxAccessible.h @@ -135,7 +135,7 @@ private: /** * Class represents xul:listcell. */ -class nsXULListCellAccessible : public nsHyperTextAccessibleWrap, +class nsXULListCellAccessible : public HyperTextAccessibleWrap, public nsIAccessibleTableCell { public: diff --git a/accessible/src/xul/nsXULTextAccessible.cpp b/accessible/src/xul/nsXULTextAccessible.cpp index 8789b6b44032..c8974f7b7927 100644 --- a/accessible/src/xul/nsXULTextAccessible.cpp +++ b/accessible/src/xul/nsXULTextAccessible.cpp @@ -29,7 +29,7 @@ using namespace mozilla::a11y; nsXULTextAccessible:: nsXULTextAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } @@ -53,13 +53,13 @@ nsXULTextAccessible::NativeState() { // Labels and description have read only state // They are not focusable or selectable - return nsHyperTextAccessibleWrap::NativeState() | states::READONLY; + return HyperTextAccessibleWrap::NativeState() | states::READONLY; } Relation nsXULTextAccessible::RelationByType(PRUint32 aType) { - Relation rel = nsHyperTextAccessibleWrap::RelationByType(aType); + Relation rel = HyperTextAccessibleWrap::RelationByType(aType); if (aType == nsIAccessibleRelation::RELATION_LABEL_FOR) { // Caption is the label for groupbox nsIContent *parent = mContent->GetParent(); @@ -107,12 +107,12 @@ nsXULTooltipAccessible::NativeRole() nsXULLinkAccessible:: nsXULLinkAccessible(nsIContent* aContent, DocAccessible* aDoc) : - nsHyperTextAccessibleWrap(aContent, aDoc) + HyperTextAccessibleWrap(aContent, aDoc) { } // Expose nsIAccessibleHyperLink unconditionally -NS_IMPL_ISUPPORTS_INHERITED1(nsXULLinkAccessible, nsHyperTextAccessibleWrap, +NS_IMPL_ISUPPORTS_INHERITED1(nsXULLinkAccessible, HyperTextAccessibleWrap, nsIAccessibleHyperLink) //////////////////////////////////////////////////////////////////////////////// diff --git a/accessible/src/xul/nsXULTextAccessible.h b/accessible/src/xul/nsXULTextAccessible.h index 3844f4929c2b..1d83ca3621a4 100644 --- a/accessible/src/xul/nsXULTextAccessible.h +++ b/accessible/src/xul/nsXULTextAccessible.h @@ -6,13 +6,13 @@ #ifndef _nsXULTextAccessible_H_ #define _nsXULTextAccessible_H_ +#include "HyperTextAccessibleWrap.h" #include "nsBaseWidgetAccessible.h" -#include "nsHyperTextAccessibleWrap.h" /** * Used for XUL description and label elements. */ -class nsXULTextAccessible : public nsHyperTextAccessibleWrap +class nsXULTextAccessible : public HyperTextAccessibleWrap { public: nsXULTextAccessible(nsIContent* aContent, DocAccessible* aDoc); @@ -38,7 +38,7 @@ public: virtual PRUint64 NativeState(); }; -class nsXULLinkAccessible : public nsHyperTextAccessibleWrap +class nsXULLinkAccessible : public HyperTextAccessibleWrap { public: diff --git a/accessible/tests/mochitest/role/test_general.html b/accessible/tests/mochitest/role/test_general.html index 22f1402fbed5..0a6892081416 100644 --- a/accessible/tests/mochitest/role/test_general.html +++ b/accessible/tests/mochitest/role/test_general.html @@ -76,7 +76,7 @@ Mozilla Bug 472326
+ title="Test remaining implementations in nsHyperTextAccessible::GetRole"> bug 474261
xul|videocontrols, +audio > xul|videocontrols { + -moz-binding: url("chrome://global/content/bindings/videocontrols.xml#touchControls"); +} diff --git a/b2g/installer/package-manifest.in b/b2g/installer/package-manifest.in index a1d85e0f6cbf..5ea6fed05677 100644 --- a/b2g/installer/package-manifest.in +++ b/b2g/installer/package-manifest.in @@ -639,6 +639,7 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@ @BINPATH@/components/B2GComponents.manifest @BINPATH@/components/B2GComponents.xpt @BINPATH@/components/CameraContent.js +@BINPATH@/@DLL_PREFIX@omxplugin@DLL_SUFFIX@ @BINPATH@/chrome/marionette@JAREXT@ @BINPATH@/chrome/marionette.manifest @BINPATH@/components/MarionetteComponents.manifest diff --git a/browser/extensions/pdfjs/README.mozilla b/browser/extensions/pdfjs/README.mozilla index e8d7559ef99f..5efc31e09723 100644 --- a/browser/extensions/pdfjs/README.mozilla +++ b/browser/extensions/pdfjs/README.mozilla @@ -1,4 +1,4 @@ This is the pdf.js project output, https://github.com/mozilla/pdf.js -Current extension version is: 0.2.536 +Current extension version is: 0.3.266 diff --git a/browser/extensions/pdfjs/bootstrap.js b/browser/extensions/pdfjs/bootstrap.js index 826db512a727..5bf66d444c00 100644 --- a/browser/extensions/pdfjs/bootstrap.js +++ b/browser/extensions/pdfjs/bootstrap.js @@ -1,8 +1,4 @@ /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. */ - /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ 'use strict'; @@ -14,13 +10,26 @@ let Cc = Components.classes; let Ci = Components.interfaces; let Cm = Components.manager; let Cu = Components.utils; -let application = Cc['@mozilla.org/fuel/application;1'] - .getService(Ci.fuelIApplication); Cu.import('resource://gre/modules/Services.jsm'); +function getBoolPref(pref, def) { + try { + return Services.prefs.getBoolPref(pref); + } catch (ex) { + return def; + } +} + +function setStringPref(pref, value) { + let str = Cc['@mozilla.org/supports-string;1'] + .createInstance(Ci.nsISupportsString); + str.data = value; + Services.prefs.setComplexValue(pref, Ci.nsISupportsString, str); +} + function log(str) { - if (!application.prefs.getValue(EXT_PREFIX + '.pdfBugEnabled', false)) + if (!getBoolPref(EXT_PREFIX + '.pdfBugEnabled', false)) return; dump(str + '\n'); } @@ -97,6 +106,6 @@ function install(aData, aReason) { } function uninstall(aData, aReason) { - application.prefs.setValue(EXT_PREFIX + '.database', '{}'); + setStringPref(EXT_PREFIX + '.database', '{}'); } diff --git a/browser/extensions/pdfjs/chrome.manifest b/browser/extensions/pdfjs/chrome.manifest index 2618c476b5d6..8348f377ed8b 100644 --- a/browser/extensions/pdfjs/chrome.manifest +++ b/browser/extensions/pdfjs/chrome.manifest @@ -1,3 +1,8 @@ resource pdf.js content/ component {6457a96b-2d68-439a-bcfa-44465fbcdbb1} components/PdfStreamConverter.js contract @mozilla.org/streamconv;1?from=application/pdf&to=*/* {6457a96b-2d68-439a-bcfa-44465fbcdbb1} + +# Additional resources for pdf.js + +# PDFJS_SUPPORTED_LOCALES + diff --git a/browser/extensions/pdfjs/components/PdfStreamConverter.js b/browser/extensions/pdfjs/components/PdfStreamConverter.js index d6e376a0e0a2..1bcccbe22ad4 100644 --- a/browser/extensions/pdfjs/components/PdfStreamConverter.js +++ b/browser/extensions/pdfjs/components/PdfStreamConverter.js @@ -1,8 +1,4 @@ /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. */ - /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ 'use strict'; @@ -17,18 +13,51 @@ const PDFJS_EVENT_ID = 'pdf.js.message'; const PDF_CONTENT_TYPE = 'application/pdf'; const EXT_PREFIX = 'extensions.uriloader@pdf.js'; const MAX_DATABASE_LENGTH = 4096; +const FIREFOX_ID = '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}'; +const SEAMONKEY_ID = '{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}'; Cu.import('resource://gre/modules/XPCOMUtils.jsm'); Cu.import('resource://gre/modules/Services.jsm'); +Cu.import('resource://gre/modules/NetUtil.jsm'); -let application = Cc['@mozilla.org/fuel/application;1'] - .getService(Ci.fuelIApplication); -let privateBrowsing = Cc['@mozilla.org/privatebrowsing;1'] - .getService(Ci.nsIPrivateBrowsingService); -let inPrivateBrowswing = privateBrowsing.privateBrowsingEnabled; +let appInfo = Cc['@mozilla.org/xre/app-info;1'] + .getService(Ci.nsIXULAppInfo); +let privateBrowsing, inPrivateBrowsing; + +if (appInfo.ID === FIREFOX_ID) { + privateBrowsing = Cc['@mozilla.org/privatebrowsing;1'] + .getService(Ci.nsIPrivateBrowsingService); + inPrivateBrowsing = privateBrowsing.privateBrowsingEnabled; +} else if (appInfo.ID === SEAMONKEY_ID) { + privateBrowsing = null; + inPrivateBrowsing = false; +} + +function getBoolPref(pref, def) { + try { + return Services.prefs.getBoolPref(pref); + } catch (ex) { + return def; + } +} + +function setStringPref(pref, value) { + let str = Cc['@mozilla.org/supports-string;1'] + .createInstance(Ci.nsISupportsString); + str.data = value; + Services.prefs.setComplexValue(pref, Ci.nsISupportsString, str); +} + +function getStringPref(pref, def) { + try { + return Services.prefs.getComplexValue(pref, Ci.nsISupportsString).data; + } catch (ex) { + return def; + } +} function log(aMsg) { - if (!application.prefs.getValue(EXT_PREFIX + '.pdfBugEnabled', false)) + if (!getBoolPref(EXT_PREFIX + '.pdfBugEnabled', false)) return; let msg = 'PdfStreamConverter.js: ' + (aMsg.join ? aMsg.join('') : aMsg); Services.console.logStringMessage(msg); @@ -41,29 +70,97 @@ function getDOMWindow(aChannel) { return win; } +function getLocalizedStrings(path) { + var stringBundle = Cc['@mozilla.org/intl/stringbundle;1']. + getService(Ci.nsIStringBundleService). + createBundle('chrome://pdf.js/locale/' + path); + + var map = {}; + var enumerator = stringBundle.getSimpleEnumeration(); + while (enumerator.hasMoreElements()) { + var string = enumerator.getNext().QueryInterface(Ci.nsIPropertyElement); + var key = string.key, property = 'textContent'; + var i = key.lastIndexOf('.'); + if (i >= 0) { + property = key.substring(i + 1); + key = key.substring(0, i); + } + if (!(key in map)) + map[key] = {}; + map[key][property] = string.value; + } + return map; +} + // All the priviledged actions. function ChromeActions() { - this.inPrivateBrowswing = privateBrowsing.privateBrowsingEnabled; } + ChromeActions.prototype = { download: function(data) { - Services.wm.getMostRecentWindow('navigator:browser').saveURL(data); + let mimeService = Cc['@mozilla.org/mime;1'].getService(Ci.nsIMIMEService); + var handlerInfo = mimeService. + getFromTypeAndExtension('application/pdf', 'pdf'); + var uri = NetUtil.newURI(data); + + var extHelperAppSvc = + Cc['@mozilla.org/uriloader/external-helper-app-service;1']. + getService(Ci.nsIExternalHelperAppService); + var frontWindow = Cc['@mozilla.org/embedcomp/window-watcher;1']. + getService(Ci.nsIWindowWatcher).activeWindow; + var ioService = Services.io; + var channel = ioService.newChannel(data, null, null); + var listener = { + extListener: null, + onStartRequest: function(aRequest, aContext) { + this.extListener = extHelperAppSvc.doContent('application/pdf', + aRequest, frontWindow, false); + this.extListener.onStartRequest(aRequest, aContext); + }, + onStopRequest: function(aRequest, aContext, aStatusCode) { + if (this.extListener) + this.extListener.onStopRequest(aRequest, aContext, aStatusCode); + }, + onDataAvailable: function(aRequest, aContext, aInputStream, aOffset, + aCount) { + this.extListener.onDataAvailable(aRequest, aContext, aInputStream, + aOffset, aCount); + } + }; + + channel.asyncOpen(listener, null); }, setDatabase: function(data) { - if (this.inPrivateBrowswing) + if (inPrivateBrowsing) return; // Protect against something sending tons of data to setDatabase. if (data.length > MAX_DATABASE_LENGTH) return; - application.prefs.setValue(EXT_PREFIX + '.database', data); + setStringPref(EXT_PREFIX + '.database', data); }, getDatabase: function() { - if (this.inPrivateBrowswing) + if (inPrivateBrowsing) return '{}'; - return application.prefs.getValue(EXT_PREFIX + '.database', '{}'); + return getStringPref(EXT_PREFIX + '.database', '{}'); + }, + getLocale: function() { + return getStringPref('general.useragent.locale', 'en-US'); + }, + getStrings: function(data) { + try { + // Lazy initialization of localizedStrings + if (!('localizedStrings' in this)) + this.localizedStrings = getLocalizedStrings('viewer.properties'); + + var result = this.localizedStrings[data]; + return JSON.stringify(result || null); + } catch (e) { + log('Unable to retrive localized strings: ' + e); + return 'null'; + } }, pdfBugEnabled: function() { - return application.prefs.getValue(EXT_PREFIX + '.pdfBugEnabled', false); + return getBoolPref(EXT_PREFIX + '.pdfBugEnabled', false); } }; diff --git a/browser/extensions/pdfjs/content/web/debugger.js b/browser/extensions/pdfjs/content/web/debugger.js index ee00121df45d..aeb3ab4ce5a9 100644 --- a/browser/extensions/pdfjs/content/web/debugger.js +++ b/browser/extensions/pdfjs/content/web/debugger.js @@ -1,8 +1,4 @@ /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. */ - /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ 'use strict'; @@ -167,29 +163,29 @@ var StepperManager = (function StepperManagerClosure() { enabled: false, active: false, // Stepper specific functions. - create: function create(pageNumber) { + create: function create(pageIndex) { var debug = document.createElement('div'); - debug.id = 'stepper' + pageNumber; + debug.id = 'stepper' + pageIndex; debug.setAttribute('hidden', true); debug.className = 'stepper'; stepperDiv.appendChild(debug); var b = document.createElement('option'); - b.textContent = 'Page ' + (pageNumber + 1); - b.value = pageNumber; + b.textContent = 'Page ' + (pageIndex + 1); + b.value = pageIndex; stepperChooser.appendChild(b); - var initBreakPoints = breakPoints[pageNumber] || []; - var stepper = new Stepper(debug, pageNumber, initBreakPoints); + var initBreakPoints = breakPoints[pageIndex] || []; + var stepper = new Stepper(debug, pageIndex, initBreakPoints); steppers.push(stepper); if (steppers.length === 1) - this.selectStepper(pageNumber, false); + this.selectStepper(pageIndex, false); return stepper; }, - selectStepper: function selectStepper(pageNumber, selectPanel) { + selectStepper: function selectStepper(pageIndex, selectPanel) { if (selectPanel) this.manager.selectPanel(1); for (var i = 0; i < steppers.length; ++i) { var stepper = steppers[i]; - if (stepper.pageNumber == pageNumber) + if (stepper.pageIndex == pageIndex) stepper.panel.removeAttribute('hidden'); else stepper.panel.setAttribute('hidden', true); @@ -197,11 +193,11 @@ var StepperManager = (function StepperManagerClosure() { var options = stepperChooser.options; for (var i = 0; i < options.length; ++i) { var option = options[i]; - option.selected = option.value == pageNumber; + option.selected = option.value == pageIndex; } }, - saveBreakPoints: function saveBreakPoints(pageNumber, bps) { - breakPoints[pageNumber] = bps; + saveBreakPoints: function saveBreakPoints(pageIndex, bps) { + breakPoints[pageIndex] = bps; sessionStorage.setItem('pdfjsBreakPoints', JSON.stringify(breakPoints)); } }; @@ -209,12 +205,12 @@ var StepperManager = (function StepperManagerClosure() { // The stepper for each page's IRQueue. var Stepper = (function StepperClosure() { - function Stepper(panel, pageNumber, initialBreakPoints) { + function Stepper(panel, pageIndex, initialBreakPoints) { this.panel = panel; this.len; this.breakPoint = 0; this.nextBreakPoint = null; - this.pageNumber = pageNumber; + this.pageIndex = pageIndex; this.breakPoints = initialBreakPoints; this.currentIdx = -1; } @@ -260,7 +256,7 @@ var Stepper = (function StepperClosure() { self.breakPoints.push(x); else self.breakPoints.splice(self.breakPoints.indexOf(x), 1); - StepperManager.saveBreakPoints(self.pageNumber, self.breakPoints); + StepperManager.saveBreakPoints(self.pageIndex, self.breakPoints); } })(i); @@ -282,7 +278,7 @@ var Stepper = (function StepperClosure() { return null; }, breakIt: function breakIt(idx, callback) { - StepperManager.selectStepper(this.pageNumber, true); + StepperManager.selectStepper(this.pageIndex, true); var self = this; var dom = document; self.currentIdx = idx; @@ -427,8 +423,9 @@ var PDFBug = (function PDFBugClosure() { panels.setAttribute('class', 'panels'); ui.appendChild(panels); - document.body.appendChild(ui); - document.body.style.paddingRight = panelWidth + 'px'; + var container = document.getElementById('viewerContainer'); + container.appendChild(ui); + container.style.right = panelWidth + 'px'; // Initialize all the debugging tools. var tools = this.tools; diff --git a/browser/extensions/pdfjs/content/web/images/annotation-check.svg b/browser/extensions/pdfjs/content/web/images/annotation-check.svg new file mode 100644 index 000000000000..e0e1590a937c --- /dev/null +++ b/browser/extensions/pdfjs/content/web/images/annotation-check.svg @@ -0,0 +1,3 @@ + + + diff --git a/browser/extensions/pdfjs/content/web/images/comment.svg b/browser/extensions/pdfjs/content/web/images/annotation-comment.svg similarity index 57% rename from browser/extensions/pdfjs/content/web/images/comment.svg rename to browser/extensions/pdfjs/content/web/images/annotation-comment.svg index 596dc33b5ec4..84feef1c89f7 100644 --- a/browser/extensions/pdfjs/content/web/images/comment.svg +++ b/browser/extensions/pdfjs/content/web/images/annotation-comment.svg @@ -1,7 +1,3 @@ - - diff --git a/browser/extensions/pdfjs/content/web/images/annotation-text.svg b/browser/extensions/pdfjs/content/web/images/annotation-text.svg new file mode 100644 index 000000000000..25df8f466b23 --- /dev/null +++ b/browser/extensions/pdfjs/content/web/images/annotation-text.svg @@ -0,0 +1,46 @@ + + + + + + + + + diff --git a/browser/extensions/pdfjs/content/web/images/bookmark.svg b/browser/extensions/pdfjs/content/web/images/bookmark.svg deleted file mode 100644 index bee6efefdfb4..000000000000 --- a/browser/extensions/pdfjs/content/web/images/bookmark.svg +++ /dev/null @@ -1,662 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - New Bookmark - - - bookmark - remember - favorite - - - - - - Andreas Nilsson - - - - - - Jakub Steiner - - - create bookmark action - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/browser/extensions/pdfjs/content/web/images/check.svg b/browser/extensions/pdfjs/content/web/images/check.svg deleted file mode 100644 index ebb376166a8c..000000000000 --- a/browser/extensions/pdfjs/content/web/images/check.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/browser/extensions/pdfjs/content/web/images/document-print.svg b/browser/extensions/pdfjs/content/web/images/document-print.svg deleted file mode 100644 index 4d062fbb69a9..000000000000 --- a/browser/extensions/pdfjs/content/web/images/document-print.svg +++ /dev/null @@ -1,533 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Print Document - - - Jakub Steiner - - - - http://jimmac.musichall.cz - - - document - lpr - print - local - laser - bubblejet - inkjet - print - output - cups - lpd - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/browser/extensions/pdfjs/content/web/images/download.svg b/browser/extensions/pdfjs/content/web/images/download.svg deleted file mode 100644 index 884e3deed553..000000000000 --- a/browser/extensions/pdfjs/content/web/images/download.svg +++ /dev/null @@ -1,620 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Save - - - Jakub Steiner - - - - - hdd - hard drive - save - io - store - - - - - http://jimmac.musichall.cz - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/browser/extensions/pdfjs/content/web/images/go-down.svg b/browser/extensions/pdfjs/content/web/images/go-down.svg deleted file mode 100644 index 655fdba16dcd..000000000000 --- a/browser/extensions/pdfjs/content/web/images/go-down.svg +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Go Down - - - go - lower - down - arrow - pointer - > - - - - - Andreas Nilsson - - - - - - - - - - - - - - - - - - - diff --git a/browser/extensions/pdfjs/content/web/images/go-up.svg b/browser/extensions/pdfjs/content/web/images/go-up.svg deleted file mode 100644 index 5e2f9a2c645b..000000000000 --- a/browser/extensions/pdfjs/content/web/images/go-up.svg +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - Jakub Steiner - - - http://jimmac.musichall.cz - - Go Up - - - go - higher - up - arrow - pointer - > - - - - - Andreas Nilsson - - - - - - - - - - - - - - - - - diff --git a/browser/extensions/pdfjs/content/web/images/nav-outline.svg b/browser/extensions/pdfjs/content/web/images/nav-outline.svg deleted file mode 100644 index 0f053530f59b..000000000000 --- a/browser/extensions/pdfjs/content/web/images/nav-outline.svg +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/browser/extensions/pdfjs/content/web/images/nav-thumbs.svg b/browser/extensions/pdfjs/content/web/images/nav-thumbs.svg deleted file mode 100644 index 58a36dcac6e9..000000000000 --- a/browser/extensions/pdfjs/content/web/images/nav-thumbs.svg +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/browser/extensions/pdfjs/content/web/images/pin-down.svg b/browser/extensions/pdfjs/content/web/images/pin-down.svg deleted file mode 100644 index e48bba0741c1..000000000000 --- a/browser/extensions/pdfjs/content/web/images/pin-down.svg +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/browser/extensions/pdfjs/content/web/images/pin-up.svg b/browser/extensions/pdfjs/content/web/images/pin-up.svg deleted file mode 100644 index c830382e2d2c..000000000000 --- a/browser/extensions/pdfjs/content/web/images/pin-up.svg +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff --git a/browser/extensions/pdfjs/content/web/images/texture.png b/browser/extensions/pdfjs/content/web/images/texture.png new file mode 100644 index 000000000000..df0086493236 Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/texture.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-bookmark.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-bookmark.png new file mode 100644 index 000000000000..1e5259a97ae3 Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-bookmark.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-download.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-download.png new file mode 100644 index 000000000000..8676d8e2c2c0 Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-download.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-menuArrows.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-menuArrows.png new file mode 100644 index 000000000000..31b06b5af9e5 Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-menuArrows.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-openFile.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-openFile.png new file mode 100644 index 000000000000..12ce45f876b1 Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-openFile.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-pageDown-rtl.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-pageDown-rtl.png new file mode 100644 index 000000000000..c0051f8f0408 Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-pageDown-rtl.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-pageDown.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-pageDown.png new file mode 100644 index 000000000000..762ac43e08cf Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-pageDown.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-pageUp-rtl.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-pageUp-rtl.png new file mode 100644 index 000000000000..0d49d8e95e3f Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-pageUp-rtl.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-pageUp.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-pageUp.png new file mode 100644 index 000000000000..3155b8bd235c Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-pageUp.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-print.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-print.png new file mode 100644 index 000000000000..fef84dd59493 Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-print.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-sidebarToggle.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-sidebarToggle.png new file mode 100644 index 000000000000..5a937c712b05 Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-sidebarToggle.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-viewOutline.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-viewOutline.png new file mode 100644 index 000000000000..cb3967b7f3c5 Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-viewOutline.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-viewThumbnail.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-viewThumbnail.png new file mode 100644 index 000000000000..3a27f0439399 Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-viewThumbnail.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-zoomIn.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-zoomIn.png new file mode 100644 index 000000000000..670acd93f532 Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-zoomIn.png differ diff --git a/browser/extensions/pdfjs/content/web/images/toolbarButton-zoomOut.png b/browser/extensions/pdfjs/content/web/images/toolbarButton-zoomOut.png new file mode 100644 index 000000000000..810fbf9895d5 Binary files /dev/null and b/browser/extensions/pdfjs/content/web/images/toolbarButton-zoomOut.png differ diff --git a/browser/extensions/pdfjs/content/web/images/zoom-in.svg b/browser/extensions/pdfjs/content/web/images/zoom-in.svg deleted file mode 100644 index 48ee42dd9b80..000000000000 --- a/browser/extensions/pdfjs/content/web/images/zoom-in.svg +++ /dev/null @@ -1,437 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Add - 2006-01-04 - - - Andreas Nilsson - - - http://tango-project.org - - - add - plus - - - - - - - - - - - - - - - - - - diff --git a/browser/extensions/pdfjs/content/web/images/zoom-out.svg b/browser/extensions/pdfjs/content/web/images/zoom-out.svg deleted file mode 100644 index eb13b60e376c..000000000000 --- a/browser/extensions/pdfjs/content/web/images/zoom-out.svg +++ /dev/null @@ -1,425 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Remove - 2006-01-04 - - - Andreas Nilsson - - - http://tango-project.org - - - remove - delete - - - - - - - - - - - - - - - - - diff --git a/browser/extensions/pdfjs/content/web/l10n.js b/browser/extensions/pdfjs/content/web/l10n.js new file mode 100644 index 000000000000..b16636e31cbe --- /dev/null +++ b/browser/extensions/pdfjs/content/web/l10n.js @@ -0,0 +1,114 @@ +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ + +'use strict'; + +// Small subset of the webL10n API by Fabien Cazenave for pdf.js extension. +(function(window) { + var gLanguage = ''; + + // fetch an l10n objects + function getL10nData(key) { + var response = FirefoxCom.request('getStrings', key); + var data = JSON.parse(response); + if (!data) + console.warn('[l10n] #' + key + ' missing for [' + gLanguage + ']'); + return data; + } + + // replace {{arguments}} with their values + function substArguments(text, args) { + if (!args) + return text; + + return text.replace(/\{\{\s*(\w+)\s*\}\}/g, function(all, name) { + return name in args ? args[name] : '{{' + name + '}}'; + }); + } + + // translate a string + function translateString(key, args, fallback) { + var data = getL10nData(key); + if (!data && fallback) + data = {textContent: fallback}; + if (!data) + return '{{' + key + '}}'; + return substArguments(data.textContent, args); + } + + // translate an HTML element + function translateElement(element) { + if (!element || !element.dataset) + return; + + // get the related l10n object + var data = getL10nData(element.dataset.l10nId); + if (!data) + return; + + // get arguments (if any) + // TODO: more flexible parser? + var args; + if (element.dataset.l10nArgs) try { + args = JSON.parse(element.dataset.l10nArgs); + } catch (e) { + console.warn('[l10n] could not parse arguments for #' + key + ''); + } + + // translate element + // TODO: security check? + for (var k in data) + element[k] = substArguments(data[k], args); + } + + + // translate an HTML subtree + function translateFragment(element) { + element = element || document.querySelector('html'); + + // check all translatable children (= w/ a `data-l10n-id' attribute) + var children = element.querySelectorAll('*[data-l10n-id]'); + var elementCount = children.length; + for (var i = 0; i < elementCount; i++) + translateElement(children[i]); + + // translate element itself if necessary + if (element.dataset.l10nId) + translateElement(element); + } + + window.addEventListener('DOMContentLoaded', function() { + gLanguage = FirefoxCom.request('getLocale', null); + + translateFragment(); + + // fire a 'localized' DOM event + var evtObject = document.createEvent('Event'); + evtObject.initEvent('localized', false, false); + evtObject.language = gLanguage; + window.dispatchEvent(evtObject); + }); + + // Public API + document.mozL10n = { + // get a localized string + get: translateString, + + // get|set the document language and direction + get language() { + return { + // get|set the document language (ISO-639-1) + get code() { return gLanguage; }, + + // get the direction (ltr|rtl) of the current language + get direction() { + // http://www.w3.org/International/questions/qa-scripts + // Arabic, Hebrew, Farsi, Pashto, Urdu + var rtlList = ['ar', 'he', 'fa', 'ps', 'ur']; + return (rtlList.indexOf(gLanguage) >= 0) ? 'rtl' : 'ltr'; + } + }; + } + }; +})(this); + diff --git a/browser/extensions/pdfjs/content/web/viewer-snippet-firefox-extension.html b/browser/extensions/pdfjs/content/web/viewer-snippet-firefox-extension.html deleted file mode 100644 index 3fe953e620af..000000000000 --- a/browser/extensions/pdfjs/content/web/viewer-snippet-firefox-extension.html +++ /dev/null @@ -1,32304 +0,0 @@ - - - - diff --git a/browser/extensions/pdfjs/content/web/viewer.css b/browser/extensions/pdfjs/content/web/viewer.css index b5e1d8d73bb9..d0a7be9a0203 100644 --- a/browser/extensions/pdfjs/content/web/viewer.css +++ b/browser/extensions/pdfjs/content/web/viewer.css @@ -1,179 +1,671 @@ -/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- / -/* vim: set shiftwidth=4 tabstop=8 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/. */ - - -body { - background-color: #929292; - font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; - margin: 0px; - padding: 0px; +* { + padding: 0; + margin: 0; } +html { + height: 100%; +} + +body { + height: 100%; + background-color: #404040; + background-image: url(images/texture.png); + font-family: Segoe UI, Verdana, sans-serif; +} + +.hidden { + display: none; +} [hidden] { display: none !important; } -/* === Toolbar === */ -#controls { - background-color: #eee; - background: -o-linear-gradient(bottom,#eee 0%,#fff 100%); - background: -moz-linear-gradient(center bottom, #eee 0%, #fff 100%); - background: -webkit-gradient(linear, left bottom, left top, color-stop(0.0, #ddd), color-stop(1.0, #fff)); - border-bottom: 1px solid #666; - padding: 3px; - position: fixed; - left: 0px; - top: 0px; - height: 24px; +/* outer/inner center provides horizontal center */ +html[dir='ltr'] .outerCenter { + float: right; + position: relative; + right: 50%; +} +html[dir='rtl'] .outerCenter { + float: left; + position: relative; + left: 50%; +} +html[dir='ltr'] .innerCenter { + float: right; + position: relative; + right: -50%; +} +html[dir='rtl'] .innerCenter { + float: left; + position: relative; + left: -50%; +} + +#outerContainer { width: 100%; - z-index: 1; - white-space:nowrap; - overflow: hidden; -} - -.separator { - display: inline; - border-left: 1px solid #d3d3d3; - border-right: 1px solid #fff; - height: 16px; - width:0px; - margin: 4px; -} - -#controls > a > img { - margin: 4px; - height: 16px; -} - -#controls > button { - line-height: 16px; -} - -#controls > button > img { - width: 16px; - height: 16px; -} - -#controls > button[disabled] > img { - opacity: 0.5; -} - -#pageNumber { - text-align: right; -} - -#fileInput { - line-height: 16px; -} - -/* === Sidebar === */ -#sidebar { - position: fixed; - width: 350px; - top: 62px; - bottom: 18px; - left: -290px; - transition: left 0.25s ease-in-out 1s; - -o-transition: left 0.25s ease-in-out 1s; - -moz-transition: left 0.25s ease-in-out 1s; - -webkit-transition: left 0.25s ease-in-out 1s; - z-index: 1; -} - -#sidebar:hover, -#sidebar.pinned { - left: 0px; - transition: left 0.25s ease-in-out 0s; - -o-transition: left 0.25s ease-in-out 0s; - -moz-transition: left 0.25s ease-in-out 0s; - -webkit-transition: left 0.25s ease-in-out 0s; -} - -#pinIcon { - position: absolute; - top: 4px; - right: 55px; - width: 15px; - height: 15px; - background: center no-repeat; - background-image: url('images/pin-up.svg'); - background-size: 15px 15px; -} - -#pinIcon:hover { - background-color: rgba(255,255,255,0.35); -} - -#sidebar.pinned #pinIcon { - background-image: url('images/pin-down.svg'); - background-size: 15px 15px; -} - -#sidebarBox { - background-color: rgba(0, 0, 0, 0.7); - width: 300px; height: 100%; - border-top-right-radius: 8px; - border-bottom-right-radius: 8px; - -moz-border-radius-topright: 8px; - -moz-border-radius-bottomright: 8px; - -webkit-border-top-right-radius: 8px; - -webkit-border-bottom-right-radius: 8px; - box-shadow: 0px 2px 8px #000; - -moz-box-shadow: 0px 2px 8px #000; - -webkit-box-shadow: 0px 2px 8px #000; } -#sidebarScrollView { +#sidebarContainer { position: absolute; + top: 0; + bottom: 0; + width: 200px; + visibility: hidden; + -moz-transition-duration: 200ms; + -moz-transition-timing-function: ease; + -webkit-transition-duration: 200ms; + -webkit-transition-timing-function: ease; +} +html[dir='ltr'] #sidebarContainer { + -moz-transition-property: left; + -webkit-transition-property: left; + left: -200px; +} +html[dir='rtl'] #sidebarContainer { + -moz-transition-property: right; + -webkit-transition-property: right; + right: -200px; +} + +#outerContainer.sidebarMoving > #sidebarContainer, +#outerContainer.sidebarOpen > #sidebarContainer { + visibility: visible; +} +html[dir='ltr'] #outerContainer.sidebarOpen > #sidebarContainer { + left: 0px; +} +html[dir='rtl'] #outerContainer.sidebarOpen > #sidebarContainer { + right: 0px; +} + +#mainContainer { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + -moz-transition-duration: 200ms; + -moz-transition-timing-function: ease; + -webkit-transition-duration: 200ms; + -webkit-transition-timing-function: ease; +} +html[dir='ltr'] #outerContainer.sidebarOpen > #mainContainer { + -moz-transition-property: left; + -webkit-transition-property: left; + left: 200px; +} +html[dir='rtl'] #outerContainer.sidebarOpen > #mainContainer { + -moz-transition-property: right; + -webkit-transition-property: right; + right: 200px; +} + +#sidebarContent { + top: 32px; + bottom: 0; + overflow: auto; + position: absolute; + width: 200px; + + background-color: hsla(0,0%,0%,.1); + box-shadow: inset -1px 0 0 hsla(0,0%,0%,.25); +} +html[dir='ltr'] #sidebarContent { + left: 0; +} +html[dir='rtl'] #sidebarContent { + right: 0; +} + +#viewerContainer { + overflow: auto; + box-shadow: inset 1px 0 0 hsla(0,0%,100%,.05); + padding-top: 30px; + position: absolute; + top: 32px; + right: 0; + bottom: 0; + left: 0; +} + +.toolbar { + position: absolute; + left: 0; + right: 0; + height: 32px; + z-index: 9999; + cursor: default; +} + +#toolbarContainer { + width: 100%; +} + +#toolbarSidebar { + width: 200px; + height: 32px; + background-image: url(images/texture.png), + -moz-linear-gradient(hsla(0,0%,30%,.99), hsla(0,0%,25%,.95)); + background-image: url(images/texture.png), + -webkit-linear-gradient(hsla(0,0%,30%,.99), hsla(0,0%,25%,.95)); + box-shadow: inset -2px 0 0 hsla(0,0%,100%,.08), + inset 0 1px 1px hsla(0,0%,0%,.15), + inset 0 -1px 0 hsla(0,0%,100%,.05), + 0 1px 0 hsla(0,0%,0%,.15), + 0 1px 1px hsla(0,0%,0%,.1); +} + +#toolbarViewer { + position: relative; + height: 32px; + background-image: url(images/texture.png), + -moz-linear-gradient(hsla(0,0%,32%,.99), hsla(0,0%,27%,.95)); + background-image: url(images/texture.png), + -webkit-linear-gradient(hsla(0,0%,32%,.99), hsla(0,0%,27%,.95)); + border-left: 1px solid hsla(0,0%,0%,.5); + box-shadow: inset 1px 0 0 hsla(0,0%,100%,.08), + inset 0 1px 1px hsla(0,0%,0%,.15), + inset 0 -1px 0 hsla(0,0%,100%,.05), + 0 1px 0 hsla(0,0%,0%,.15), + 0 1px 1px hsla(0,0%,0%,.1); +} +html[dir='ltr'] #toolbarViewerLeft { + margin-left: -1px; +} +html[dir='rtl'] #toolbarViewerRight { + margin-left: -1px; +} + + +html[dir='ltr'] #toolbarViewerLeft, +html[dir='rtl'] #toolbarViewerRight { + position: absolute; + top: 0; + left: 0; +} +html[dir='ltr'] #toolbarViewerRight, +html[dir='rtl'] #toolbarViewerLeft { + position: absolute; + top: 0; + right: 0; +} +html[dir='ltr'] #toolbarViewerLeft > *, +html[dir='ltr'] #toolbarViewerMiddle > *, +html[dir='ltr'] #toolbarViewerRight > * { + float: left; +} +html[dir='rtl'] #toolbarViewerLeft > *, +html[dir='rtl'] #toolbarViewerMiddle > *, +html[dir='rtl'] #toolbarViewerRight > * { + float: right; +} + +html[dir='ltr'] .splitToolbarButton { + margin: 3px 2px 4px 0; + display: inline-block; +} +html[dir='rtl'] .splitToolbarButton { + margin: 3px 0 4px 2px; + display: inline-block; +} +html[dir='ltr'] .splitToolbarButton > .toolbarButton { + border-radius: 0; + float: left; +} +html[dir='rtl'] .splitToolbarButton > .toolbarButton { + border-radius: 0; + float: right; +} + +.toolbarButton { + border: 0 none; + background-color: rgba(0, 0, 0, 0); + width: 32px; + height: 25px; +} + +.toolbarButton > span { + display: inline-block; + width: 0; + height: 0; overflow: hidden; - overflow-y: auto; - top: 20px; - bottom: 10px; - left: 10px; - width: 280px; +} + +.toolbarButton[disabled] { + opacity: .5; +} + +.splitToolbarButton:hover > .toolbarButton, +.splitToolbarButton:focus > .toolbarButton, +.splitToolbarButton.toggled > .toolbarButton { + background-color: hsla(0,0%,0%,.12); + background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); + background-image: -webkit-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); + background-clip: padding-box; + border: 1px solid hsla(0,0%,0%,.35); + border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42); + box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, + 0 0 1px hsla(0,0%,100%,.15) inset, + 0 1px 0 hsla(0,0%,100%,.05); + -moz-transition-property: background-color, border-color, box-shadow; + -moz-transition-duration: 150ms; + -moz-transition-timing-function: ease; + -webkit-transition-property: background-color, border-color, box-shadow; + -webkit-transition-duration: 150ms; + -webkit-transition-timing-function: ease; +} +.splitToolbarButton > .toolbarButton:hover, +.splitToolbarButton > .toolbarButton:focus, +.dropdownToolbarButton:hover { + background-color: hsla(0,0%,0%,.2); + box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, + 0 0 1px hsla(0,0%,100%,.15) inset, + 0 0 1px hsla(0,0%,0%,.05); + z-index: 199; +} +html[dir='ltr'] .splitToolbarButton > .toolbarButton:first-child, +html[dir='rtl'] .splitToolbarButton > .toolbarButton:last-child { + position: relative; + margin: 0; + margin-right: -1px; + border-top-left-radius: 2px; + border-bottom-left-radius: 2px; + border-right-color: transparent; +} +html[dir='ltr'] .splitToolbarButton > .toolbarButton:last-child, +html[dir='rtl'] .splitToolbarButton > .toolbarButton:first-child { + position: relative; + margin: 0; + margin-left: -1px; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; + border-left-color: transparent; +} +.splitToolbarButtonSeparator { + padding: 8px 0; + width: 1px; + background-color: hsla(0,0%,00%,.5); + z-index: 99; + box-shadow: 0 0 0 1px hsla(0,0%,100%,.08); + display: inline-block; + margin: 5px 0; +} +html[dir='ltr'] .splitToolbarButtonSeparator { + float:left; +} +html[dir='rtl'] .splitToolbarButtonSeparator { + float:right; +} +.splitToolbarButton:hover > .splitToolbarButtonSeparator, +.splitToolbarButton.toggled > .splitToolbarButtonSeparator { + padding: 12px 0; + margin: 0; + box-shadow: 0 0 0 1px hsla(0,0%,100%,.03); + -moz-transition-property: padding; + -moz-transition-duration: 10ms; + -moz-transition-timing-function: ease; + -webkit-transition-property: padding; + -webkit-transition-duration: 10ms; + -webkit-transition-timing-function: ease; +} + +.toolbarButton, +.dropdownToolbarButton { + min-width: 16px; + padding: 2px 6px 0; + border: 1px solid transparent; + border-radius: 2px; + color: hsl(0,0%,95%); + font-size: 12px; + line-height: 14px; + -moz-user-select:none; + -webkit-user-select:none; + cursor: default; + -moz-transition-property: background-color, border-color, box-shadow; + -moz-transition-duration: 150ms; + -moz-transition-timing-function: ease; + -webkit-transition-property: background-color, border-color, box-shadow; + -webkit-transition-duration: 150ms; + -webkit-transition-timing-function: ease; +} + +html[dir='ltr'] .toolbarButton, +html[dir='ltr'] .dropdownToolbarButton { + margin: 3px 2px 4px 0; +} +html[dir='rtl'] .toolbarButton, +html[dir='rtl'] .dropdownToolbarButton { + margin: 3px 0 4px 2px; +} + +.toolbarButton:hover, +.toolbarButton:focus, +.dropdownToolbarButton { + background-color: hsla(0,0%,0%,.12); + background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); + background-image: -webkit-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); + background-clip: padding-box; + border: 1px solid hsla(0,0%,0%,.35); + border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42); + box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, + 0 0 1px hsla(0,0%,100%,.15) inset, + 0 1px 0 hsla(0,0%,100%,.05); +} + +.toolbarButton:hover:active, +.dropdownToolbarButton:hover:active { + background-color: hsla(0,0%,0%,.2); + background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); + background-image: -webkit-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); + border-color: hsla(0,0%,0%,.35) hsla(0,0%,0%,.4) hsla(0,0%,0%,.45); + box-shadow: 0 1px 1px hsla(0,0%,0%,.1) inset, + 0 0 1px hsla(0,0%,0%,.2) inset, + 0 1px 0 hsla(0,0%,100%,.05); + -moz-transition-property: background-color, border-color, box-shadow; + -moz-transition-duration: 10ms; + -moz-transition-timing-function: linear; + -webkit-transition-property: background-color, border-color, box-shadow; + -webkit-transition-duration: 10ms; + -webkit-transition-timing-function: linear; +} + +.toolbarButton.toggled, +.splitToolbarButton.toggled > .toolbarButton.toggled { + background-color: hsla(0,0%,0%,.3); + background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); + background-image: -webkit-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); + border-color: hsla(0,0%,0%,.4) hsla(0,0%,0%,.45) hsla(0,0%,0%,.5); + box-shadow: 0 1px 1px hsla(0,0%,0%,.1) inset, + 0 0 1px hsla(0,0%,0%,.2) inset, + 0 1px 0 hsla(0,0%,100%,.05); + -moz-transition-property: background-color, border-color, box-shadow; + -moz-transition-duration: 10ms; + -moz-transition-timing-function: linear; + -webkit-transition-property: background-color, border-color, box-shadow; + -webkit-transition-duration: 10ms; + -webkit-transition-timing-function: linear; +} + +.toolbarButton.toggled:hover:active, +.splitToolbarButton.toggled > .toolbarButton.toggled:hover:active { + background-color: hsla(0,0%,0%,.4); + border-color: hsla(0,0%,0%,.4) hsla(0,0%,0%,.5) hsla(0,0%,0%,.55); + box-shadow: 0 1px 1px hsla(0,0%,0%,.2) inset, + 0 0 1px hsla(0,0%,0%,.3) inset, + 0 1px 0 hsla(0,0%,100%,.05); +} + +.dropdownToolbarButton { + min-width: 120px; + max-width: 120px; + padding: 3px 2px 2px; + overflow: hidden; + background: url(images/toolbarButton-menuArrows.png) no-repeat; +} +html[dir='ltr'] .dropdownToolbarButton { + background-position: 95%; +} +html[dir='rtl'] .dropdownToolbarButton { + background-position: 5%; +} + +.dropdownToolbarButton > select { + -moz-appearance: none; /* in the future this might matter, see bugzilla bug #649849 */ + -webkit-appearance: none; + min-width: 140px; + font-size: 12px; + color: hsl(0,0%,95%); + margin:0; + padding:0; + border:none; + background: transparent; +} + +.dropdownToolbarButton > select > option { + background: hsl(0,0%,24%); +} + +#customScaleOption { + display: none; +} + +#pageWidthOption { + border-bottom: 1px rgba(255, 255, 255, .5) solid; +} + +html[dir='ltr'] .splitToolbarButton:first-child, +html[dir='ltr'] .toolbarButton:first-child, +html[dir='rtl'] .splitToolbarButton:last-child, +html[dir='rtl'] .toolbarButton:last-child { + margin-left: 4px; +} +html[dir='ltr'] .splitToolbarButton:last-child, +html[dir='ltr'] .toolbarButton:last-child, +html[dir='rtl'] .splitToolbarButton:first-child, +html[dir='rtl'] .toolbarButton:first-child { + margin-right: 4px; +} + +.toolbarButtonSpacer { + width: 30px; + display: inline-block; + height: 1px; +} + +.toolbarButtonFlexibleSpacer { + -moz-box-flex: 1; + -webkit-box-flex: 1; + min-width: 30px; +} + +.toolbarButton#sidebarToggle::before { + display: inline-block; + content: url(images/toolbarButton-sidebarToggle.png); +} + +html[dir='ltr'] .toolbarButton.pageUp::before { + display: inline-block; + content: url(images/toolbarButton-pageUp.png); +} + +html[dir='rtl'] .toolbarButton.pageUp::before { + display: inline-block; + content: url(images/toolbarButton-pageUp-rtl.png); +} + +html[dir='ltr'] .toolbarButton.pageDown::before { + display: inline-block; + content: url(images/toolbarButton-pageDown.png); +} + +html[dir='rtl'] .toolbarButton.pageDown::before { + display: inline-block; + content: url(images/toolbarButton-pageDown-rtl.png); +} + +.toolbarButton.zoomOut::before { + display: inline-block; + content: url(images/toolbarButton-zoomOut.png); +} + +.toolbarButton.zoomIn::before { + display: inline-block; + content: url(images/toolbarButton-zoomIn.png); +} + +.toolbarButton.print::before { + display: inline-block; + content: url(images/toolbarButton-print.png); +} + +.toolbarButton.openFile::before { + display: inline-block; + content: url(images/toolbarButton-openFile.png); +} + +.toolbarButton.download::before { + display: inline-block; + content: url(images/toolbarButton-download.png); +} + +.toolbarButton.bookmark { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + margin-top: 3px; + padding-top: 4px; +} + +.toolbarButton.bookmark::before { + content: url(images/toolbarButton-bookmark.png); +} + +#viewThumbnail.toolbarButton::before { + display: inline-block; + content: url(images/toolbarButton-viewThumbnail.png); +} + +#viewOutline.toolbarButton::before { + display: inline-block; + content: url(images/toolbarButton-viewOutline.png); +} + +.toolbarField { + min-width: 16px; + width: 32px; + padding: 3px 6px; + margin: 4px 0 4px 0; + border: 1px solid transparent; + border-radius: 2px; + background-color: hsla(0,0%,100%,.09); + background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); + background-clip: padding-box; + border: 1px solid hsla(0,0%,0%,.35); + border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42); + box-shadow: 0 1px 0 hsla(0,0%,0%,.05) inset, + 0 1px 0 hsla(0,0%,100%,.05); + color: hsl(0,0%,95%); + font-size: 12px; + line-height: 14px; + text-align: right; + outline-style: none; + -moz-transition-property: background-color, border-color, box-shadow; + -moz-transition-duration: 150ms; + -moz-transition-timing-function: ease; +} + +.toolbarField.pageNumber { + width: 40px; +} + +.toolbarField.pageNumber::-webkit-inner-spin-button, +.toolbarField.pageNumber::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; +} + +.toolbarField:hover { + background-color: hsla(0,0%,100%,.11); + border-color: hsla(0,0%,0%,.4) hsla(0,0%,0%,.43) hsla(0,0%,0%,.45); +} + +.toolbarField:focus { + background-color: hsla(0,0%,100%,.15); + border-color: hsla(204,100%,65%,.8) hsla(204,100%,65%,.85) hsla(204,100%,65%,.9); +} + +.toolbarLabel { + min-width: 16px; + padding: 3px 6px 3px 2px; + margin: 4px 2px 4px 0; + border: 1px solid transparent; + border-radius: 2px; + color: hsl(0,0%,85%); + font-size: 12px; + line-height: 14px; + text-align: left; + -moz-user-select:none; + -webkit-user-select:none; + cursor: default; +} + +#thumbnailView { + position: fixed; + width: 120px; + top: 33px; + bottom: 0; + padding: 10px 40px 0; + overflow: auto; } .thumbnail { - width: 134px; - height: 134px; - margin-top: 5px; - margin-bottom: 5px; - margin-left:auto; - margin-right:auto; - line-height: 134px; - text-align: center; - overflow: hidden; + margin-bottom: 15px; + float: left; + width: 114px; + height: 142px; } .thumbnail:not([data-loaded]) { - background-color: gray; + border: 1px dashed rgba(255, 255, 255, 0.5); } -.thumbnail > canvas { - vertical-align: middle; - display: inline-block; +.thumbnailImage { + -moz-transition-duration: 150ms; + border: 1px solid transparent; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3); + opacity: 0.8; + z-index: 99; } -#outlineScrollView { - position: absolute; - background-color: #fff; - overflow: auto; - top: 20px; - bottom: 10px; - left: 10px; - width: 280px; +.thumbnailSelectionRing { + border-radius: 2px; + padding: 7px; + -moz-transition-duration: 150ms; +} + +a:focus > .thumbnail > .thumbnailSelectionRing > .thumbnailImage, +.thumbnail:hover > .thumbnailSelectionRing > .thumbnailImage { + opacity: .9; +} + +a:focus > .thumbnail > .thumbnailSelectionRing, +.thumbnail:hover > .thumbnailSelectionRing { + background-color: hsla(0,0%,100%,.15); + background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); + background-clip: padding-box; + box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, + 0 0 1px hsla(0,0%,100%,.2) inset, + 0 0 1px hsla(0,0%,0%,.2); + color: hsla(0,0%,100%,.9); +} + +.thumbnail.selected > .thumbnailSelectionRing > .thumbnailImage { + box-shadow: 0 0 0 1px hsla(0,0%,0%,.5); + opacity: 1; +} + +.thumbnail.selected > .thumbnailSelectionRing { + background-color: hsla(0,0%,100%,.3); + background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); + background-clip: padding-box; + box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, + 0 0 1px hsla(0,0%,100%,.1) inset, + 0 0 1px hsla(0,0%,0%,.2); + color: hsla(0,0%,100%,1); } #outlineView { - padding-top: 4px; - padding-bottom: 100px; - padding-left: 6px; - padding-right: 6px; - font-size: smaller; + position: fixed; + width: 192px; + top: 33px; + bottom: 0; + padding: 4px 4px 0; + overflow: auto; + -moz-user-select:none; + -webkit-user-select:none; } .outlineItem > .outlineItems { @@ -182,50 +674,54 @@ body { .outlineItem > a { text-decoration: none; - color: black; + display: block; + height: 20px; + padding: 2px 0 0 10px; + margin-bottom: 1px; + border-radius: 2px; + color: hsla(0,0%,100%,.8); + font-size: 13px; + line-height: 15px; + -moz-user-select:none; + cursor: default; + white-space: nowrap; } .outlineItem > a:hover { - background: #ff0; - box-shadow: 0px 2px 10px #ff0; + background-color: hsla(0,0%,100%,.02); + background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); + background-clip: padding-box; + box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, + 0 0 1px hsla(0,0%,100%,.2) inset, + 0 0 1px hsla(0,0%,0%,.2); + color: hsla(0,0%,100%,.9); } -#sidebarControls { - position:absolute; - width: 120px; - height: 32px; - left: 15px; - bottom: 35px; +.outlineItem.selected { + background-color: hsla(0,0%,100%,.08); + background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0)); + background-clip: padding-box; + box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset, + 0 0 1px hsla(0,0%,100%,.1) inset, + 0 0 1px hsla(0,0%,0%,.2); + color: hsla(0,0%,100%,1); } -#sidebarControls > button { - box-shadow: 0px 4px 10px #000; - -moz-box-shadow: 0px 4px 10px #000; - -webkit-box-shadow: 0px 4px 10px #000; +.noOutline { + font-size: 12px; + color: hsla(0,0%,100%,.8); + font-style: italic; } -#sidebarControls > button > img { - width: 32px; - height: 32px; -} -#sidebarControls > button[disabled] > img { - opacity: 0.5; -} -#sidebarControls > button[data-selected] { - box-shadow: 0px 4px 10px #ff0; - -moz-box-shadow: 0px 4px 10px #ff0; - -webkit-box-shadow: 0px 4px 10px #ff0; -} - -/* === Content view === */ canvas { margin: auto; display: block; } .page { + direction: ltr; width: 816px; height: 1056px; margin: 10px auto; @@ -260,6 +756,50 @@ canvas { background: url('images/loading-icon.gif') center no-repeat; } +#loadingBox { + margin: 100px 0; + text-align: center; + color: #ddd; + font-size: 14px; +} + +#loadingBar { + background-color: #333; + display: inline-block; + border: 1px solid black; + clear: both; + margin: 0px; + margin-top: 5px; + line-height: 0; + border-radius: 4px; + width: 200px; + height: 25px; +} + +#loadingBar .progress { + display: inline-block; + float: left; + + background: #666; + background: -moz-linear-gradient(top, #999 0%, #666 50%, #999 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#999), color-stop(50%,#666), color-stop(100%,#999)); + background: -webkit-linear-gradient(top, #999 0%,#666 50%,#999 100%); + background: -o-linear-gradient(top, #999 0%,#666 50%,#999 100%); + background: -ms-linear-gradient(top, #999 0%,#666 50%,#999 100%); + background: linear-gradient(top, #999 0%,#666 50%,#999 100%); + + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + + width: 0%; + height: 100%; +} + +#loadingBar .progress.full { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} + .textLayer { position: absolute; left: 0; @@ -276,6 +816,12 @@ canvas { line-height:1.3; } +/* TODO: file FF bug to support ::-moz-selection:window-inactive + so we can override the opaque grey background when the window is inactive; + see https://bugzilla.mozilla.org/show_bug.cgi?id=706209 */ +::selection { background:rgba(0,0,255,0.3); } +::-moz-selection { background:rgba(0,0,255,0.3); } + .annotComment > div { position: absolute; } @@ -305,39 +851,13 @@ canvas { margin: 0px; } -/* TODO: file FF bug to support ::-moz-selection:window-inactive - so we can override the opaque grey background when the window is inactive; - see https://bugzilla.mozilla.org/show_bug.cgi?id=706209 */ -::selection { background:rgba(0,0,255,0.3); } -::-moz-selection { background:rgba(0,0,255,0.3); } - -#viewer { - margin: 44px 0px 0px; - padding: 8px 0px; -} - -#sidebarView canvas:hover { - background: #ff0; - box-shadow: 0px 2px 10px #ff0; - -moz-box-shadow: 0px 2px 10px #ff0; - -webkit-box-shadow: 0px 2px 10px #ff0; -} - -#pageWidthOption { - border-top: 1px solid black; -} - -#customScaleOption { - display: none; -} - #errorWrapper { background: none repeat scroll 0 0 #FF5555; color: white; left: 0; - position: fixed; + position: absolute; right: 0; - top: 30px; + top: 32px; z-index: 1000; padding: 3px; font-size: 0.8em; @@ -363,116 +883,105 @@ canvas { clear: both; } -/* === Printed media overrides === */ -@media print { - #sidebar { - display: none; - } - - #controls { - display: none; - } - - #viewer { - margin: 0; - padding: 0; - } - - .page { - display: none; - margin: 0; - } - - .page canvas { - box-shadow: none; - -moz-box-shadow: none; - -webkit-box-shadow: none; - } - - .page[data-loaded] { - display: block; - page-break-after: always; - } -} - -#loadingBox { - margin: 100px 0; - text-align: center; -} - -#loadingBar { - background-color: #333; - display: inline-block; - border: 1px solid black; - clear: both; - margin:0px; - line-height: 0; - border-radius: 4px; - width: 15em; - height: 1.5em; -} - -#loadingBar .progress { - background-color: green; - display: inline-block; - float: left; - - background: #b4e391; - background: -moz-linear-gradient(top, #b4e391 0%, #61c419 50%, #b4e391 100%); - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b4e391), color-stop(50%,#61c419), color-stop(100%,#b4e391)); - background: -webkit-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%); - background: -o-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%); - background: -ms-linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%); - background: linear-gradient(top, #b4e391 0%,#61c419 50%,#b4e391 100%); - - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; - - width: 0%; - height: 100%; +.fileInput { + background: white; + color: black; + margin-top: 5px; } #PDFBug { - font-size: 10px; + background: none repeat scroll 0 0 white; + border: 1px solid #666666; position: fixed; - top: 35px; - bottom: 5px; - right: 2px; - width: 300px; - background: white; - border: 1px solid #666; - padding: 0; -} -#PDFBug .controls { - border-bottom: 1px solid #666; - padding: 3px; - background: -moz-linear-gradient(center bottom, #eee 0%, #fff 100%); -} -#PDFBug .panels { - overflow: auto; - position: absolute; - top: 27px; - left: 0; + top: 32px; right: 0; bottom: 0; + font-size: 10px; + padding: 0; + width: 300px; +} +#PDFBug .controls { + background:#EEEEEE; + border-bottom: 1px solid #666666; + padding: 3px; +} +#PDFBug .panels { + bottom: 0; + left: 0; + overflow: auto; + position: absolute; + right: 0; + top: 27px; } #PDFBug button.active { font-weight: bold; } .debuggerShowText { - background: yellow; + background: none repeat scroll 0 0 yellow; color: blue; opacity: 0.3; } .debuggerHideText:hover { - background: yellow; + background: none repeat scroll 0 0 yellow; opacity: 0.3; } #PDFBug .stats { + font-family: courier; font-size: 10px; white-space: pre; - font-family: courier; } #PDFBug .stats .title { - font-weight: bold; + font-weight: bold; +} +#PDFBug table { + font-size: 10px; +} + +@media all and (max-width: 950px) { + html[dir='ltr'] #outerContainer.sidebarMoving .outerCenter, + html[dir='ltr'] #outerContainer.sidebarOpen .outerCenter { + float: left; + left: 180px; + } + html[dir='rtl'] #outerContainer.sidebarMoving .outerCenter, + html[dir='rtl'] #outerContainer.sidebarOpen .outerCenter { + float: right; + right: 180px; + } +} + +@media all and (max-width: 770px) { + #sidebarContainer { + top: 33px; + z-index: 100; + } + #sidebarContent { + top: 32px; + background-color: hsla(0,0%,0%,.7); + } + #thumbnailView, #outlineView { + top: 66px; + } + + html[dir='ltr'] #outerContainer.sidebarOpen > #mainContainer { + left: 0px; + } + html[dir='rtl'] #outerContainer.sidebarOpen > #mainContainer { + right: 0px; + } + + html[dir='ltr'] .outerCenter { + float: left; + left: 180px; + } + html[dir='rtl'] .outerCenter { + float: right; + right: 180px; + } +} + +@media all and (max-width: 600px) { + #toolbarViewerRight { + display: none; + } } diff --git a/browser/extensions/pdfjs/content/web/viewer.html b/browser/extensions/pdfjs/content/web/viewer.html index bf66ca4f1d8a..dddf01f49268 100644 --- a/browser/extensions/pdfjs/content/web/viewer.html +++ b/browser/extensions/pdfjs/content/web/viewer.html @@ -1,15 +1,18 @@ - - - Simple pdf.js page viewer - + + + + PDF.js viewer + + - + - - - - - - + + + + -
- + - - -