WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
100232
[EFL][WK2] Clean up construction/destruction code in Ewk_view
https://bugs.webkit.org/show_bug.cgi?id=100232
Summary
[EFL][WK2] Clean up construction/destruction code in Ewk_view
Mikhail Pozdnyakov
Reported
2012-10-24 04:39:25 PDT
Currently construction/destruction code in Ewk_view is really overcomplicated, it comprises of multiple stages and multiple functions to be invoked, this should be simplified as much as possible. Most of the code should go to destructor/constructor of EwkViewImpl class see
bug#100228
.
Attachments
patch
(39.08 KB, patch)
2012-10-26 04:15 PDT
,
Mikhail Pozdnyakov
no flags
Details
Formatted Diff
Diff
rebased
(39.05 KB, patch)
2012-10-26 04:42 PDT
,
Mikhail Pozdnyakov
no flags
Details
Formatted Diff
Diff
patch v2
(39.05 KB, patch)
2012-10-26 04:54 PDT
,
Mikhail Pozdnyakov
kenneth
: review+
Details
Formatted Diff
Diff
patch v3
(39.13 KB, patch)
2012-10-26 05:40 PDT
,
Mikhail Pozdnyakov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Mikhail Pozdnyakov
Comment 1
2012-10-26 04:15:16 PDT
Created
attachment 170882
[details]
patch
Mikhail Pozdnyakov
Comment 2
2012-10-26 04:42:15 PDT
Created
attachment 170890
[details]
rebased
Chris Dumez
Comment 3
2012-10-26 04:47:01 PDT
Comment on
attachment 170890
[details]
rebased View in context:
https://bugs.webkit.org/attachment.cgi?id=170890&action=review
> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:537 > + smartData->priv = new EwkViewImpl(ewkView, context, pageGroup);
I would add a ASSERT(!smartData->priv); right before this line to be safe
> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:553 > + return createEwkView(canvas, smart, context, 0);
Maybe you can add an inline comment to clarify what the 0 stands for
Chris Dumez
Comment 4
2012-10-26 04:49:17 PDT
Comment on
attachment 170890
[details]
rebased View in context:
https://bugs.webkit.org/attachment.cgi?id=170890&action=review
>> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:537 >> + smartData->priv = new EwkViewImpl(ewkView, context, pageGroup); > > I would add a ASSERT(!smartData->priv); right before this line to be safe
Oh, it's there already, sorry :)
Mikhail Pozdnyakov
Comment 5
2012-10-26 04:50:25 PDT
> > Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:553 > > + return createEwkView(canvas, smart, context, 0); > > Maybe you can add an inline comment to clarify what the 0 stands for
would better make it default value :)
Mikhail Pozdnyakov
Comment 6
2012-10-26 04:54:27 PDT
Created
attachment 170893
[details]
patch v2 added default value for pageGroupRef in createEwkView.
Chris Dumez
Comment 7
2012-10-26 05:00:38 PDT
Comment on
attachment 170893
[details]
patch v2 LGTM.
Kenneth Rohde Christiansen
Comment 8
2012-10-26 05:16:11 PDT
Comment on
attachment 170893
[details]
patch v2 View in context:
https://bugs.webkit.org/attachment.cgi?id=170893&action=review
> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h:111 > + WebKit::WebPageProxy* page() { return m_pageProxy.get(); }
why remove the inline?
> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h:230 > + // Note, initialization order is important.
initialization order matters :-) it is not just important
> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h:249 > + Evas_GL* m_evasGl; > + Evas_GL_Context* m_evasGlContext; > + Evas_GL_Surface* m_evasGlSurface;
maybe we should add OwnPtr support for these
Chris Dumez
Comment 9
2012-10-26 05:18:00 PDT
Comment on
attachment 170893
[details]
patch v2 View in context:
https://bugs.webkit.org/attachment.cgi?id=170893&action=review
>> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h:111 >> + WebKit::WebPageProxy* page() { return m_pageProxy.get(); } > > why remove the inline?
They are defined in the header so they are inlined anyway.
>> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h:249 >> + Evas_GL_Surface* m_evasGlSurface; > > maybe we should add OwnPtr support for these
I thought about this but it is not easy because the free functions for Evas_GL_Context and Evas_GL_Surface require the Evas_GL object as well.
Kenneth Rohde Christiansen
Comment 10
2012-10-26 05:20:10 PDT
(In reply to
comment #9
)
> (From update of
attachment 170893
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=170893&action=review
> > >> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h:111 > >> + WebKit::WebPageProxy* page() { return m_pageProxy.get(); } > > > > why remove the inline? > > They are defined in the header so they are inlined anyway.
Only when called from the same class no? which is mostly the case right
Mikhail Pozdnyakov
Comment 11
2012-10-26 05:27:24 PDT
(In reply to
comment #10
)
> (In reply to
comment #9
) > > (From update of
attachment 170893
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=170893&action=review
> > > > >> Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h:111 > > >> + WebKit::WebPageProxy* page() { return m_pageProxy.get(); } > > > > > > why remove the inline? > > > > They are defined in the header so they are inlined anyway. > > Only when called from the same class no? which is mostly the case right
As far as I know member functions are implicit inline provided they are defined inside their class independently from where they called. Anyway methods should be consistent with each other: either all of them (defined in header) have 'inline' or all not have.
Mikhail Pozdnyakov
Comment 12
2012-10-26 05:40:11 PDT
Created
attachment 170904
[details]
patch v3 initialization order matters :)
WebKit Review Bot
Comment 13
2012-10-26 06:43:51 PDT
Comment on
attachment 170904
[details]
patch v3 Clearing flags on attachment: 170904 Committed
r132647
: <
http://trac.webkit.org/changeset/132647
>
WebKit Review Bot
Comment 14
2012-10-26 06:43:56 PDT
All reviewed patches have been landed. Closing bug.
Chris Dumez
Comment 15
2012-10-26 14:11:26 PDT
Comment on
attachment 170904
[details]
patch v3 View in context:
https://bugs.webkit.org/attachment.cgi?id=170904&action=review
> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:-576 > - impl->pageProxy->pageGroup()->preferences()->setWebGLEnabled(true);
It seems like you lost some code here. This new WebGL code is removed from ewk_view.cpp but wasn't added to EwkViewImpl.cpp. Rebasing problem?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug