REGRESSION(r180050): It broke the !ENABLE(CSS_GRID_LAYOUT) build
authorchangseok.oh@collabora.com <changseok.oh@collabora.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Feb 2015 09:42:13 +0000 (09:42 +0000)
committerchangseok.oh@collabora.com <changseok.oh@collabora.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Feb 2015 09:42:13 +0000 (09:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141647

Reviewed by Csaba Osztrogon√°c.

No new tests since this just fixes a build break.

* dom/Position.cpp: Add a build guard ENABLE(CSS_GRID_LAYOUT) for RenderGrid.
(WebCore::Position::isCandidate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180213 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/Position.cpp

index c5dff3a..a7d5855 100644 (file)
@@ -1,3 +1,15 @@
+2015-02-17  ChangSeok Oh  <changseok.oh@collabora.com>
+
+        REGRESSION(r180050): It broke the !ENABLE(CSS_GRID_LAYOUT) build
+        https://bugs.webkit.org/show_bug.cgi?id=141647
+
+        Reviewed by Csaba Osztrogon√°c.
+
+        No new tests since this just fixes a build break.
+
+        * dom/Position.cpp: Add a build guard ENABLE(CSS_GRID_LAYOUT) for RenderGrid.
+        (WebCore::Position::isCandidate):
+
 2015-02-16  Chris Dumez  <cdumez@apple.com>
 
         Keep all memory cache resources in ListHashSets
index 864f031..962bb0e 100644 (file)
@@ -50,7 +50,7 @@
 #include <stdio.h>
 #include <wtf/text/CString.h>
 #include <wtf/unicode/CharacterNames.h>
-  
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -937,7 +937,11 @@ bool Position::isCandidate() const
     if (m_anchorNode->hasTagName(htmlTag))
         return false;
 
-    if (is<RenderBlockFlow>(*renderer) || is<RenderFlexibleBox>(*renderer) || is<RenderGrid>(*renderer)) {
+    if (is<RenderBlockFlow>(*renderer)
+#if ENABLE(CSS_GRID_LAYOUT)
+        || is<RenderGrid>(*renderer)
+#endif
+        || is<RenderFlexibleBox>(*renderer)) {
         RenderBlock& block = downcast<RenderBlock>(*renderer);
         if (block.logicalHeight() || m_anchorNode->hasTagName(bodyTag)) {
             if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(block))