Bug 1174510 - Fix fallback from cursor formats that we don't support or that fail to decode to other cursor files. r=seth

Although I didn't test this theory, I think it's fixing a regression
from patch 3 in bug 1084136 (changeset e7ecd25d7e7c), which stopped
clearing other flags when an error occurred.
This commit is contained in:
L. David Baron 2015-09-11 08:17:40 -07:00
parent af1a079f54
commit f276ed90b3

View File

@ -8299,7 +8299,9 @@ void nsFrame::FillCursorInformationFromStyle(const nsStyleUserInterface* ui,
item < item_end; ++item) {
uint32_t status;
nsresult rv = item->GetImage()->GetImageStatus(&status);
if (NS_SUCCEEDED(rv) && (status & imgIRequest::STATUS_LOAD_COMPLETE)) {
if (NS_SUCCEEDED(rv) &&
(status & imgIRequest::STATUS_LOAD_COMPLETE) &&
!(status & imgIRequest::STATUS_ERROR)) {
// This is the one we want
item->GetImage()->GetImage(getter_AddRefs(aCursor.mContainer));
aCursor.mHaveHotspot = item->mHaveHotspot;