Skip to content

Commit

Permalink
Merge branch 'embedlite_compositorReworkProtectedVersion' into embedlite
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeshkova committed Jun 1, 2014
2 parents 174cd42 + fb56c98 commit 203c37e
Show file tree
Hide file tree
Showing 2,568 changed files with 115,749 additions and 36,539 deletions.
3 changes: 3 additions & 0 deletions .hgignore
Expand Up @@ -62,6 +62,9 @@ _OPT\.OBJ/
^browser/devtools/chrome.manifest$
^toolkit/devtools/chrome.manifest$

# git checkout of libstagefright
^media/libstagefright/android$

# Tag files generated by GNU Global
GTAGS
GRTAGS
Expand Down
2 changes: 1 addition & 1 deletion CLOBBER
Expand Up @@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.

Bug 994964 apparently requires a clobber, unclear why
Bug 1004726 requires a clobber for B2G Emulator builds
135 changes: 132 additions & 3 deletions accessible/public/nsIAccessibleTextRange.idl
Expand Up @@ -6,20 +6,149 @@
#include "nsISupports.idl"

interface nsIAccessible;
interface nsIAccessibleText;
interface nsIArray;
interface nsIVariant;

/**
* A range representing a piece of text in the document.
*/
[scriptable, uuid(6fe17c33-6709-4d7a-9ba0-3d448c4b3ef4)]
[scriptable, uuid(525b3401-8a67-4822-b35d-661065767cd8)]
interface nsIAccessibleTextRange : nsISupports
{
readonly attribute nsIAccessible startContainer;
readonly attribute nsIAccessibleText startContainer;
readonly attribute long startOffset;
readonly attribute nsIAccessible endContainer;
readonly attribute nsIAccessibleText endContainer;
readonly attribute long endOffset;

/**
* Return an accessible containing the whole range
*/
readonly attribute nsIAccessible container;

/**
* Return embedded children within the range.
*/
readonly attribute nsIArray embeddedChildren;

/**
* Return true if this range has the same end points of the given range.
*/
boolean compare(in nsIAccessibleTextRange aOtherRange);

/**
* The two endpoints of the range (starting and ending).
*/
const unsigned long EndPoint_Start = 1;
const unsigned long EndPoint_End = 2;

/**
* Compare this and given ranges end points.
*
* @return -1/0/1 if this range end point is before/equal/after the given
* range end point.
*/
long compareEndPoints(in unsigned long aEndPoint,
in nsIAccessibleTextRange aOtherRange,
in unsigned long aOtherRangeEndPoint);

/**
* Return text within the range.
*/
readonly attribute AString text;

/**
* Return list of rects of the range.
*/
readonly attribute nsIArray bounds;

const unsigned long FormatUnit = 0;
const unsigned long WordUnit = 1;
const unsigned long LineUnit = 2;
const unsigned long ParagraphUnit = 3;
const unsigned long PageUnit = 4;
const unsigned long DocumentUnit = 5;

/**
* Move the boundary(ies) by the given number of the unit.
*/
void move(in unsigned long aUnit, in long aCount);
void moveStart(in unsigned long aUnit, in long aCount);
void moveEnd(in unsigned long aUnit, in long aCount);

/**
* Normalize the range to the closest unit of the given type.
*/
void normalize(in unsigned long aUnit);

/**
* Return range enclosing the found text.
*/
nsIAccessibleTextRange findText(in AString aText, in boolean aIsBackward,
in boolean aIsIgnoreCase);

/**
* Text attributes. Used in conjunction with findAttrs().
*/
const unsigned long AnimationStyleAttr = 0;
const unsigned long AnnotationObjectsAttr = 1;
const unsigned long AnnotationTypesAttr = 2;
const unsigned long BackgroundColorAttr = 3;
const unsigned long BulletStyleAttr = 4;
const unsigned long CapStyleAttr = 5;
const unsigned long CaretBidiModeAttr = 6;
const unsigned long CaretPositionAttr = 7;
const unsigned long CultureAttr = 8;
const unsigned long FontNameAttr = 9;
const unsigned long FontSizeAttr = 10;
const unsigned long FontWeightAttr = 11;
const unsigned long ForegroundColorAttr = 12;
const unsigned long HorizontalTextAlignmentAttr = 13;
const unsigned long IndentationFirstLineAttr = 14;
const unsigned long IndentationLeadingAttr = 15;
const unsigned long IndentationTrailingAttr = 16;
const unsigned long IsActiveAttr = 17;
const unsigned long IsHiddenAttr = 18;
const unsigned long IsItalicAttr = 19;
const unsigned long IsReadOnlyAttr = 20;
const unsigned long IsSubscriptAttr = 21;
const unsigned long IsSuperscriptAttr = 22;
const unsigned long LinkAttr = 23;
const unsigned long MarginBottomAttr = 24;
const unsigned long MarginLeadingAttr = 25;
const unsigned long MarginTopAttr = 26;
const unsigned long MarginTrailingAttr = 27;
const unsigned long OutlineStylesAttr = 28;
const unsigned long OverlineColorAttr = 29;
const unsigned long OverlineStyleAttr = 30;
const unsigned long SelectionActiveEndAttr = 31;
const unsigned long StrikethroughColorAttr = 32;
const unsigned long StrikethroughStyleAttr = 33;
const unsigned long StyleIdAttr = 34;
const unsigned long StyleNameAttr = 35;
const unsigned long TabsAttr = 36;
const unsigned long TextFlowDirectionsAttr = 37;
const unsigned long UnderlineColorAttr = 38;
const unsigned long UnderlineStyleAttr = 39;

/**
* Return range enslosing the text having requested attribute.
*/
nsIAccessibleTextRange findAttr(in unsigned long aAttr, in nsIVariant aValue,
in boolean aIsBackward);

/**
* Add/remove the text range from selection.
*/
void addToSelection();
void removeFromSelection();
void select();

const unsigned long AlignToTop = 0;
const unsigned long AlignToBottom = 1;

/**
* Scroll the range into view.
*/
void scrollIntoView(in unsigned long aHow);
};
6 changes: 3 additions & 3 deletions accessible/src/atk/Platform.cpp
Expand Up @@ -79,9 +79,9 @@ LoadGtkModule(GnomeAccessibilityModule& aModule)
char *curLibPath = PR_GetLibraryPath();
nsAutoCString libPath(curLibPath);
#if defined(LINUX) && defined(__x86_64__)
libPath.Append(":/usr/lib64:/usr/lib");
libPath.AppendLiteral(":/usr/lib64:/usr/lib");
#else
libPath.Append(":/usr/lib");
libPath.AppendLiteral(":/usr/lib");
#endif
PR_FreeLibraryName(curLibPath);

