Bug 158347 - Fix the !ENABLE(SHADOW_DOM) && !ENABLE(DETAILS_ELEMENT) build
Summary: Fix the !ENABLE(SHADOW_DOM) && !ENABLE(DETAILS_ELEMENT) build
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-03 08:00 PDT by Csaba Osztrogonác
Modified: 2016-06-06 13:18 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.55 KB, patch)
2016-06-03 08:02 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 2016-06-03 08:00:05 PDT
build log:
In file included from /usr/include/c++/5/ratio:38:0,
                 from /usr/include/c++/5/chrono:38,
                 from ../../Source/WTF/wtf/StdLibExtras.h:30,
                 from ../../Source/WTF/wtf/FastMalloc.h:26,
                 from ../../Source/WebCore/config.h:75,
                 from ../../Source/WebCore/dom/ContainerNode.cpp:23:
/usr/include/c++/5/type_traits: In instantiation of 'struct std::is_base_of<WebCore::Node, WebCore::HTMLSlotElement>':
../../Source/WTF/wtf/TypeCasts.h:59:79:   required from 'bool WTF::is(ArgType&) [with ExpectedType = WebCore::HTMLSlotElement; ArgType = WebCore::Node]'
../../Source/WebCore/dom/ContainerNode.cpp:103:91:   required from here
/usr/include/c++/5/type_traits:1459:12: error: invalid use of incomplete type 'class WebCore::HTMLSlotElement'
In file included from ../../Source/WebCore/dom/ContainerNode.h:29:0,
                 from ../../Source/WebCore/dom/ContainerNode.cpp:24:
../../Source/WebCore/dom/Node.h:49:7: note: forward declaration of 'class WebCore::HTMLSlotElement'
In file included from ../../Source/WTF/wtf/Ref.h:33:0,
                 from ../../Source/WTF/wtf/PassRefPtr.h:25,
                 from ../../Source/WTF/wtf/RefPtr.h:30,
                 from ../../Source/WebCore/dom/RegisteredEventListener.h:28,
                 from ../../Source/WebCore/dom/EventListenerMap.h:36,
                 from ../../Source/WebCore/dom/EventTarget.h:34,
                 from ../../Source/WebCore/dom/Node.h:28,
                 from ../../Source/WebCore/dom/ContainerNode.h:29,
                 from ../../Source/WebCore/dom/ContainerNode.cpp:24:
../../Source/WTF/wtf/TypeCasts.h: In instantiation of 'bool WTF::is(ArgType&) [with ExpectedType = WebCore::HTMLSlotElement; ArgType = WebCore::Node]':
../../Source/WebCore/dom/ContainerNode.cpp:103:91:   required from here
../../Source/WTF/wtf/TypeCasts.h:59:79: error: 'value' is not a member of 'std::is_base_of<WebCore::Node, WebCore::HTMLSlotElement>'


HTMLSlotElement has ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT) guards, we should guard all of its uses.
Comment 1 Csaba Osztrogonác 2016-06-03 08:02:26 PDT
Created attachment 280443 [details]
Patch
Comment 2 Chris Dumez 2016-06-03 08:52:31 PDT
Comment on attachment 280443 [details]
Patch

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

> Source/WebCore/dom/ContainerNode.cpp:107
> +    if (!child.renderer() && !child.isNamedFlowContentNode() && !childIsHTMLSlotElement)

I would prefer dropping the && !is<HTMLSlotElement>(child) from this if.

> Source/WebCore/dom/ContainerNode.cpp:109
>      if (is<Element>(child))

And add a new if() here:
#if ENABLE(SHADOW_DOM) || ENABLE(DETAILS_ELEMENT)
    if (!is<HTMLSlotElement>(child))
        return;
#endif
Comment 3 Csaba Osztrogonác 2016-06-06 10:09:55 PDT
I don't know anything about this code base, so I didn't want
to change any logic. It's not obvious for me that the change
you suggested won't change the behaviour. 

I don't have time to learn this code base and don't 
want to land or propose a change I don't understand.

If anybody has time and expertise, feel free to fix it.
Comment 4 WebKit Commit Bot 2016-06-06 13:18:10 PDT
Comment on attachment 280443 [details]
Patch

Clearing flags on attachment: 280443

Committed r201723: <http://trac.webkit.org/changeset/201723>
Comment 5 WebKit Commit Bot 2016-06-06 13:18:15 PDT
All reviewed patches have been landed.  Closing bug.