Crash traces indicate that the SearchInputType object can get into a state where the results or cancel buttons are not part of a Document. When this happens, the computedStyle() accessor returns nullptr, which can cause a crash. This patch protects against accidentally dereferencing the nullptr returned in this case.
Is it OK for the objects to be in this state? In other words, will the null check convert a crash into a misbehavior, or is it a complete fix?