mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 4b2c67fe7e6b (relanding bug 449168)
This commit is contained in:
parent
bf2cf8a1af
commit
53328c578f
@ -63,6 +63,14 @@
|
||||
|
||||
struct SelectionDetails
|
||||
{
|
||||
#ifdef NS_BUILD_REFCNT_LOGGING
|
||||
SelectionDetails() {
|
||||
MOZ_COUNT_CTOR(SelectionDetails);
|
||||
}
|
||||
~SelectionDetails() {
|
||||
MOZ_COUNT_DTOR(SelectionDetails);
|
||||
}
|
||||
#endif
|
||||
PRInt32 mStart;
|
||||
PRInt32 mEnd;
|
||||
SelectionType mType;
|
||||
|
@ -373,6 +373,9 @@ protected:
|
||||
nscoord mAscent;
|
||||
gfxTextRun* mTextRun;
|
||||
|
||||
// The caller of this method must call DestroySelectionDetails() on the
|
||||
// return value, if that return value is not null. Calling
|
||||
// DestroySelectionDetails() on a null value is still OK, just not necessary.
|
||||
SelectionDetails* GetSelectionDetails();
|
||||
|
||||
void AdjustSelectionPointsForBidi(SelectionDetails *sdptr,
|
||||
|
@ -4515,12 +4515,18 @@ nsTextFrame::HasSelectionOverflowingDecorations(nsPresContext* aPresContext,
|
||||
if (ratio <= 1.0f)
|
||||
return PR_FALSE;
|
||||
|
||||
for (SelectionDetails *sd = GetSelectionDetails(); sd; sd = sd->mNext) {
|
||||
SelectionDetails *details = GetSelectionDetails();
|
||||
PRBool retval = PR_FALSE;
|
||||
for (SelectionDetails *sd = details; sd; sd = sd->mNext) {
|
||||
if (sd->mStart != sd->mEnd &&
|
||||
sd->mType & SelectionTypesWithDecorations)
|
||||
return PR_TRUE;
|
||||
sd->mType & SelectionTypesWithDecorations) {
|
||||
retval = PR_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return PR_FALSE;
|
||||
DestroySelectionDetails(details);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
//null range means the whole thing
|
||||
|
Loading…
Reference in New Issue
Block a user