Fix the defect that WebView will crash with layout params is null.