<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>43866</bug_id>
          
          <creation_ts>2010-08-11 12:21:54 -0700</creation_ts>
          <short_desc>The #if clause enabling a feature should avoid the all includes of the feature</short_desc>
          <delta_ts>2019-02-06 09:02:50 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>42266</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Alejandro G. Castro">alex</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>263383</commentid>
    <comment_count>0</comment_count>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2010-08-11 12:21:54 -0700</bug_when>
    <thetext>In this moment we are generating code like this:

...
#include &quot;config.h&quot;
#include &quot;MathMLElementFactory.h&quot;
#include &quot;MathMLNames.h&quot;

#if ENABLE(MATHML)

#include &quot;MathMLMathElement.h&quot;
#include &quot;MathMLInlineContainerElement.h&quot;
#include &quot;MathMLTextElement.h&quot;
#include &quot;MathMLElement.h&quot;
#include &lt;wtf/HashMap.h&gt;
...

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 &quot;config.h&quot;

#if ENABLE(MATHML)

#include &quot;MathMLElementFactory.h&quot;
#include &quot;MathMLNames.h&quot;
#include &quot;MathMLMathElement.h&quot;
#include &quot;MathMLInlineContainerElement.h&quot;
#include &quot;MathMLTextElement.h&quot;
#include &quot;MathMLElement.h&quot;
#include &lt;wtf/HashMap.h&gt;
...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>263385</commentid>
    <comment_count>1</comment_count>
      <attachid>64146</attachid>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2010-08-11 12:23:50 -0700</bug_when>
    <thetext>Created attachment 64146
Proposed patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>263643</commentid>
    <comment_count>2</comment_count>
    <who name="Alejandro G. Castro">alex</who>
    <bug_when>2010-08-12 01:07:21 -0700</bug_when>
    <thetext>Landed r65223</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502852</commentid>
    <comment_count>3</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:02:50 -0800</bug_when>
    <thetext>Mass moving XML DOM bugs to the &quot;DOM&quot; Component.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>64146</attachid>
            <date>2010-08-11 12:23:50 -0700</date>
            <delta_ts>2010-08-11 14:09:49 -0700</delta_ts>
            <desc>Proposed patch</desc>
            <filename>includes_dom.patch</filename>
            <type>text/plain</type>
            <size>1256</size>
            <attacher name="Alejandro G. Castro">alex</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
OTBiMmI4NS4uNjJlODAxMCAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArM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RGYWN0b3J5LmgiCi0jaW5jbHVkZSAiJHBh
cmFtZXRlcnN7bmFtZXNwYWNlfU5hbWVzLmgiCiBFTkQKIDsKIAogcHJpbnQgRiAiXG4jaWYgJHBh
cmFtZXRlcnN7Z3VhcmRGYWN0b3J5V2l0aH1cblxuIiBpZiAkcGFyYW1ldGVyc3tndWFyZEZhY3Rv
cnlXaXRofTsKIAorcHJpbnQgRiA8PEVORAorI2luY2x1ZGUgIiRwYXJhbWV0ZXJze25hbWVzcGFj
ZX1FbGVtZW50RmFjdG9yeS5oIgorI2luY2x1ZGUgIiRwYXJhbWV0ZXJze25hbWVzcGFjZX1OYW1l
cy5oIgorRU5ECis7CisKIHByaW50RWxlbWVudEluY2x1ZGVzKCRGKTsKIAogcHJpbnQgRiA8PEVO
RAo=
</data>
<flag name="review"
          id="52646"
          type_id="1"
          status="+"
          setter="levin"
    />
          </attachment>
      

    </bug>

</bugzilla>