Expand All @@ -94,7 +94,7 @@ LoadGtkModule(GnomeAccessibilityModule& aModule)
else
subLen = loc2 - loc1;
nsAutoCString sub(Substring(libPath, loc1, subLen));
sub.Append("/gtk-2.0/modules/");
sub.AppendLiteral("/gtk-2.0/modules/");
sub.Append(aModule.libName);
aModule.lib = PR_LoadLibrary(sub.get());
if (aModule.lib)
Expand Down
2 changes: 1 addition & 1 deletion accessible/src/atk/nsMaiInterfaceText.cpp
Expand Up @@ -70,7 +70,7 @@ ConvertToAtkTextAttributeSet(nsIPersistentProperties* aAttributes)
} else if (name.EqualsLiteral("font-family")) {
atkValue = value;
atkName = sAtkTextAttrNames[ATK_TEXT_ATTR_FAMILY_NAME];
} else if (name.Equals("font-size")) {
} else if (name.EqualsLiteral("font-size")) {
// ATK wants the number of pixels without px at the end.
atkValue = StringHead(value, value.Length() - 2);
atkName = sAtkTextAttrNames[ATK_TEXT_ATTR_SIZE];
Expand Down
5 changes: 3 additions & 2 deletions accessible/src/base/TextAttrs.cpp
Expand Up @@ -13,6 +13,7 @@
#include "gfxFont.h"
#include "nsFontMetrics.h"
#include "nsLayoutUtils.h"
#include "nsContainerFrame.h"
#include "HyperTextAccessible.h"
#include "mozilla/AppUnits.h"
#include "mozilla/gfx/2D.h"
Expand Down Expand Up @@ -364,7 +365,7 @@ TextAttrsMgr::BGColorTextAttr::
return true;
}

nsIFrame *parentFrame = aFrame->GetParent();
nsContainerFrame *parentFrame = aFrame->GetParent();
if (!parentFrame) {
*aColor = aFrame->PresContext()->DefaultBackgroundColor();
return true;
Expand Down Expand Up @@ -518,7 +519,7 @@ TextAttrsMgr::FontSizeTextAttr::

nsAutoString value;
value.AppendInt(pts);
value.Append(NS_LITERAL_STRING("pt"));
value.AppendLiteral("pt");

nsAccUtils::SetAccAttr(aAttributes, nsGkAtoms::font_size, value);
}
Expand Down

0 comments on commit 203c37e

Please sign in to comment.