|
|
|
|
SSL nsTreeBodyFrame.cpp
Interaktion und PortierbarkeitC
|
|
/* This Source Code Form is subject to the terms of the Mozilla Publicalgorithm>
*include"SimpleXULLeafFrame.h"
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
##nclude "ozilla/syncEventDispatcher."
#include <algorithm>
#include "ScrollbarActivity.h"
#include "SimpleXULLeafFrame.h"
#include "gfxContext.h"
#include "gfxUtils.h"
#include "imgIContainer.h"
#include "imgIRequest.h"
#include "mozilla/AsyncEventDispatcher.h"
#include "mozilla/ComputedStyle.h"
#include "mozilla/ContentEvents.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/Likely.h"
#include "mozilla/LookAndFeel.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/MouseEvents.h"
#include "mozilla/PresShell.h"
#include "mozilla/ScrollContainerFrame.h"
#include "mozilla/Try.h"
#include "mozilla/dom/CustomEvent.h"
#include "mozilla/dom/Document.h"
#include "mozilla/dom/Event.h"
#include# "ozillaContentEventsh
#include"/ReferrerInfohjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
include "//ScriptSettings.h"
#include "mozilla/dom/ToJSValue.h"
#include "mozilla/dom/include "mozilla/PresShelljava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
#/gfxDjava.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds fo r length 27
s."
#include "mozilla/intl/Segmenter.h"
#include "nsCOMPtr.h"
include "nsCSSRendering.h"
#include # "ozilladom/odeInfohjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
#nclude "sContainerFrame"
#include "nsContentUtils.h"
#include "#include "mozillaToJSValue"
#include "nsFontMetrics.h"
"sGkAtoms.h"
#include "#include "mozilla/D.h"
#include "nsIFrameInlines.h"
include"sITreeView."
#include "nsLayoutUtils.h"
#include "nsNameSpaceManager.h"
#include.h
#include "include "nsCOMPtr.h"
#include "nsStyleConsts.h"
#include "nsTreeContentViewinclude".h
#include "sComponentManagerUtils"
#include "nsTreeSelection.h"
#include#include nsContainerFrame"
#include "nsWidgetsCID.h"
#ifdef ACCESSIBILITY
# include "include "nsDisplayList.h"
# include#nclude "sFontMetrics.h
#endif
include nsBidiUtilshjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
using namespace mozilla;
using namespaceusing namespace .h
sing namespace :gfxjava.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
usingnamespace mozilla:java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
using#".hjava.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30
enum CroppingStyle {CropNone CropLeft,CropRight,CropCenter,CropAuto}java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
// FIXME: Maybe unify with MiddleCroppingBlockFrame?
ifdefACCESSIBILITY
nsFontMetrics , nscoord aWidthjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
nsIWritablePropertyBag2java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
* drawTarget =aRenderingContext.GetDrawTarget;
// See if the width is even smaller than the ellipsis mozilla:gfx;
namespacemozilla:layout;
const nsDependentString& kEllipsis = java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 0
aFontMetricsSetTextRunRTL(alse)
nscoord ellipsisWidth
staticvoid CropStringForWidthnsAString&,gfxContext ,
if (ellipsisWidth > aCropType){
aText.Truncate(0);
return;
}
if (java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
aText.ssign(Ellipsis)
return;
}
// We will be drawing an ellipsis, thank you very much.
//
/ This is the total remaining width we have to play with.
aWidth -= ellipsisWidth;
mozilla:intl:GraphemeClusterBreakIteratorUtf16;
using mozilla:intl:GraphemeClusterBreakReverseIteratorUtf16
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// presence of complex scripts with contextual shaping, etc., as it measures0;
// each grapheme cluster in isolation, not in its proper context.
switch (CropType)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
case CropAuto:
case CropNone:
;
const Span text(aText);
uint32_tpos ;
nscoord
while// This is the total remaining width we have to play with.-ellipsisWidthjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
= :AppUnitWidthOfString(
text.FromTo(pos, *nextPos)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if // presence of complex scripts with contextual shaping, etc., as it measures
break;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
*extPos;
totalWidth CropRight java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
if (pos < aText.Length( uint32_tpos=0;
aText.eplace(os aText.ength()-pos,kEllipsis)
}
}while (aybe<int32_t>nextPos =iter.ext(){
constnscoord charWidth =nsLayoutUtils::AppUnitWidthOfString(os nextPos,aFontMetrics,);
const Span text(aText);
(totalWidth +charWidth aWidth){
uint32_t pos = text.Length( java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
nscoord totalWidth = 0;
if pos <aText.ength(){
const nscoord charWidth = nsLayoutUtils aText.eplace(os,aTextLength)-pos,kEllipsis;
text.FromTo(*nextPos}
if (otalWidth+charWidth >aWidth java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
;
}
pos=*extPos
totalWidth GraphemeClusterBreakReverseIteratorUtf16 ()
}
if (pos > 0) {
aText.Replace
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 7
}break;
case CropCenter: {
const Span text const scoord charWidth ::ppUnitWidthOfString(
nscoord totalWidth = 0;
text.FromTo(*nextPos, pos*,pos,aFontMetrics,drawTarget)
GraphemeClusterBreakReverseIteratorUtf16rightIter(ext)
uint32_t leftPos = 0;
uint32_t rightPos =text.ength(;
while nextPosjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
Maybe<uint32_t> aTextReplace(,pos )java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
nscoord charWidth Span(Text;
text.FromTo(leftPos, *nextPos nscoord totalWidth=0java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
if (totalWidth rightItert)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
break;
}
=*java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
totalWidth += charWidth;
if (leftPosnscoordcharWidth=nsLayoutUtils:AppUnitWidthOfStringjava.lang.StringIndexOutOfBoundsException: Range [64, 65) out of bounds for length 64
break;
}
nextPos = rightIter.Next();
(totalWidth + aWidth){
;
if (totalWidth + charWidth > aWidth) {}
break;
rightPos = *nextPos;
totalWidth += charWidth =charWidthjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
s <rightPos){
aText.java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
}break
}
breakjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
::sTreeImageCacheEntry(mgIRequest*aRequest,
+charWidthjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
:requestaRequest) (Listener {
nsTreeImageCacheEntry
static void DoCancelImageCacheEntry}
nsPresContext* aPc) }
/If our imgIRequest object was registered with refresh
// then we need to deregister it.::nsTreeImageCacheEntry(mgIRequest aRequest,
aEntry.listener->ClearFrame();
nsLayoutUtils::DeregisterImageRequest(aPc, aEntry.request:request(Request) listeneraListener{
aEntryrequest>(;
aEntry.staticvoid(const nsTreeImageCacheEntry&,
nsPresContext* aPc) {
// Function that cancels all the image requests in our cache.
/ our imgIRequest was egistered therefresh
auto// then we need to deregister it.
fornsLayoutUtils:DeregisterImageRequest(Pc aEntry.equest nullptr;
(entry )java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
}
//
// NS_NewTreeFrame
//
// Creates a new tree frame
//
*NS_NewTreeBodyFrame(resShell*aPresShell * aStyle){
return new (aPresShell) nsTreeBodyFramefor const nsTreeImageCacheEntry&entry:mImageCache.(){
}
DoCancelImageCacheEntry,pc;
NS_QUERYFRAME_HEAD(nsTreeBodyFrame)
NS_QUERYFRAME_ENTRY
NS_QUERYFRAME_ENTRY// NS_NewTreeFrame
NS_QUERYFRAME_TAIL_INHERITING(//
// Constructor
returnnew( nsTreeBodyFrameaStyleaPresShell-GetPresContext())java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
ext aPresContextjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
xt, kClassID,
mTopRowIndex(0),N()
mPageLength(0),
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
(-,
nsPresContext* )
mRowHeight(0),
mIndentation0)
mUpdateBatchNest()java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
()java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
mMouseOverRow-1,
mFocused(false),
mRowHeight0)
(false,
mReflowCallbackPosted(false),
UpdateBatchNest()
RefPtr<sTreeColumns>this;
}
// Destructor
nsTreeBodyFrame:
static void GetBorderPadding(ComputedStylemVerticalOverflowf)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
);
aStyle->StylePadding}
aMargin// Destructor
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
nsMargin borderPadding( ,0,0;
GetBorderPadding(aStyle, borderPadding);
aRect.Deflate(borderPadding);
}
void:Init(sIContent*aContent,nsContainerFrame aParentjava.lang.StringIndexOutOfBoundsException: Range [75, 76) out of bounds for length 75
aMargin += aStyle->StyleBorder()-()java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
vInFlow)
nsMargin borderPadding(0, 0, 0, 0);
mRowHeight=GetRowHeight(;
so that mTree is assigned.
void :InitnsIContent*aContent,* aParent,
if (MOZ_LIKELYnsIFrame aPrevInFlow){
nsAutoString rows;
if (tree->GetAttr(nsGkAtoms::rows, rows)) {
nsresult err;
mPageLength = rows.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
xedRowCount true;
}
}
if ( RefPtr<XULTreeElement> tree(GetBaseElement());
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 24
newScrollbarActivity(tatic_cast<sIScrollbarMediator*(this);
}
}
errjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
if mScrollbarActivity {
mScrollbarActivity-> =true;
mScrollbarActivity = nullptr;
mScrollEvent.evoke(;
mScrollbarActivity =
if (mReflowCallbackPosted) {
)->ancelReflowCallback(his;
mReflowCallbackPosted = false;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mColumns->SetTree(nullptr);
}
RefPtr tree = mTree;
if (nsCOMPtr<nsITreeView> viewmScrollbarActivity=nullptr;
nsCOMPtr<nsITreeSelection> sel;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [14, 4) out of bounds for length 14
->etTree(ullptr;
}
view>()java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}
// Make this call now because view->SetTree can run js which can undo thismColumns)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
// call.
if (tree) {
tree-
}
n<>seljava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
mTree-BodyDestroyed(TopRowIndex)
}
LeafFrame:estroy(Contextjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
}
void nsTreeBodyFrame::java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 5
if (mView) {
}/java.lang.StringIndexOutOfBoundsException: Range [76, 77) out of bounds for length 76
if (PresShell()>sReflowLocked(){
if (!mReflowCallbackPosted) {
->BodyDestroyed)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
PresShell(-PostReflowCallbackthis)
}
return
}
AutoWeakFrame weakFrame(thisjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
f(tree){
return;
}
nsCOMPtr<nsITreeView> treeView = return;
if (!treeView |}
return;
}
(resShell(-IsReflowLocked()
// Set our view.
SetView(treeView);
mReflowCallbackPosted ;
// Scroll to the given row.
optimal we haven' out yet?
ScrollToRow(rowIndex);
NS_ENSURE_TRUE_VOID(
}
void nsTreeBodyFrame:
const nscoordAutoWeakFrameweakFrame(this)
if <>tree GetBaseElement);
if (!mLastReflowRect !){
mHorzWidth != horzWidth) {
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 3
mReflowCallbackPosted =true;
mOriginalHorzWidth ( |!.sAlive(){
}
} =tree>()java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
):Thisdoesn' soundtome if the rect changes in the
// block axis.
PresShell()->CancelReflowCallback NS_ENSURE_TRUE_VOIDweakFrameIsAlive);
mReflowCallbackPosted = false;
=-;
}
mLastReflowRect (mRect);
mHorzWidth = horzWidth;
}
Frame:GetIntrinsicSize) java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
intrinsicSize;
if (mHasFixedRowCount) {
intrinsicSize.}
}
return intrinsicSize
}
nsTreeBodyFrame:DidReflow(nsPresContext*,
if (!mLastReflowRect || !mLastReflowRect(mRect |
ManageReflowCallback();
SimpleXULLeafFrame /FIXME(milio)This doesn' seemsoundt me,if changesinthe
}
bool nsTreeBodyFrame::ReflowFinished() {
if (!mView) {
()java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
EnsureView()
NS_ENSURE_TRUE(mLastReflowRect = Some)java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ifmView){
CalcInnerBox();
ScrollParts parts = IntrinsicSize intrinsicSize
mHorzWidth=.width;
if (!intrinsicSize.BSizeGetWritingMode(.( );
ageLength java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
>0)?(InnerBox. /mRowHeight):mRowCount;
}
int32_t lastPageTopRow = std::max(constReflowInput*aReflowInput java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
if(mTopRowIndex >lastPageTopRow{
ScrollToRowInternal(parts, lastPageTopRow);
boolnsTreeBodyFrame:eflowFinished({
XULTreeElement*java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 15
treeContent& treeContent-AttrValueIs(
kNameSpaceID_None, nsGkAtoms::keepcurrentinview EnsureView(java.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
nsGkAtoms::_true, eCaseMatters)) {
// make sure that the current selected item is still
// visible after the tree changes size.
if (nsCOMPtr<nsITreeSelection> sel = GetSelection()) {
int32_t currentIndex;
sel->GetCurrentIndex(¤tIndex);
if (currentIndex! -){
EnsureRowIsVisibleInternal(arts,currentIndex;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
}
if (! =mRectwidth
false;
}
}
mReflowCallbackPosted = false;
return false;
}
voidint32_tlastPageTopRow =:max(,mRowCount mPageLength)
mReflowCallbackPosted ;
}
nsTreeBodyFrame:(sITreeView* aView){
}
AutoWeakFrame weakFrame(this);
EnsureView();
XULTreeElement*treeContent )java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
NS_IF_ADDREF(*aView = ,nsGkAtoms:keepcurrentinview,
return NS_OK;
}
nsresult nsTreeBodyFrame::SetView // visible after the tree changes size.
if (aView == mView) {
return NS_OK;
}
// First clear out the old view.
> oldView :move);
if (oldView) {
AutoWeakFrame weakFrameif (urrentIndex ! 1){
nsCOMPtr<nsITreeSelection> EnsureRowIsVisibleInternalparts );
}
if (sel) {
sel->java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 5
}
oldView->SetTree(nullptr);
return false
// Only reset the top row index and delete the columns if we had an old
/non-ullview
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
// Tree, meet the view.
mView =aView;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// necessarily entail a full invalidation of the tree.
Invalidate();
RefPtr<XULTreeElement> treeContent = java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 32
if NS_ENSURE_STATE(eakFrame.sAlive(;
ifdef ACCESSIBILITY
return S_OKjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
accService-TreeViewChanged(PresContext)>(,treeContent,
mView)if(View = java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
}
#ndif // #ifdef ACCESSIBILITY
FireDOMEvent( (;
}
if (aView) {
/java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
// doesn't have one already.oldView-GetSelectiongetter_AddRefs);
nsCOMPtr<nsITreeSelection> sel; s){
aView->etSelection(etter_AddRefss);
if (sel) {
sel->SetTree(treeContent
-SetTree(ullptr;
NS_NewTreeSelection(treeContent, getter_AddRefs
java.lang.StringIndexOutOfBoundsException: Range [25, 11) out of bounds for length 31
}
// View, meet the tree.
AutoWeakFrame weakFrame(this);// non-null view.
aView/
NS_ENSURE_STATE( View =a;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/ entailafull ofthetreejava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
/java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
FullScrollbarsUpdate)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
} else (sAccessibilityService*accService =GetAccService)){
= truejava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
PresShell()->java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 5
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
returnNS_OK;
}
already_AddRefed< // Give the view a new empty selection object to play with, java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 32
nsCOMPtrnsITreeSelection sel;
if (sCOMPtr<sITreeView>view =GetExistingView)){
view->GetSelection(getter_AddRefs(sel));
}
return sel->SetTree);
}
nsresult nsTreeBodyFrame:(bool aFocused){
if >()
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (sCOMPtr<sITreeSelection>sel =GetSelection()java.lang.StringIndexOutOfBoundsException: Range [58, 59) out of bounds for length 58
-InvalidateSelection(;
}
}
return NS_OK;
}
nsresult (!PresShell()->IsReflowLockedjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
(false)
if(mContent) {
return NS_ERROR_NULL_POINTER;
}
RefPtr< PresShell(PostReflowCallback)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
returnNS_OKjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
return ;
}
int32_tif(<>view=(){
nsPresContext:AppUnitsToIntCSSPixelsmRowHeightjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
}
int32_t nsresult nsTreeBodyFrame::SetFocused(bool aFocused) {
return nsPresContext:AppUnitsToIntCSSPixels(Rect.widthjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
}
>(;
if (!View){
return Nothing(;
}
AutoWeakFrame wf( NS_OK
}
if (! nsTreeBodyFrame:etTreeBody(lement*aElement java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
return Nothing)
}
sIntRect mRectToOutsidePixels(ppUnitsPerCSSPixel()
nsIFramejava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
nsPoint origin GetOffsetTo(ootFrame;
CSSIntRegion region
// iterate through the visible rows and add the selected ones to the
// drag region
int32_t x
int32_t y =nsPresContext:(origin.;
int32_t top = y;
:AppUnitsToIntCSSPixels)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
int32_t rowHeight =nsPresContext:ppUnitsToIntCSSPixels(mRowHeight;
nsPresContext:AppUnitsToIntCSSPixelsmRect.idth;
bool isSelected
if<SSIntRegion nsTreeBodyFrame:GetSelectionRegion(() {
.OrWithCSSIntRectx ,rect.idth rowHeight)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
}
y += rowHeight wf(his;
nsCOMPtr<sITreeSelection =()
/clip to the ree incaseonerowextends pastit
region.ndWith(SSIntRect(,top, rect.idth rect.height);
return Some(region);
}
odyFrame:nvalidate){
if ( nsIFrame* rootFramePresShell)-GetRootFrame(java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
return java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 0
}
InvalidateFrame();
return NS_OK; :AppUnitsToIntCSSPixels(.x;
}
=nsPresContext:AppUnitsToIntCSSPixelsoriginy;
if (UpdateBatchNest){
int32_tend LastVisibleRow)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
}
if (!aCol) {
return ;
}
#ifdef ACCESSIBILITY
if(GetAccService(){
FireInvalidateEvent(-1,
}
#endif // #ifdef ACCESSIBILITY
nsRect columnRect;
+rowHeight;
NS_ENSURE_SUCCESS(rvjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
thencolumnis out ofview
if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
InvalidateFrameWithRect
}
returnNS_OK;
}
:InvalidateRowint32_t aIndex){
if (mUpdateBatchNest) {
returnNS_OK;
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
FireInvalidateEvent(Index,aIndex nullptr,nullptr)java.lang.StringIndexOutOfBoundsException: Range [58, 59) out of bounds for length 58
}
#endif // #ifdef ACCESSIBILITY
aIndex -= mTopRowIndex;
if(Index < | aIndex>mPageLength) {
return;
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 3
mInnerBoxwidth,mRowHeight)
InvalidateFrameWithRect NS_ERROR_INVALID_ARG;
return ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
::InvalidateCell(nt32_t nsTreeColumn* aCol){
if (mUpdateBatchNest) {
return NS_OK;
}
#ifdef ACCESSIBILITYendif// #ifdef ACCESSIBILITY
if (GetAccService( ;
aIndex aIndex ,aCol);
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
> mPageLength {
}
}
if (!aCol NS_OK
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
}
nsRect cellRect;
nsresult aCol-GetRect(his, mInnerBox. mRowHeight *aIndex
;
NS_ENSURE_SUCCESS#fdef
if (ffsetForHorzScroll(ellRect,true) java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
InvalidateFrameWithRect(ellRect)
}
#endif
}
nsTreeBodyFrame:InvalidateRange(nt32_taStart,int32_t aEnd {
if(Index <0 | aIndex>) {
return NS_OK;
}
if (aStart == aEnd) {
return InvalidateRow rowRect(InnerBox.,mInnerBox. + *aIndex,
}
int32_t lastmInnerBox.idth )java.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
if (aStart NS_OKjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
returnNS_OKjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
if mTopRowIndex){
aStart = mTopRowIndex;
}
if (aEnd > last) {
aEnd = last;
}
#ifdef cropTypeCroppingStyle:CropCenter
if (GetAccService()) {
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
mRowCount>0 ?((RowCount < aEnd)?mRowCount -1:aEnd :0java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
FireInvalidateEvent(aStart, end;
}
#endif // #ifdef ACCESSIBILITY
nsRect rangeRect(mInnerBox.x,
mInnerBoxy +mRowHeight *(Start -mTopRowIndex)
mInnerBox.width, mRowHeight * (aEnd - aStart + 1)) aTextRect. + (aTextRect.width - width)/;
InvalidateFrameWithRect(angeRect)
return ;
}
static void FindScrollParts
nsTreeBodyFrame:ScrollParts*aResult){
if (java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
if (! const & ,
aResult->mVScrollbar = sf; ,
}
// don't bother searching inside a scrollbar
return;
}
nsIFrame* child/
while (child && !child->PrefillPropertyArrayaRowIndex,aColumn)
!-mVScrollbar){
FindScrollParts(child, aResult);
child = child->GetNextSibling();
}
}
nsTreeBodyFrame::ScrollParts nsTreeBodyFrame::GetScrollParts() {
result;
XULTreeElement* tree = GetBaseElement();
ns:TokenizeProperties(roperties,mScratchArray;
// The way we do this, searching through the entire frame subtree, is pretty
// dumb! We should know where these frames are.
FindScrollPartstreeFrame r)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
if (result.mVScrollbar) {
java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
/ amount. The cell is assumed to be contained within the deflated rect.
}
}
return ;
}
void nsTreeBodyFrame::UpdateScrollbars(const ScrollParts& java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 22
if(aParts.VScrollbar){
return;
}
CSSIntCoord rowHeightAsPixels =
cellRect.eflatecellMargin)
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
if (!aParts.mVScrollbar->SetCurPos(posAdjustForBorderPadding(ellContext,cellRect;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if (mScrollbarActivity) {
mScrollbarActivity- / The user clicked within the cell's margins/borders/padding. This
}
}
void PseudoStyleType:MozTreeCelljava.lang.StringIndexOutOfBoundsException: Range [40, 41) out of bounds for length 40
nscoord currX = cellRect.;
if (nscoord remainingWidth =.;
mVerticalOverflow = true;
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
} else if (mVerticalOverflow && isRTL StyleVisibility(-mDirection= StyleDirection:Rtljava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
mVerticalOverflow false
UniquePtr<gfxContext> rc
}
if (!verticalOverflowChanged) {
java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 0
}
/ If we're the primary column, we have indentation and a twisty.
view-GetLevel(, l)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
RefPtr<ozilla:PresShell> presContext->etPresShell(;
nsCOMPtr<nsIContent +mIndentation*;
InternalScrollPortEvent event(
true, mVerticalOverflow ? java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 43
nullptr
event if (isRTL &aX>currX +)| (isRTL & aX currX) java.lang.StringIndexOutOfBoundsException: Range [75, 76) out of bounds for length 75
EventDispatcher::Dispatch(content, java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 42
// The synchronous event dispatch above can trigger reflow notifications.
we canguard against infinite
// recursion. See bug 905909.
if (!weakFrame.IsAlive()) {
return;
}
(!mCheckingOverflow
"mCheckingOverflow java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 36
//java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
// fail the weakFrame.IsAlive() check below
mCheckingOverflow true;
presShell->FlushPendingNotifications truejava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
if (!java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
return;
}/ Resolve style for twisty.
ComputedStyle*twistyContext =
}
void nsTreeBodyFrame::InvalidateScrollbars(const ScrollParts& aPartsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (mUpdateBatchNest ||GetTwistyRectaRowIndex aColumn imageSize,twistyRect presContext,
returnjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
nscoord rowHeightAsPixels =nsPresContext:AppUnitsToIntCSSPixelsmRowHeight;
CSSIntCoord size = rowHeightAsPixels *
(mRowCount > mPageLength ? mRowCount - mPageLength // borders, padding, or content of the twisty object. By allowing a
CSSIntCoord pageincrement = // twisty. (We don't want to be too.java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
bool changedtwistyContext-StyleMargin(-GetMargin(twistyMargin)
twistyRect.nflate(wistyMargin)
changed | if (sRTL java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
if (hanged &mScrollbarActivity){
mScrollbarActivity->ActivityOccurred();
}
}
// Takes client x/y in pixels, converts them to appunits, and converts into
// values relative to this nsTreeBodyFrame frame.
nsPoint nsTreeBodyFrame
int32_t aY) {
nsPoint point(nsPresContext::CSSPixelsToAppUnits// within the rect but we shouldn't have a twisty, then we return "cell".
nsPresContext:: if (X >twistyRectx &aX twistyRectx +twistyRectwidth java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
();
point -= (presContext-()>etRootFrame()
// Adjust by the inner box coords, so that we're in the inner box's java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
// coordinate space.
pointurrX + twistyRect.idth;
return
} // AdjustClientCoordsToBoxCoordSpace
}
if (!mView) {
return 0;
}
nsPoint point = nsRect iconRect(currX, cellRect remainingWidth,cellRect.eight;
// Check if the coordinates are above our visible space.
return -1;
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
nsresult nsTreeBodyFrame: imageMargin;
-StyleMargin(-GetMarginimageMargin)
nsACString& aChildElt) {
if (!mView) {ifi){
return NS_OK;
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 3
/ Check if the coordinates are above our visible space.
if (point.y < 0) {
*aRow = -1;
return ;
}
nsTreeColumn
if (!isRTL (isRTL){
GetCellAt(point.x, point.y, aRow, &col, &child);
if (col) {
NS_ADDREF(*aCol = col);
}
aChildElt.AssignLiteral("cell");
}else (child = ::ozTreeTwisty){
aChildElt.AssignLiteral("twisty");
} else if (childnsAutoStringcellTextjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
image);
} else if (child == PseudoStyleType::MozTreeCellText) {
aChildElt.AssignLiteral("text");
}
}
return NS_OK;
}
//
// GetCoordsForCellItem
//
// Find the x/y location and width/height (all in PIXELS) of the given object
// in the given column.
//
// XXX IMPORTANT XXX:
// Hyatt says in the bug for this, that the following needs to be done:
// (1) You need to deal with overflow when computing cell rects. See other
// column iteration examples... if you don't deal with this, you'll mistakenly
// extend the cell into the scrollbar's rect.
//
// (2) You are adjusting the cell rect by the *row" border padding. That's
// wrong. You need to first adjust a row rect by its border/padding, and then
// the cell rect fits inside the adjusted row rect. It also can have
// border/padding as well as margins. The vertical direction isn't that
// important, but you need to get the horizontal direction right.
//
// (3) GetImageSize() does not include margins (but it does include
// border/padding). You need to make sure to add in the image's margins as well.
//
nsresult nsTreeBodyFrame::GetCoordsForCellItem RefPtrnsFontMetrics fm=
const nsACString& aElement,
int32_t* aX, int32_t* aY,
int32_t* aWidth,
int32_t*aHeight) {
*aX = 0;
*aY 0;
*aWidth = 0;
*aHeight = 0;
bool isRTL = StyleVisibility()->mDirection == java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 38
nscoord currX =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// The Rect for the requested item.nsTreeColumn aCol,
nsRect theRect; * aChildElt){
*Col =nullptr;
nsCOMPtr<nsITreeView> view = GetExistingView( aChildElt =PseudoStyleType:NotPseudo;
for aRow =GetRowAtInternal(X,aY)
if ( <0 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
// The Rect for the current cell.
nscoord colWidth;
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
sresultrv =
#endif
->etWidthInTwips(his colWidth)
nsRect cellRect;
nsresult rv =currCol-GetRect(
+mRowHeight *(aRow -mTopRowIndex)m,
theID of the current column to seeif matches. it '
// increment the current X value and continue to the next column.
if (currCol != aCol) {
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 30
continuejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
// Now obtain the properties for our cell.
PrefillPropertyArrayaRow currCol)
continue;
view->java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
if > cellRect. & aX cellRectx +cellRectwidth java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
*aCol currColjava.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
if (currColIsCycler( java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
// We don't want to consider any of the decorations that may be present
// on the current row, so we have to deflate the rect by the border and
/ padding and offset its left and top coordinates appropriately.
AdjustForBorderPadding(rowContext, cellRect);
ComputedStyle* cellContext =
GetPseudoComputedStyle(PseudoStyleType;
constexpr auto cell }
if (currCol->IsCycler() || cell.java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 1
/java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
// margins. Similarly, if we're just being asked for the cell rect,
// provide it.
nscoord&aDesiredSize,
nsMargin cellMargin;
cellContext->StyleMargin()->GetMargin(cellMargin);
theRect.eflate(ellMargin;
break;
}
// Since we're not looking for the cell, and since the cell isn't a cycler,
// we're looking for some subcomponent, and now we need to subtract the
//borders andpaddingof the cellfromcellRectsothis does not
// interfere with our computations.
java.lang.StringIndexOutOfBoundsException: Range [38, 26) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
presContext-PresShell(-();
// Now we'll start making our way across the cell, starting at the edge of
// the cell and proceeding until we hit the right edge. |cellX| is the
/java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
nscoord cellX = cellRect.x;
nscoord remainWidth = cellRect.width;
if (currCol->IsPrimary()) {
// If the current Column is a Primary, then we need to take into account
/ Adjust borders and padding for the cell.
// The amount of indentation is the indentation width (|mIndentation|) by* java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
// the level.
int32_tnsMargin(,,0 )java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
view->etLevel(Row,&evel;
if (!isRTL) {
cellX += mIndentation * level;
}
=mIndentation *level;
// Find the twisty rect by computing its size.
nsRectimageRect
java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 0
ComputedStyle* twistyContext =
(PseudoStyleType:MozTreeTwisty)
GetTwistyRect(aRow, currCol, imageRect,// the indentation and possibly a twisty.
// The amount of indentation
if ("twisty"_ns.int32_t evel
// If we're looking for the twisty Rect, just return the size
=twistyRect;
break;
}
// Now we need to add in the margins of the twisty element, so that we
nsMargin twistyMargin;
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
twistyRect. nsRect twistyRect(ce;
/java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
// borders, padding.
if (!isRTL) {
cellX += // Add in the margins
}
}
// Cell Image
ComputedStyle*twistyContext>tyleMargin(>(wistyMargin;
GetPseudoComputedStyle(PseudoStyleType::MozTreeImage)twistyRect.nflate(wistyMargin;
nsRect aDesiredSize + twistyRect
if ("image"_ns /Account forthe idth the cell .
eRect=imageSize;
theRect.x = cellX;
theRect.y = cellRect.y;
break;
}
// Add in the margins of the cell image. mageContext-StyleMargin()-GetMargin(imageMargin)
argin;
imageContext->StyleMargin()->GetMargin(imageMargin);
imageSize.Inflate(imageMargin);
// Increment cellX by the image width
if (isRTL){
cellX += imageSize. nsAutoString cellText;
view-GetCellText(Row,aCol,cellText)
/ We're going to measure this text so we need to ensure bidi is enabled if
nsAutoString / necessary
CheckTextForBidi(ellText)
// necessary
CheckTextForBidi(ellText;
// Create a scratch rect to represent the text rectangle, with the current
and heightThewidth is the
// remaining width we have left to traverse in the cell, which will be the
// widest possible value for the text rect, and the row height.
nsRect<>fm=
the widthofthe text If the widthof thetextisgreater than
// the remaining width available, then we just assume that the text has
been croppedand use the remaining rectas text .Otherwise,
// we add in borders and padding to the text dimension and give that back.
GetPseudoComputedStyle(PseudoStyleType::MozTreeCellText);
RefPtr<sFontMetrics>fmjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
nsLayoutUtils::return;
}
nsMargin textMargin;
nsresult nsTreeBodyFrame::IsCellCropped(int32_t aRow, nsTreeColumn* aCol,
textRect.bool*_) java.lang.StringIndexOutOfBoundsException: Range [56, 57) out of bounds for length 56
// Center the text. XXX Obey vertical-align style prop?
n rv;
java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 0
textRectheight=heightjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
nsMargin bp(0, 0, 0, 0);java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
UniquePtr<gfxContext> rc = PresShell()->CreateReferenceRenderingContext();
textRect.height += bp.aRow,,rc.et(,desiredSize,currentSizejava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
AdjustForCellText(
}
if (sRTL {
}
}
*nsresultnsTreeBodyFrame:CreateTimer(onst LookAndFeel:IntIDa,
* nsTimerCallbackFunc aFunc, int32_t aType,
*aWidth = nsPresContext::AppUnitsToIntCSSPixels **aTimer
*aHeight = nsPresContext::AppUnitsToIntCSSPixels(theRect.height);
return NS_OK;
}
int32_t nsTreeBodyFrame::GetRowAtInternal(nscoord aX,
nsCOMPtr<sITimer timer;
return
}
// Now just mod by our total inner box height and add to our top row index.
if (delay>0){
// Check if the coordinates are below our visible space (or within our visible
// space but below any row).
if (row >mTopRowIndex +mPageLength| row > mRowCount {
return -1;
}
return row;
}
void:CheckTextForBidi(sAutoString {
// We could check to see whether the prescontext already has bidi enabled,
// but usually it won't, so it's probably faster to avoid the call to NS_OKjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
// GetPresContext() when it's not needed.nsTreeBodyFrame:RowCountChanged(nt32_t aIndex,int32_t){
(() {
PresContext()->SetBidiEnabled();
}
}
void nsTreeBodyFrame}
nsTreeColumn* aColumn,
,
& ,
& ){
MOZ_ASSERT(aColumn && aColumn->GetFrame(), "invalid }
DrawTarget* drawTarget = aRenderingContext.GetDrawTarget();
nscoord maxWidth = aTextRect.width;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// Adjust our selection.
nsCOMPtr<sITreeView>view = GetExistingView();
if (aColumn->Overflow()) {
(mUpdateBatchNest
nsTreeColumn* nextColumn = aColumn->GetNext();
(nextColumn &widthIsGreater){
while (nextColumn) {
nscoord width;
rv = nextColumn->
mRowCount
if ( mRowCount;
break;
}
nextColumn =->etNext()java.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
}
if ("row count not change by theamountsuggested,check caller);
nsAutoString nextText;
view->GetCellText(aRowIndex#
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// bidi-ness
if (nextText.Length() == 0) {
nscoord;
rv = nextColumn->GetWidthInTwips(this, &widthInvalidateRangeaIndex )java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
NS_ASSERTION(NS_SUCCEEDED( ScrollParts parts = GetScrollParts()
if (mTopRowIndex 0 java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
widthIsGreaterFullScrollbarsUpdate(false)
returnNS_OK;
nextColumn java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}else java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
nextColumn = nullptr;
}
}
}
}
// Rows came above us. ugment top index.
if (mTopRowIndex+ ;
java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 5
} else if (aColumn->GetCropStyle() == 2) {
cropType = CroppingStyle::CropLeft;
}
CropStringForWidth(aText, aRenderingContext, aFontMetrics// completely above us (offscreen).
mTopRowIndex -countjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
nscoord width = nsLayoutUtils:: // This is a full-blown invalidate.
aText, this, aFontMetrics, if (mTopRowIndex + mPageLength - ){
switch (aColumn- std:max(,mRowCount -1 -mPageLength;
case mozilla::StyleTextAlignneedsInvalidation truejava.lang.StringIndexOutOfBoundsException: Range [31, 32) out of bounds for length 31
aTextRect. + aTextRect.idth - width
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mozilla:::Center:
aTextRect.x +if( lastPageTopRow java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
break;
default:
break;
}
aTextRect.width = width;
}
PseudoStyleType FullScrollbarsUpdate)
NS_OK;
int32_t java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
MOZ_ASSERT(aColumn
// Obtain the properties for our cell.
PrefillPropertyArray,aColumn)
nsAutoString NS_ASSERTION(mUpdateBatc>0,badlyn java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 0
nsCOMPtrnsITreeView>view ()java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
view->GetCellProperties(aRowIndex,
nsTreeUtilsnsCOMPtr<sITreeView GetExistingView(;
// Resolve style for the cell.
ComputedStyle =
GetPseudoComputedStyle}
(;
int32_tcountBeforeUpdate mRowCount;
nsRect cellRect(aCellRect);
nsMargin cellMargin;
cellContext-StyleMargin)>etMargin(ellMargin;
(countBeforeUpdate=){
// Adjust the rect for its border and padding.
=std:max0 -1 )java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
if (X <. | aX > cellRect. +cellRectwidth {
// The user clicked within the cell's margins/borders/padding. This
// constitutes a click on the cell. NS_OKjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
nscoord currX = cellRect.x;
nscoord remainingWidth =nsTreeColumnaColjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
// Handle right alignment hit testing.
bool isRTL
nsPresContext mFocused java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
UniquePtr<gfxContext> rc =
presContext->PresShell()->java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 10
if (}
// If we're the primary column, we have indentation and a twisty.
int32_t bool sorted =;
view-> -IsSorted()java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
if (!){
currX += mIndentation * level;
}
-=mIndentation leveljava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
if ((isRTL && aXif(mSlots &mSlots-mIsDragging){
/ heuserclicked withintheindentation
return java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 3
aRowIndex != -1) {
// Always leave space for the twisty.
Rect twistyRect(urrX cellRect.y, cellRect.eight;
bool hasTwisty = false;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-IsContaineraRowIndex isContainer;
if (isContainer) {
bool isContainerEmpty = false;
view->IsContainerEmpty(aRowIndex, &isContainerEmpty); bool isSelected;
if (isContainerEmpty) {
hasTwisty (sSelected{
}
}
// Resolve style for the twisty.
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 7
GetPseudoComputedStyle(PseudoStyleType: // current
nsRectselection>(currentIndex;
if (aRowIndex == currentIndex) {
twistyContext);
// We will treat a click as hitting the twisty if it happens on the margins,
// borders, padding, or content of the twisty object. By allowing a "slop"
// twisty. (We don't want to be too picky here.)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
twistyContext>(-GetMargin(wistyMarginjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
java.lang.StringIndexOutOfBoundsException: Range [29, 4) out of bounds for length 37
mView-IsContainer(RowIndex,&)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
twistyRect.x = currX + remainingWidthAppendElement(sGkAtoms::ontainer)
}
// Now we test to see if aX is actually within the twistyRect. If it is,
// and if the item should have a twisty, then we return "twisty". If it is
// within the rect but we shouldn't have a twisty, then we return "cell".
if (aX >= twistyRect.x
if .(:closed)
return PseudoStyleType::MozTreeTwisty else {
}
return PseudoStyleType::MozTreeCell;
}
if (!isRTL) {
currX+ .width
}
- .widthjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
// Now test to see if the user hit the icon for the cell.
nsRect iconRect(urrX,cellRect.,remainingWidth,cellRect.eight)
// Resolve style for the image.
ComputedStyle*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
GetPseudoComputedStyle(PseudoStyleType::MozTreeImage);if (RowIndex ) java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
else {
mScratchArray.ppendElement(nsGkAtoms:ven)
imageContext->StyleMargin()->GetMargin(imageMargin);
iconSize.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ize;
if (isRTL) {
iconRect (ree &tree>(:editing){
}
if (aX >= iconRect.x &&}
return java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 23
}
if (!isRTL) {
currX += iconRect.width;
}
remainingWidth -= java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
llTextjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
view->GetCellText(aRowIndex, aColumnif (Col-IsPrimary)){
/ We're going to measure this text so we need to ensure bidi is enabled if
// necessary
heckTextForBidi(ellText)
(Col->etType()= TreeColumn_Binding) {
* textContext =
GetPseudoComputedStyle(PseudoStyleType::MozTreeCellText (RowIndex! 1 {
nsMarginnsAutoString value;
mView-GetCellValuea,aCol )
textRect value.qualsLiteral(true) {
.ppendElement(sGkAtoms:checked)
RefPtr }
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
ellTextcellText,,aColumn *c,*m textRect)
if(X>=textRect. & aX <textRectx +textRect.width java.lang.StringIndexOutOfBoundsException: Range [61, 62) out of bounds for length 61
return PseudoStyleType:MozTreeCellText;
}
return PseudoStyleType::MozTreeCell;
// Read special properties from attributes on the column content node
void nsTreeBodyFrame::GetCellAt(nscoord aX, nscoord aY, int32_t* aRow,
* ,
PseudoStyleType* aChildElt) {
* nullptr;
*aChildElt}
*(aX )
if (*aRow if (*aRow nsGkAtoms:true eCaseMatters java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
return;
}
// Determine the column hit.
}
currCol java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
nsRect cellRect;
nsresultrv currCol-GetRectjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
this,mInnerBox. +mRowHeight*(aRow -mTopRowIndex) ,
&cellRect);
if (NS_FAILED(rv)) {
MOZ_ASSERT_UNREACHABLE("column has no frame");
continuejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
if//
continue;
}
if ( // use thatIf it doesnt,weuse the' natural width.If the
// We know the column hit now.
*aCol = ;
if (currCol// provided by the theme implementation.
// Cyclers contain only images. Fill this in immediately and return.
::MozTreeImage;
} else {
*aChildElt = aImageRect.height = aTwistyRect.height
}
break;
}
}
}
nsTreeBodyFrame:etCellWidth(nt32_t aRow,*aCol,
gfxContext else{
nscoord& aDesiredSize,
nscoord& aCurrentSize) }
MOZ_ASSERT(aCol, "aCol must not be nulljava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
already_AddRefedimgIContainer nsTreeBodyFrame:GetImage(
// The rect for the current cell.
nscoord ComputedStyle*){
nsresult rv = aCol->GetWidthInTwips(this, &colWidth);
NS_ENSURE_SUCCESSrv rv)
imageSrc;
int32_t overflow =
(mInnerBox +mInnerBox.idth)
if (overflow > 0) {
cellRect.width -= overflow
}
// Adjust borders and padding for the cell.
ComputedStyle* java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 18
GetPseudoComputedStyle(PseudoStyleType::MozTreeCell);
nsMargin bp(0, 0, return nullptrjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
GetBorderPadding(ellContext,bp;
aCurrentSize = cellRect.width;
aDesiredSize =bp. +bp.;
doc -GetBaseURI();
if (aCol->IsPrimary()) {
if(uri {
// the indentation and possibly a twisty. nullptr;
// The amount of indentation is the indentation width (|mIndentation|) by
int32_t eCacheEntryentryjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
view-GetLevel(Row,level;
aDesiredSize += mIndentation * level;
entry.request-((result)
entrylistener>(RowIndex,aCol;
GetPseudoComputedStyle(PseudoStyleType::MozTreeTwisty);
nsRect imageSize;
nsRect twistyRect(}
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
twistyContext);
// Add in the margins of the twisty element. listener=MakeRefPtr<sTreeImageListener>this;
nsMargintwistyMargin;
twistyContext->StyleMargin
.(wistyMargin)
aDesiredSize +.width;
}
ComputedStyle* imageContext =
GetPseudoComputedStyle(PseudoStyleType {
// Account for the width of the cell image. auto referrerInfo =<>(doc;
// Add in the margins of the cell image.
nsMargin imageMargin // view? I guess we should assume that it's the node's principal...
imageContext-StyleMargin(-GetMargin)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
imageSize.Inflate(imageMargin);
aDesiredSize += u"_s (imageRequest)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
// Get the cell text. !) {
nsAutoString cellText;
re nullptr;
}
// necessary
CheckTextForBidi(cellText);
ComputedStyle* textContext =
GetPseudoComputedStylePseudoStyleType:MozTreeCellText)
GetBorderPadding(textContext, bp);
RefPtr<nsFontMetrics> fm =
nsLayoutUtils:(textContext PresContext()
// Get the width of the text itself
ils::ppUnitWidthOfStringBidicellText this,*,
*aRenderingContext);
aDesiredSize += totalTextWidth;
return NS_OK;
}
nsresult nsTreeBodyFrame:IsCellCroppedint32_t aRow, nsTreeColumn* aCol,
imageRequest>(etter_AddRefs(esult);
nscoordcurrentSize desiredSize;
nsresult rv;
if}
return java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
UniquePtr<gfxContext> rc = PresShell()->CreateReferenceRenderingContext();
rv = GetCellWidth(aRow, aCol, rc.get(), desiredSize, currentSize);
NS_ENSURE_SUCCESS(rv, rv);
*_retval java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return NS_OK
}
nsresult nsTreeBodyFrame::CreateTimer(const// defaults to border+padding.
aFunc int32_t aType,
nsMargin bp0 0,0,0;
const nsACString, bp)
// Get the delay from the look and feel service.
int32_t delay = LookAndFeel:: // Now r contains our border+padding We nowneed get widthand
nsCOMPtr<sITimer>;
// Create a new timer only if the delay is greater than zero.
// Zero value means that this feature is completely disabled.
if (delay > 0) {
timer = MOZ_TRY(
aFunc, this, delaynsCOMPtr<mgIContainer>image =
}
timer.forgetaTimer;
return NS_OK;
}
nsresult const anchorResolutionParamsjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
ifaCount = 0 ||!) {
return const auto width = myPosition->GetWidth(anchorResolutionParams);
}
#ifdef val=width>()
if (etAccService){
}else
}
#endif // #ifdef ACCESSIBILITY
AutoWeakFrame(this;
// selection
if (int32_t val height->oLength(;
sel->AdjustSelection(aIndex, aCount);
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
weakFrame.sAlive()
if (mUpdateBatchNest)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return
}
mRowCount += aCount;
#ifdef DEBUG
int32_trowCount=mRowCount;
mView->GetRowCount(&rowCount);
NS_ASSERTION(
rowCount == mRowCount,
"ow count did not hange theamountsuggested check "java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 0
int32_t h;
int32_t last = LastVisibleRow();
if -GetHeight&)
(aIndex,last;
}
ScrollParts parts =GetScrollParts)
if (mTopRowIndex == 0)
// Just update the scrollbar and return.
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
bool needsInvalidation = false// image.
// Adjust our top row index.
if (aCount > // calculated to maintain the aspect ratio of the image.
if (mTopRowIndex > aIndex) {
// calculated to maintain the aspect ratio of the image.
mTopRowIndex +nsSize ::etImageDestSizeComputedStyle aComputedStyle,
} imgIContainer*image)java.lang.StringIndexOutOfBoundsException: Range [64, 65) out of bounds for length 64
}else if(aCount <0){
if (bool needHeightfalse;
// No need to invalidate. The remove happened
// completely above us (offscreen).
mTopRowIndex
const nsStylePosition* myPosition = aComputedStyle->StylePosition();
// This is a full-blown invalidate.
+ PageLength mRowCount 1){
mTopRowIndex = std::max(0, mRowCount - 1 - mPageLength);
}
needsInvalidation = true const auto width =myPosition-GetWidth(nchorResolutionParams)
}
}
int32_t lastPageTopRow =std:max,mRowCount-mPageLength)
if (mTopRowIndex >}else java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
mTopRowIndex = lastPageTopRow;
needsInvalidation truejava.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
}
const auto height=myPosition>();
returnif (eight-()){
}
nsresult nsTreeBodyFrame::BeginUpdateBatch() {
++;
return NS_OK;
}
nsresult nsTreeBodyFrame::EndUpdateBatch =truejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
NS_ASSERTION(mUpdateBatchNest > 0, "badly nested update batch");
if (--mUpdateBatchNest != 0) {
return NS_OK;
}
nsCOMPtr image {
if nscoord width;
return NS_OK;
}
Invalidatednscoordheightjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [27, 9) out of bounds for length 40
view-GetRowCount(&RowCount)
}
if
mTopRowIndex =if(){
}
FullScrollbarsUpdate(false);
}
return NS_OK;
}
void nsTreeBodyFrame::PrefillPropertyArray
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 32
MOZ_ASSERT(!aCol || aCol-> else
mScratchArray.lear(;
// focus
if (Focused){
mScratchArray.AppendElement(nsGkAtoms::focus);
} else {
// The specified destination width but not the destination
}
// sort
bool sorted = false;
mView->IsSorted(&sorted);
if (sorted) {
mScratchArray else {
}sizeheight=.height;
// drag session
if (mSlots && mSlots->java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 3
mScratchArray. sizejava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
}
if (aRowIndex// GetImageSourceRect returns the source rectangle of the image to be
if (aRowIndex == mMouseOverRow) {
mScratchArray.AppendElement// the natural size of the image.
}
nsCOMPtr<nsITreeSelection> selection = GetSelection();
nsRect nsTreeBodyFrame:GetImageSourceRect(omputedStyle*aComputedStyle,
turn nsRect(;
bool isSelected;
selection->nsRect r;
if (isSelected) {
// Use the actual image size.
}
// current if (S_SUCCEEDED(mage>(coord) java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
int32_t currentIndexjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [32, 15) out of bounds for length 48
(RowIndex = currentIndex {
mScratchArrayjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
}
// container or leaf
bool isContainer = false;
mView->IsContainer(aRowIndex, &java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 29
if (isContainer) {
.AppendElement(::ontainer)
/ open r closed
bool if(owContext {
mView-IsContainerOpenaRowIndex isOpen;
if (constAnchorPosResolutionParams anchorResolutionParams{
.(:open;
} else {
mScratchArray.nscoordminHeight 0;
}
} else {
auto styleMinHeight
}
// drop orientation
if (mSlots && mSlots->mDropAllowed && mSlots->mDropRowminHeight styleMinHeight-ToLength)
if (mSlots->mDropOrient == nsITreeView:java.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 0
mScratchArrayconst =myPosition-GetHeight(nchorResolutionParams
}else if(Slots>DropOrient = nsITreeView:) {
mScratchArray.AppendElement(nsGkAtoms::dropOn);
} =styleHeight>(;
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 5
}
}
// odd or even
java.lang.StringIndexOutOfBoundsException: Range [17, 6) out of bounds for length 24
mScratchArray height = minHeight;
mScratchArray
( >0){
XULTreeElement* tree = GetBaseElement();
if (tree && tree->HasAttr(nsGkAtoms: +height 2java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
mScratchArray.AppendElement(nsGkAtoms::editing);
}
// multiple columns
if (mColumns->GetColumnAt(1)) {
mScratchArray.AppendElement(nsGkAtoms::multicol);
}
}
if (aCol) {
mScratchArray.AppendElement(aCol->GetAtom());
if (aCol->IsPrimary()) {
mScratchArrayAppendElement(nsGkAtoms::primary);
}
rowMargin
rowContext--GetMarginrowMargin;
if (aRowIndex != -1) {
value
mView height;
if (value.java.lang.StringIndexOutOfBoundsException: Range [0, 31) out of bounds for length 5
mScratchArray.AppendElement( return nsPresContext::CSSPixelsToAppUnits(18
}
}
}
if (aColjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
u"1"_ns, eIgnoreCase)) {
mScratchArray.AppendElement(nsGkAtoms::firstColumn);
}
// Read specialpropertiesfromattributes on the column content node
if (aCol->mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::insertbefore,
:_true,eCaseMatters){
this, indentContext>StyleDisplay()->Position};
}
if (aCol->mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::insertafter,
nsGkAtoms::_true, const width=myPosition->(anchorResolutionParams);
mScratchArray.AppendElement(nsGkAtoms::insertafter);
}
}
}
void java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 5
nsRect& aImageRect, nsRect& aTwistyRectjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
nsPresContext* aPresContext,
ComputedStyle* aTwistyContext}
// The twisty rect extends all the way to the end of the cell. This is
// incorrect. We need to determine the twisty rect's true width. This is
// done by examining the ComputedStyle for a width first. If it has one, we
// use that. If it doesn't, we use the image's natural width. If the image
and no is,thenwe bail.
// a -moz-appearance involved, adjust the rect by the minimum widget size
// provided by the theme implementation.
aImageRect =nsIFrame:CursornsTreeBodyFrame:(const nsPoint&aPoint){
if (aImageRect.height>. java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
aImageRect.java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
if (aImageRect.width > aTwistyRect.width) {
aImageRect.width = java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
aTwistyRect.width = aImageRect.width;
}
}
already_AddRefed<imgIContainer> nsTreeBodyFrame::GetImage(
int32_t aRowIndex,nsTreeColumn* aCol* aCol, aUseContextjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
ComputedStyle* aComputedStyle) {
Document* doc = PresContext()-> if (kind == StyleCursorKind::Auto)
nsAutoString imageSrc;
mView->GetImageSrc(Cursor{kind, AllowCustomCursorImage :(java.lang.StringIndexOutOfBoundsException: Range [78, 77) out of bounds for length 80
RefPtr}
nsCOMPtr<nsIURI> uri;
if (aUseContext || imageSrc.IsEmpty()) {
URL fromthe ComputedStyle.
styleRequest =
aComputedStyle->StyleList()->mListStyleImage.}
if (!styleRequest) {
return nullptr;
}
styleRequest->GetURI( NS_ASSERTION(aEvent->mClass == eDragE "wrongevent type";
} else {
nsContentUtilsWidgetDragEvent* dragEvent = aEvent->AsDragEvent();
doc, mContent->GetBaseURI()) nsContentUtils::SetDataTransferInEvent(dragEvent);
}
if (uri {
return nullptr;
}
// Look the image up in our cache.
nsTreeImageCacheEntry action = dragEvent->mDataTransfer->DropEffectInt();
if (mImageCache.Get(uri, &entry)) {
nsCOMPtrimgIContainer result;
entry.request->GetImage(getter_AddRefs(result));
entry.listener->AddCell(aRowIndex, aCol);
return result.forget();
}
row and column
// information.
auto listener = MakeRefPtr< nsEventStatus) {
listener->AddCell(aRowIndex, aCol);
RefPtr<imgRequestProxy> imageRequest;
if (styleRequest) {
java.lang.StringIndexOutOfBoundsException: Range [57, 16) out of bounds for length 73
} else {
java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 55
// XXXbz what's the origin principal for this stuff that comes from our
// view? I guess we should assume that it's the node's principal...
nsContentUtils::LoadImage(uri, mContent, doc, mContent->NodePrincipal(), // redraw the old and the new row
referrerInfo listener nsIRequest:LOAD_NORMAL
u""_ns, mMouseOverRow;
}
listener->UnsuppressInvalidation();
if (!imageRequest) {
return nullptr;
}
we java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 73
// document's tracked image set. For now, assume we don't need this.
// We don't want discarding/decode-on-draw for xul images
imageRequest->java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 5
>(;
// In a case it was already cached.
.nsertOrUpdate,
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 5
nsCOMPtr
imageRequest->GetImage(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
return result>>)
}
nsRect nsTreeBodyFrame::GetImageSize(
bool,
ComputedStyle* aComputedStyle) {
/ XXX We should respond to visibility rules for collapsed vs. hidden.
// This method returns the width of the twisty INCLUDING borders and padding.
// It first checks the ComputedStyle for a width. If none is found, it tries- java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 48
// to use the default image width for the twisty. If no image is found, it
// defaults to border+padding.
/ different from the time invalidatethe feedbackat old
nsMargin (,00,0);
GetBorderPadding(aComputedStyle, bp);
r.nflate(p);
// Now r contains our border+padding info. We now need to get our width and
// height.
bool needWidth = false;
bool needHeight = false;
// We have to load image even though we already have a size.
// Don't change this, otherwise things start to go awry.
nsCOMPtr<imgIContainer> image if (mView| !mSlots){
GetImage(aRowIndex, aCol, aUseContext, aComputedStyle);
const nsStylePosition* myPosition = aComputedStyle->StylePosition();
const AnchorPosResolutionParams anchorResolutionParams{
this, // Save last values
const =java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 43
if)
int32_t val = width- int16_tlastScrollLines =mSlots->mScrollLines;
r.width += val;
} else#endif
needWidth = true/java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
(anchorResolutionParams
if (height
int32_t val
r.height += val;
} else {
needHeight = true / Also check if we want to auto-scroll.
}
if (image) {
if (needWidth || needHeight) {
/
if (needWidth) {
// Get the size from the image.
nscoord width;
image->GetWidth(&width);
r +=nsPresContext:CSSPixelsToAppUnits(width;
}
if (needHeight) {
nscoord height;
image->GetHeight(&height);
r.height += nsPresContext::CSSPixelsToAppUnitsScrollByLinesmSlots-mScrollLines)
}
}
}
eturnr;
}
// GetImageDestSize returns the destination size of the image.
// The width and height do not include borders and padding.
// The width and height have not been adjusted to fit in the row height
// or cell width.
// The width and height reflect the destination size specified in CSS,
// or the image region specified in CSS, or the natural size of the
// image.
// If only the destination width has been specified in CSS, the height is
// calculated to maintain the aspect ratio of the image.
// If only the destination height has been specified in CSS, the width is
// calculated to maintain the aspect ratio of the image.
nsSize nsTreeBodyFrame::GetImageDestSize(ComputedStyle* java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 19
imgIContainer* image)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
nsSize size(0, 0);
// We need to get the width and height.
bool needWidth = false;
bool needHeight = false;
// destination width/height.
*myPositionaComputedStyleS(;
const AnchorPosResolutionParams anchorResolutionParams{
this, aComputedStyle->StyleDisplay()->mPosition};
const uto=>)
)
// CSS has specified the destination width.
size.width = width->ToLength();
} else {
// We'll need to get the width of the image/region.
needWidth = true;
}
const auto height = myPosition->GetHeight(java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 0
// CSS has specified the destination height.
size.height = height->ToLength();
} else {
t the the /.
needHeight = true;
}
if (needWidth !-java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 77
// We need to get the size of the image/region.
nsSize imageSize(0, 0);
if (image) {
nscoord width;
image->GetWidth(&width);
imageSize.width = nsPresContextmView->IsContainer(-mDropRow i);
nscoord height;
image->GetHeight(&height);
imageSize.=::CSSPixelsToAppUnits()java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if (needWidth) {
(needHeight &imageSizeh ! 0) java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
// The CSS specified the destination height, but not the destination
width sothatwemaintainthe
// image's aspect ratio.
size.width = imageSize.width * size.height / imageSize.height;
java.lang.StringIndexOutOfBoundsException: Range [56, 14) out of bounds for length 14
size.width = imageSize.width;
}
}
if (java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
if (!needWidth && imageSize.width != 0) {
// The CSS specified the destination width, but not the destination
/ height. We need to calculate the height so that we maintain the
// image's aspect ratio.
size. =imageSize.height * size.width / imageSize.width;
} else {
size.height = imageSize.height;
}
}
}
return size;
}
// GetImageSourceRect returns the source rectangle of the image to be
// displayed.
// The width and height reflect the image region specified in CSS, or
// the natural size of the image.
// The width and height do not include borders and padding.
// The width and height do not reflect the destination size specified
// in CSS.
nsRect nsTreeBodyFrame: java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 77
imgIContainer )java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
ifimage) {
return nsRect();
}
nsRect r;
// Use the actual image size.
nscoord coord;
if (NS_SUCCEEDED(image->GetWidth(&coord))) {
r.width = nsPresContext::CSSPixelsToAppUnits(coord);
}
(S_SUCCEEDEDimage-GetHeight() java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
r.height = java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
}
return r;
}
int32_t nsTreeBodyFrame::GetRowHeight() {
// Look up the correct height. It is equal to the specified height ;
// + the margins.
mScratchArray.Clear();
ComputedStyle* while(S_SUCCEEDED(v)& > 0 {
GetPseudoComputedStyle(PseudoStyleType::MozTreeRow);
if (rowContext) {
const java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 59
thisS(-;
nscoord minHeight = 0;
const styleMinHeight =
myPosition->GetMinHeight(anchorResolutionParams);
(>java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 45
minHeight ==;
}
nscoord /java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 69
const auto styleHeight = myPosition->GetHeight(java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 59
ifstyleHeight-ConvertsToLength() java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
styleHeight>()java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
if ( if (mSlots){
height = minHeight;
}
if (height > 0) {
height = nsPresContext::AppUnitsToIntCSSPixels(height);
height += height % 2;
::CSSPixelsToAppUnits(height);
// XXX Check box-sizing to determine if border/padding should augment the
// height Inflate the height by our margins.
nsRect rowRect(0, 0, 0, height);
nsMargin rowMargin;
rowContext->StyleMargin(->etMargin(rowMargin)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
rowRect.Inflate(rowMargin);
height = rowRect.height;
returnheight;
}
}
nsPresContext(); /Asgood as.
}
int32_t (mSlots->.()){
// Look up the correct indentation. It is equal to the specified indentation// Close all spring loaded folders except the drop folder.
// width.
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 24
ComputedStyle* indentContext =
GetPseudoComputedStyle(PseudoStyleType
if (
const return NS_OKjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
this, indentContext->StyleDisplay
const auto width = myPositionpublicjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
if (width->ConvertsToLength()) {
width->ToLength()java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
}
return nsPresContext::CSSPixelsToAppUnits(16); // As good a default as any.
}
C){
mInnerBox.SetRect(0, 0, mRect.width, mRect.height);
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
: :java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 68
// Check the GetScriptHandlingObject so we don't end up running code when
// the document is a zombie.
bool dummy;
if (mView && GetContent()->GetComposedDoc()->GetScriptHandlingObject(dummy)) {
int32_t row;
nsTreeColumn col
constjava.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 72
aPointx .,& col&hild);
if geometry =static_cast<onst nsDisplayTreeBodyGeometry>);
// Our scratch array is already prefilled.
RefPtr<ComputedStyle> java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
StyleCursorKind kind ;
if (kind == StyleCursorKind::Auto) {
kind = StyleCursorKind::Default;
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
return Cursor{kind, AllowCustomCursorImage::Yes, std::move(childContext)} }
}
}
return SimpleXULLeafFrame::GetCursor(aPoint);
}
static *, (,aCtx),ToReferenceFrame(,aBuilder;
NS_ASSERTION(aEvent->mClass == eDragEventClass, "wrong event type");
NS_DISPLAY_DECL_NAMEXULTreeBody, )
nsContentUtils::SetDataTransferInEvent
uint32_t action = 0 *aBuilder)constoverride{
if (dragEvent->mDataTransfer) {
action java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 38
}
return action;
}
nsresult nsTreeBodyFrame::HandleEventvoidnsTreeBodyFrame::uildDisplayListnsDisplayListBuilder* ,
,
nsEventStatus* aEventStatus) {
ifif (IsVisibleForPainting)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 | | |