Title: [133548] trunk/Source/WebCore
Revision
133548
Author
[email protected]
Date
2012-11-05 18:13:22 -0800 (Mon, 05 Nov 2012)

Log Message

LayoutTest fast/dom/shadow/shadowroot-type.html is failing on Windows
https://bugs.webkit.org/show_bug.cgi?id=101201

Reviewed by Hajime Morita.

When we use a bit field for enum, Windows compiler seems returning some wrong value.
We would like to avoid using a bit field for enum value.

* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::create):
* dom/ShadowRoot.h:
(WebCore::ShadowRoot::type):
(WebCore::ShadowRoot::setType):
(ShadowRoot):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (133547 => 133548)


--- trunk/Source/WebCore/ChangeLog	2012-11-06 02:05:04 UTC (rev 133547)
+++ trunk/Source/WebCore/ChangeLog	2012-11-06 02:13:22 UTC (rev 133548)
@@ -1,3 +1,20 @@
+2012-11-05  Shinya Kawanaka  <[email protected]>
+
+        LayoutTest fast/dom/shadow/shadowroot-type.html is failing on Windows
+        https://bugs.webkit.org/show_bug.cgi?id=101201
+
+        Reviewed by Hajime Morita.
+
+        When we use a bit field for enum, Windows compiler seems returning some wrong value.
+        We would like to avoid using a bit field for enum value.
+
+        * dom/ShadowRoot.cpp:
+        (WebCore::ShadowRoot::create):
+        * dom/ShadowRoot.h:
+        (WebCore::ShadowRoot::type):
+        (WebCore::ShadowRoot::setType):
+        (ShadowRoot):
+
 2012-11-05  Benjamin Poulain  <[email protected]>
 
         TransformOperationInfo's constructor is really slow

Modified: trunk/Source/WebCore/dom/ShadowRoot.cpp (133547 => 133548)


--- trunk/Source/WebCore/dom/ShadowRoot.cpp	2012-11-06 02:05:04 UTC (rev 133547)
+++ trunk/Source/WebCore/dom/ShadowRoot.cpp	2012-11-06 02:13:22 UTC (rev 133548)
@@ -129,7 +129,7 @@
     }
 
     RefPtr<ShadowRoot> shadowRoot = adoptRef(new ShadowRoot(element->document()));
-    shadowRoot->m_type = type;
+    shadowRoot->setType(type);
 
     ec = 0;
     element->ensureShadow()->addShadowRoot(element, shadowRoot, type, ec);

Modified: trunk/Source/WebCore/dom/ShadowRoot.h (133547 => 133548)


--- trunk/Source/WebCore/dom/ShadowRoot.h	2012-11-06 02:05:04 UTC (rev 133547)
+++ trunk/Source/WebCore/dom/ShadowRoot.h	2012-11-06 02:13:22 UTC (rev 133548)
@@ -98,7 +98,7 @@
     virtual void registerScopedHTMLStyleChild() OVERRIDE;
     virtual void unregisterScopedHTMLStyleChild() OVERRIDE;
 
-    ShadowRootType type() const { return m_type; }
+    ShadowRootType type() const { return m_isAuthorShadowRoot ? AuthorShadowRoot : UserAgentShadowRoot; }
 
     PassRefPtr<Node> cloneNode(bool, ExceptionCode&);
 
@@ -112,11 +112,13 @@
     virtual bool childTypeAllowed(NodeType) const;
     virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) OVERRIDE;
 
+    void setType(ShadowRootType type) { m_isAuthorShadowRoot = type == AuthorShadowRoot; }
+
     ShadowRoot* m_prev;
     ShadowRoot* m_next;
     bool m_applyAuthorStyles : 1;
     bool m_resetStyleInheritance : 1;
-    ShadowRootType m_type : 1;
+    bool m_isAuthorShadowRoot : 1;
     InsertionPoint* m_insertionPointAssignedTo;
     size_t m_numberOfShadowElementChildren;
     size_t m_numberOfContentElementChildren;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to