Backed out changeset d89f93a40f78 (bug 1212527) due to static analysis bustage

MozReview-Commit-ID: 79SduJl9zcs
This commit is contained in:
Makoto Kato 2016-05-27 00:05:10 +09:00
Родитель 20bf099333
Коммит 8ccc8229b8
3 изменённых файлов: 0 добавлений и 44 удалений

Просмотреть файл

@ -2880,36 +2880,6 @@ nsChildView::DispatchAPZWheelInputEvent(InputData& aEvent, bool aCanTriggerSwipe
}
}
// When using 10.11, calling showDefinitionForAttributedString causes the
// following exception on LookupViewService. (rdar://26476091)
//
// Exception: decodeObjectForKey: class "TitlebarAndBackgroundColor" not
// loaded or does not exist
//
// So we set temporary color that is NSColor before calling it.
class MOZ_RAII AutoBackgroundSetter final {
public:
AutoBackgroundSetter(NSView* aView) {
if (nsCocoaFeatures::OnElCapitanOrLater() &&
[[aView window] isKindOfClass:[ToolbarWindow class]]) {
mWindow = (ToolbarWindow*)[aView window];
[mWindow setTemporaryBackgroundColor];
} else {
mWindow = nullptr;
}
}
~AutoBackgroundSetter() {
if (mWindow) {
[mWindow restoreBackgroundColor];
}
}
private:
ToolbarWindow* mWindow;
};
void
nsChildView::LookUpDictionary(
const nsAString& aText,
@ -2934,8 +2904,6 @@ nsChildView::LookUpDictionary(
pt.y += [font ascender];
}
}
AutoBackgroundSetter setter(mView);
[mView showDefinitionForAttributedString:attrStr atPoint:pt];
NS_OBJC_END_TRY_ABORT_BLOCK;

Просмотреть файл

@ -241,8 +241,6 @@ typedef struct _nsCocoaWindowList {
- (void)placeFullScreenButton:(NSRect)aRect;
- (NSPoint)windowButtonsPositionWithDefaultPosition:(NSPoint)aDefaultPosition;
- (NSPoint)fullScreenButtonPositionWithDefaultPosition:(NSPoint)aDefaultPosition;
- (void)setTemporaryBackgroundColor;
- (void)restoreBackgroundColor;
@end
class nsCocoaWindow : public nsBaseWidget, public nsPIWidgetCocoa

Просмотреть файл

@ -3401,16 +3401,6 @@ static const NSString* kStateCollectionBehavior = @"collectionBehavior";
return mBackgroundColor;
}
- (void)setTemporaryBackgroundColor
{
[super setBackgroundColor:[NSColor whiteColor]];
}
- (void)restoreBackgroundColor
{
[super setBackgroundColor:mBackgroundColor];
}
- (void)setTitlebarNeedsDisplayInRect:(NSRect)aRect
{
[self setTitlebarNeedsDisplayInRect:aRect sync:NO];