WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 32724
[Qt] It should be possible to disable inspector
https://bugs.webkit.org/show_bug.cgi?id=32724
Summary
[Qt] It should be possible to disable inspector
Ismail Donmez
Reported
2009-12-18 10:53:51 PST
If you disable inspector in Platform.h via #define ENABLE_INSPECTOR 0 build will fail ultimately, mostly because the build system does not handle this case. Disabling such features are important for embedded systems.
Attachments
proposed patch
(7.07 KB, patch)
2009-12-29 20:50 PST
,
Laszlo Gombos
no flags
Details
Formatted Diff
Diff
Patch to add missing ifdef for the disabled inspector case
(1.29 KB, patch)
2010-02-05 10:24 PST
,
Ismail Donmez
no flags
Details
Formatted Diff
Diff
Patch to add missing ifdef for the disabled inspector case (add the semicolon to make it compile!)
(1.29 KB, patch)
2010-02-05 10:26 PST
,
Ismail Donmez
no flags
Details
Formatted Diff
Diff
Patch against latest SVN, fix new compilation failures
(3.48 KB, patch)
2010-02-16 01:53 PST
,
Ismail Donmez
pfeldman
: review+
Details
Formatted Diff
Diff
Surround the functions with a ifdef block, this is simpler
(2.60 KB, patch)
2010-02-16 02:21 PST
,
Ismail Donmez
no flags
Details
Formatted Diff
Diff
Simplify the patch
(2.73 KB, patch)
2010-02-16 02:52 PST
,
Ismail Donmez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Ismail Donmez
Comment 1
2009-12-18 10:54:37 PST
Btw fixing the sources to handle !ENABLE(INSPECTOR) case is easy but the build system has inspector support hardcoded.
Laszlo Gombos
Comment 2
2009-12-29 20:50:37 PST
Created
attachment 45636
[details]
proposed patch To turn off inspector support built QtWebKit with the following command build-webkit --no-javascript-debugger DEFINES+="ENABLE_INSPECTOR=0"
WebKit Review Bot
Comment 3
2009-12-29 20:53:29 PST
style-queue ran check-webkit-style on
attachment 45636
[details]
without any errors.
Eric Seidel (no email)
Comment 4
2009-12-29 23:48:22 PST
Comment on
attachment 45636
[details]
proposed patch Should InspectElement even be defined? 20372045 case InspectElement: { Seems we might as well remove that when ENABLE(INSPECTOR) isn't defined (unless it's part of some public API header and difficutl to remove?) In general this looks OK. Why would we even compile InspectorClientQt when ENABLE(INSPECTOR) was not defined?
Ismail Donmez
Comment 5
2009-12-30 00:08:51 PST
Also --minimal should disable inspector too.
Simon Hausmann
Comment 6
2009-12-30 06:44:51 PST
Comment on
attachment 45636
[details]
proposed patch r=me. I wonder what the gain is for embedded builds, given that we exclude the bulk of data files anyway.
Ismail Donmez
Comment 7
2009-12-30 06:45:56 PST
Well even 10k matters for me on Windows CE 5.0. Thanks for the patch Laszlo, its appreciated.
WebKit Commit Bot
Comment 8
2009-12-30 08:44:06 PST
Comment on
attachment 45636
[details]
proposed patch Clearing flags on attachment: 45636 Committed
r52662
: <
http://trac.webkit.org/changeset/52662
>
WebKit Commit Bot
Comment 9
2009-12-30 08:44:11 PST
All reviewed patches have been landed. Closing bug.
Ismail Donmez
Comment 10
2010-02-05 10:19:09 PST
The patch misses some ifdefs it seems, I get: ..\..\..\WebCore\rendering\RenderLayerBacking.cpp(1028) : error C2039: 'inspectorTimelineAgent' : is not a member of 'WebCore::Page' see declaration of 'WebCore::Page'
Ismail Donmez
Comment 11
2010-02-05 10:24:53 PST
Created
attachment 48238
[details]
Patch to add missing ifdef for the disabled inspector case
Ismail Donmez
Comment 12
2010-02-05 10:26:17 PST
Created
attachment 48239
[details]
Patch to add missing ifdef for the disabled inspector case (add the semicolon to make it compile!)
Ismail Donmez
Comment 13
2010-02-09 16:24:31 PST
Ping?
Ismail Donmez
Comment 14
2010-02-16 01:53:54 PST
Created
attachment 48795
[details]
Patch against latest SVN, fix new compilation failures
Pavel Feldman
Comment 15
2010-02-16 02:05:49 PST
Comment on
attachment 48795
[details]
Patch against latest SVN, fix new compilation failures
> > static InspectorTimelineAgent* inspectorTimelineAgent(RenderObject* renderer) > { > +#if !ENABLE(INSPECTOR) > + return 0; > +#else > Frame* frame = renderer->document()->frame(); > if (!frame) > return 0; > @@ -1026,6 +1029,7 @@ static InspectorTimelineAgent* inspectorTimelineAgent(RenderObject* renderer) > if (!page) > return 0; > return page->inspectorTimelineAgent(); > +#endif > }
You should just surround this entire method with if ENABLE(INSPECTOR). Please fix this before landing.
> > // Up-call from compositing layer drawing callback. > diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp > index 185a2ee..256d6c4 100644 > --- a/WebKit/qt/Api/qwebpage.cpp > +++ b/WebKit/qt/Api/qwebpage.cpp > @@ -163,27 +163,42 @@ QString QWEBKIT_EXPORT qt_webpage_groupName(QWebPage* page) > > void QWEBKIT_EXPORT qt_drt_webinspector_executeScript(QWebPage* page, long callId, const QString& script) > {
Nit: In case these are only used from within DRT, should you hide these methods as well and use guards in layout test controller instead?
Ismail Donmez
Comment 16
2010-02-16 02:07:54 PST
(In reply to
comment #15
)
> (From update of
attachment 48795
[details]
) > > > > static InspectorTimelineAgent* inspectorTimelineAgent(RenderObject* renderer) > > { > > +#if !ENABLE(INSPECTOR) > > + return 0; > > +#else > > Frame* frame = renderer->document()->frame(); > > if (!frame) > > return 0; > > @@ -1026,6 +1029,7 @@ static InspectorTimelineAgent* inspectorTimelineAgent(RenderObject* renderer) > > if (!page) > > return 0; > > return page->inspectorTimelineAgent(); > > +#endif > > } > > > You should just surround this entire method with if ENABLE(INSPECTOR). Please > fix this before landing.
Since I cannot land myself anyway, if I just surround with if ENABLE(INSPECTOR) it would give a compiler warning/error saying the function should return a value.
Pavel Feldman
Comment 17
2010-02-16 02:09:17 PST
(In reply to
comment #16
)
> (In reply to
comment #15
) > > (From update of
attachment 48795
[details]
[details]) > > > > > > static InspectorTimelineAgent* inspectorTimelineAgent(RenderObject* renderer) > > > { > > > +#if !ENABLE(INSPECTOR) > > > + return 0; > > > +#else > > > Frame* frame = renderer->document()->frame(); > > > if (!frame) > > > return 0; > > > @@ -1026,6 +1029,7 @@ static InspectorTimelineAgent* inspectorTimelineAgent(RenderObject* renderer) > > > if (!page) > > > return 0; > > > return page->inspectorTimelineAgent(); > > > +#endif > > > } > > > > > > You should just surround this entire method with if ENABLE(INSPECTOR). Please > > fix this before landing. > > Since I cannot land myself anyway, if I just surround with if ENABLE(INSPECTOR) > it would give a compiler warning/error saying the function should return a > value.
I mean surround the function, not its body. It should never be referenced if there is no inspector.
Ismail Donmez
Comment 18
2010-02-16 02:10:25 PST
(In reply to
comment #17
)
> (In reply to
comment #16
) > > (In reply to
comment #15
) > > > (From update of
attachment 48795
[details]
[details] [details]) > > > > > > > > static InspectorTimelineAgent* inspectorTimelineAgent(RenderObject* renderer) > > > > { > > > > +#if !ENABLE(INSPECTOR) > > > > + return 0; > > > > +#else > > > > Frame* frame = renderer->document()->frame(); > > > > if (!frame) > > > > return 0; > > > > @@ -1026,6 +1029,7 @@ static InspectorTimelineAgent* inspectorTimelineAgent(RenderObject* renderer) > > > > if (!page) > > > > return 0; > > > > return page->inspectorTimelineAgent(); > > > > +#endif > > > > } > > > > > > > > > You should just surround this entire method with if ENABLE(INSPECTOR). Please > > > fix this before landing. > > > > Since I cannot land myself anyway, if I just surround with if ENABLE(INSPECTOR) > > it would give a compiler warning/error saying the function should return a > > value. > > I mean surround the function, not its body. It should never be referenced if > there is no inspector.
That would require patching the header too, isn't that kind of ugly? :-)
Pavel Feldman
Comment 19
2010-02-16 02:15:17 PST
> That would require patching the header too, isn't that kind of ugly? :-)
There is no (should be no) header entry for it. It is just a static helper function defined for private use in this cpp.
Ismail Donmez
Comment 20
2010-02-16 02:18:47 PST
(In reply to
comment #19
)
> > That would require patching the header too, isn't that kind of ugly? :-) > > There is no (should be no) header entry for it. It is just a static helper > function defined for private use in this cpp.
I forgot the fact that the function was static, was lame of me. Let me upload a fixed patch.
Ismail Donmez
Comment 21
2010-02-16 02:21:09 PST
Created
attachment 48797
[details]
Surround the functions with a ifdef block, this is simpler
Pavel Feldman
Comment 22
2010-02-16 02:31:30 PST
Comment on
attachment 48797
[details]
Surround the functions with a ifdef block, this is simpler What about static InspectorTimelineAgent* inspectorTimelineAgent It is still not hidden, while it was the only one I really cared about.
Ismail Donmez
Comment 23
2010-02-16 02:52:19 PST
Created
attachment 48798
[details]
Simplify the patch
WebKit Commit Bot
Comment 24
2010-02-16 03:10:21 PST
Comment on
attachment 48798
[details]
Simplify the patch Clearing flags on attachment: 48798 Committed
r54815
: <
http://trac.webkit.org/changeset/54815
>
WebKit Commit Bot
Comment 25
2010-02-16 03:10:33 PST
All reviewed patches have been landed. Closing bug.
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