Bug 88538 - [Qt][Win] Add missing includes to fix the build
Summary: [Qt][Win] Add missing includes to fix the build
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 420+
Hardware: All All
: P1 Blocker
Assignee: Csaba Osztrogonác
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks: 88300
  Show dependency treegraph
 
Reported: 2012-06-07 07:22 PDT by Csaba Osztrogonác
Modified: 2012-06-11 03:29 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.53 KB, patch)
2012-06-07 09:14 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2012-06-07 07:22:53 PDT
Including HTMLFormElement.h and FormState.h are missing
in many Source/WebKit/qt/Api/* file ...

It is problem, because many "Foo.FooMethod" 
is used before declaration of class Foo.

I don't know why wasn't it problem before.
Patch is coming soon.
Comment 1 Csaba Osztrogonác 2012-06-07 07:45:19 PDT
problematic source files:
- Source/WebKit/qt/Api/qwebframe.cpp
- Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
- Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
- Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp
- Source/WebKit/qt/WebCoreSupport/IconDatabaseClientQt.cpp
Comment 2 Csaba Osztrogonác 2012-06-07 08:42:03 PDT
MSVC Error log why we need this fix:

qwebframe.cpp
f:\WebKit\Source\WTF\wtf/PassRefPtr.h(52) : error C2027: use of undefined type '
WebCore::FormState'
        f:\webkit\source\webcore\loader\PolicyCallback.h(41) : see declaration o
f 'WebCore::FormState'
        f:\WebKit\Source\WTF\wtf/PassRefPtr.h(67) : see reference to function te
mplate instantiation 'void WTF::derefIfNotNull<T>(T *)' being compiled
        with
        [
            T=WebCore::FormState
        ]
        f:\WebKit\Source\WTF\wtf/PassRefPtr.h(67) : while compiling class templa
te member function 'WTF::PassRefPtr<T>::~PassRefPtr(void)'
        with
        [
            T=WebCore::FormState
        ]
        f:\WebKit\Source\WebKit\qt\WebCoreSupport\FrameLoaderClientQt.h(138) : s
ee reference to class template instantiation 'WTF::PassRefPtr<T>' being compiled

        with
        [
            T=WebCore::FormState
        ]
f:\WebKit\Source\WTF\wtf/PassRefPtr.h(52) : error C2227: left of '->deref' must
Comment 3 Csaba Osztrogonác 2012-06-07 09:14:35 PDT
Created attachment 146301 [details]
Patch

Including HTMLFormElement.h is enough to make MSVC happy.
Comment 4 Csaba Osztrogonác 2012-06-07 09:16:00 PDT
Comment on attachment 146301 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=146301&action=review

> Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp:48
> +#include "HTMLFormElement.h"
>  #include "HitTestResult.h"

It is strange a little bit, but necessarry to make style checker happy.
(because HT < Hi)

> Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp:62
> -#include "HistoryItem.h"
> +#include "HTMLFormElement.h"
>  #include "HTMLInputElement.h"
> +#include "HistoryItem.h"

ditto
Comment 5 Csaba Osztrogonác 2012-06-11 03:29:19 PDT
Comment on attachment 146301 [details]
Patch

Clearing flags on attachment: 146301

Committed r119970: <http://trac.webkit.org/changeset/119970>
Comment 6 Csaba Osztrogonác 2012-06-11 03:29:27 PDT
All reviewed patches have been landed.  Closing bug.