Bug 1932512 - Pass BrowsingContext to nsIColorPicker::Init; r=geckoview-reviewers,win-reviewers,mac-reviewers,emilio,spohl,m_kato,rkraesig
Differential Revision: https://phabricator.services.mozilla.com/D229682
This commit is contained in:
@@ -736,8 +736,8 @@ nsresult HTMLInputElement::InitColorPicker() {
|
||||
|
||||
nsCOMPtr<Document> doc = OwnerDoc();
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowOuter> win = doc->GetWindow();
|
||||
if (!win) {
|
||||
RefPtr<BrowsingContext> bc = doc->GetBrowsingContext();
|
||||
if (!bc) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
@@ -759,7 +759,7 @@ nsresult HTMLInputElement::InitColorPicker() {
|
||||
nsAutoString initialValue;
|
||||
GetNonFileValueInternal(initialValue);
|
||||
nsTArray<nsString> colors = GetColorsFromList();
|
||||
nsresult rv = colorPicker->Init(win, title, initialValue, colors);
|
||||
nsresult rv = colorPicker->Init(bc, title, initialValue, colors);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIColorPickerShownCallback> callback =
|
||||
|
||||
Reference in New Issue
Block a user