Bug 43866 - The #if clause enabling a feature should avoid the all includes of the feature
Summary: The #if clause enabling a feature should avoid the all includes of the feature
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 42266
  Show dependency treegraph
 
Reported: 2010-08-11 12:21 PDT by Alejandro G. Castro
Modified: 2019-02-06 09:02 PST (History)
1 user (show)

See Also:


Attachments
Proposed patch (1.23 KB, patch)
2010-08-11 12:23 PDT, Alejandro G. Castro
levin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro G. Castro 2010-08-11 12:21:54 PDT
In this moment we are generating code like this:

...
#include "config.h"
#include "MathMLElementFactory.h"
#include "MathMLNames.h"

#if ENABLE(MATHML)

#include "MathMLMathElement.h"
#include "MathMLInlineContainerElement.h"
#include "MathMLTextElement.h"
#include "MathMLElement.h"
#include <wtf/HashMap.h>
...

This causes problems when you disable a feature because the includes add the symbols from the .h which are going to be undefined when you try to link the library, in gtk it fails linking our unit tests. To solve this issue we could generate something like this:

...
#include "config.h"

#if ENABLE(MATHML)

#include "MathMLElementFactory.h"
#include "MathMLNames.h"
#include "MathMLMathElement.h"
#include "MathMLInlineContainerElement.h"
#include "MathMLTextElement.h"
#include "MathMLElement.h"
#include <wtf/HashMap.h>
...
Comment 1 Alejandro G. Castro 2010-08-11 12:23:50 PDT
Created attachment 64146 [details]
Proposed patch
Comment 2 Alejandro G. Castro 2010-08-12 01:07:21 PDT
Landed r65223
Comment 3 Lucas Forschler 2019-02-06 09:02:50 PST
Mass moving XML DOM bugs to the "DOM" Component.