mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 08:42:13 +00:00
Bug 1825516: Work around suspected gcc bug, r=morgan,eeejay
This revision works around a suspected bug in gcc which was causing build failures. The compiler would complain that ApplyScrollOffset was protected, and therefore inaccessible, if we capture the return value of that function within BoundsWithOffset. I don't think this actually violates any C++ rules, and other compilers agree. To work around the problem, this revision wraps the call to ApplyScrollOffset in an immediately-invoked lambda, which satisfies gcc for some reason. Differential Revision: https://phabricator.services.mozilla.com/D174697
This commit is contained in:
parent
746286bda3
commit
65baef59a3
@ -699,7 +699,11 @@ LayoutDeviceIntRect RemoteAccessibleBase<Derived>::BoundsWithOffset(
|
||||
// happens in this loop instead of both inside and outside of
|
||||
// the loop (like ApplyTransform).
|
||||
// Never apply scroll offsets past a fixed container.
|
||||
const bool hasScrollArea = remoteAcc->ApplyScrollOffset(bounds);
|
||||
// XXX: ApplyScrollOffset wrapped in an immediately-invoked lambda
|
||||
// to work around a suspected gcc bug. See Bug 1825516.
|
||||
const bool hasScrollArea = [&]() {
|
||||
return remoteAcc->ApplyScrollOffset(bounds);
|
||||
}();
|
||||
|
||||
// If we are hit testing and the Accessible has a scroll area, ensure
|
||||
// that the bounds we've calculated so far are constrained to the
|
||||
|
Loading…
Reference in New Issue
Block a user