зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1473453 - Part 1: a11y: assert `hitregion` property is always null or true. r=MarcoZ
Fix clang-tidy warning about bool pointers: [misc-bool-pointer-implicit-conversion] accessible/generic/Accessible.cpp:644:9: warning: dubious check of 'bool *' against 'nullptr', did you mean to dereference it? The `hitregion` property is always null or points to a true bool, set here: https://searchfox.org/mozilla-central/rev/6ef785903fee6c0b16a1eab79d722373d940fd78/dom/canvas/CanvasRenderingContext2D.cpp#3936-3937 The `hitregion` property used to be an nsRect pointer: https://searchfox.org/mozilla-central/diff/c797577640f306df87e8c32313c5b826d1e58a9b/accessible/src/generic/Accessible.cpp#928 MozReview-Commit-ID: HYlAnMyaitB --HG-- extra : rebase_source : 2f8d9d151ebc382043c107517838ccdaa0ed7228
This commit is contained in:
Родитель
18777eb091
Коммит
16cc517cf9
|
@ -639,7 +639,10 @@ Accessible::RelativeBounds(nsIFrame** aBoundingFrame) const
|
|||
{
|
||||
nsIFrame* frame = GetFrame();
|
||||
if (frame && mContent) {
|
||||
bool* hasHitRegionRect = static_cast<bool*>(mContent->GetProperty(nsGkAtoms::hitregion));
|
||||
bool* pHasHitRegionRect = static_cast<bool*>(mContent->GetProperty(nsGkAtoms::hitregion));
|
||||
MOZ_ASSERT(pHasHitRegionRect == nullptr ||
|
||||
*pHasHitRegionRect, "hitregion property is always null or true");
|
||||
bool hasHitRegionRect = pHasHitRegionRect != nullptr && *pHasHitRegionRect;
|
||||
|
||||
if (hasHitRegionRect && mContent->IsElement()) {
|
||||
// This is for canvas fallback content
|
||||
|
|
Загрузка…
Ссылка в новой задаче