author | Jonathan Kew <jkew@mozilla.com> |
Sun, 29 Apr 2012 20:34:09 -0400 | |
changeset 96736 | cfaf90b22fc3c05025890bd1acfab2c49ec77594 |
parent 96735 | 32a0e99932b293a9413c299ed3a616718d9c68c9 |
child 96774 | 0a796d07499adcd22fdbfc31950b56d5ecdfdd37 |
child 96798 | fee74fe8354c552cbc852697f3517ca56ae8e780 |
child 97523 | 005a5bfe547406d6cb7d76b90dabd56ee65fc036 |
push id | 1116 |
push user | lsblakk@mozilla.com |
push date | Mon, 16 Jul 2012 19:38:18 +0000 |
treeherder | mozilla-beta@95f959a8b4dc [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | roc |
bugs | 749658 |
milestone | 15.0a1 |
first release with | nightly linux32
cfaf90b22fc3
/
15.0a1
/
20120430030504
/
files
nightly linux64
cfaf90b22fc3
/
15.0a1
/
20120430030504
/
files
nightly mac
cfaf90b22fc3
/
15.0a1
/
20120430030504
/
files
nightly win32
cfaf90b22fc3
/
15.0a1
/
20120430030504
/
files
nightly win64
cfaf90b22fc3
/
15.0a1
/
20120430030504
/
files
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
releases | nightly linux32
15.0a1
/
20120430030504
/
pushlog to previous
nightly linux64
15.0a1
/
20120430030504
/
pushlog to previous
nightly mac
15.0a1
/
20120430030504
/
pushlog to previous
nightly win32
15.0a1
/
20120430030504
/
pushlog to previous
nightly win64
15.0a1
/
20120430030504
/
pushlog to previous
|
--- a/layout/xul/base/src/nsTextBoxFrame.cpp +++ b/layout/xul/base/src/nsTextBoxFrame.cpp @@ -926,37 +926,40 @@ nsTextBoxFrame::DoLayout(nsBoxLayoutStat } nsresult rv = nsLeafBoxFrame::DoLayout(aBoxLayoutState); CalcDrawRect(*aBoxLayoutState.GetRenderingContext()); const nsStyleText* textStyle = GetStyleText(); - nsRect bounds(nsPoint(0, 0), GetSize()); + nsRect scrollBounds(nsPoint(0, 0), GetSize()); nsRect textRect = mTextDrawRect; nsRefPtr<nsFontMetrics> fontMet; nsLayoutUtils::GetFontMetricsForFrame(this, getter_AddRefs(fontMet)); nsBoundingMetrics metrics = - fontMet->GetInkBoundsForVisualOverflow(mTitle.get(), mTitle.Length(), + fontMet->GetInkBoundsForVisualOverflow(mCroppedTitle.get(), + mCroppedTitle.Length(), aBoxLayoutState.GetRenderingContext()); textRect.x -= metrics.leftBearing; textRect.width = metrics.width; // In DrawText() we always draw with the baseline at MaxAscent() (relative to mTextDrawRect), textRect.y += fontMet->MaxAscent() - metrics.ascent; textRect.height = metrics.ascent + metrics.descent; - bounds.UnionRect(bounds, textRect); - nsOverflowAreas overflow(bounds, bounds); + // Our scrollable overflow is our bounds; our visual overflow may + // extend beyond that. + nsRect visualBounds; + visualBounds.UnionRect(scrollBounds, textRect); + nsOverflowAreas overflow(visualBounds, scrollBounds); if (textStyle->mTextShadow) { - // Our scrollable overflow is our bounds; our visual overflow may - // extend beyond that. + // text-shadow extends our visual but not scrollable bounds nsRect &vis = overflow.VisualOverflow(); vis.UnionRect(vis, nsLayoutUtils::GetTextShadowRectsUnion(mTextDrawRect, this)); } FinishAndStoreOverflow(overflow, GetSize()); return rv; }