New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add datalist element support #9535

Merged
merged 8 commits into from May 29, 2017

Conversation

Projects
None yet
4 participants
@brenca
Member

brenca commented May 19, 2017

Resolves #360
Also fixes menubar inkdrop animations appearing at an incorrect location in RTL layout mode.

image

@brenca brenca requested review from zcbenz and kevinsawicki May 19, 2017

@brenca

This comment has been minimized.

Member

brenca commented May 21, 2017

Ready for review 👀

@zcbenz zcbenz self-assigned this May 23, 2017

@@ -37,6 +38,20 @@ IPC_MESSAGE_ROUTED3(AtomViewMsg_Message,
IPC_MESSAGE_ROUTED0(AtomViewMsg_Offscreen)
IPC_MESSAGE_ROUTED4(AtomAutofillViewMsg_ShowPopup,

This comment has been minimized.

@zcbenz

zcbenz May 24, 2017

Contributor

Message sent to the main process should have name XXXViewHostMsg_YYY.

This comment has been minimized.

@brenca

brenca May 26, 2017

Member

I have used the chromium convention instead, using XXXFrameHost... / XXXFrame... for messages sent between RenderFrame and RenderFrameHost.

std::vector<base::string16> /* values */,
std::vector<base::string16> /* labels */)
IPC_MESSAGE_ROUTED0(AtomAutofillViewMsg_HidePopup)

This comment has been minimized.

@zcbenz

zcbenz May 24, 2017

Contributor

Should be AtomAutofillViewHostMsg_HidePopup.

IPC_MESSAGE_ROUTED1(AtomAutofillViewMsg_AcceptSuggestion,
base::string16 /* suggestion */)
IPC_MESSAGE_ROUTED1(AtomAutofillViewHostMsg_RoutingId,

This comment has been minimized.

@zcbenz

zcbenz May 24, 2017

Contributor

Should be AtomAutofillViewMsg_RoutingId.

@@ -397,6 +407,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
std::unique_ptr<AtomJavaScriptDialogManager> dialog_manager_;
std::unique_ptr<WebViewGuestDelegate> guest_delegate_;
AutofillPopup* autofill_popup_;

This comment has been minimized.

@zcbenz

zcbenz May 24, 2017

Contributor

This seems to be leaked? It can be managed with std::unique_ptr.

const gfx::RectF& bounds,
const std::vector<base::string16>& values,
const std::vector<base::string16>& labels) {
auto relay = reinterpret_cast<NativeWindowViews*>(

This comment has been minimized.

@zcbenz

zcbenz May 24, 2017

Contributor

WebContents should not handle GUI related code, autofill_popup_ and its related code should be moved to NativeWindow instead.

if (GetWidget()) {
GetWidget()->Close();
} else {
delete this;

This comment has been minimized.

@zcbenz

zcbenz May 24, 2017

Contributor

delete this makes the code hard to understand, a better pattern is to manage AutofillPopupView with std::unique_ptr, and free it in AutofillPopup.

void AutofillPopup::CreateView() {
  view_.reset(new AutofillPopupView(this, parent_widget));
  view_->Show();
}

void AutofillPopup::Hide() {
  if (view_) {
    view_->Hide();
    view_.reset();
  }
}

This comment has been minimized.

@brenca

brenca May 26, 2017

Member

I have removed that delete this call, but since the view is also WidgetDelegate, it gets deleted when the Widget gets deleted, so we can't manage the lifetime ourselves. (It would crash if I tried)

content::RenderFrame* render_frame_;
int web_contents_routing_id_;
Helper* helper_;

This comment has been minimized.

@zcbenz

zcbenz May 24, 2017

Contributor

It should be managed by std::unique_ptr instead of being manually deleted.

void DoFocusChangeComplete();
content::RenderFrame* render_frame_;
int web_contents_routing_id_;

This comment has been minimized.

@zcbenz

zcbenz May 24, 2017

Contributor

There is no need to record render_frame_ nor web_contents_routing_id_, the RenderFrameObserver already provides helpers to get them.

@@ -37,6 +38,20 @@ IPC_MESSAGE_ROUTED3(AtomViewMsg_Message,
IPC_MESSAGE_ROUTED0(AtomViewMsg_Offscreen)
IPC_MESSAGE_ROUTED4(AtomAutofillViewMsg_ShowPopup,
int /* routing_id */,

This comment has been minimized.

@zcbenz

zcbenz May 24, 2017

Contributor

This parameter is redundant.

@zcbenz

zcbenz approved these changes May 29, 2017

@zcbenz zcbenz merged commit 7d994f2 into electron:master May 29, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@zcbenz

This comment has been minimized.

Contributor

zcbenz commented May 29, 2017

@brenca Do you have plan to implement this for macOS? I can help with that if not.

@gerhardberger

This comment has been minimized.

Member

gerhardberger commented May 31, 2017

@zcbenz I'll look into the macOS support. I'll let you know if I run into some trouble.

@MarkMurphy

This comment has been minimized.

MarkMurphy commented Feb 25, 2018

@gerhardberger I take it you ran into some trouble?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment