Fix typo in StyleTreeResolver.cpp
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Mar 2016 21:47:19 +0000 (21:47 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Mar 2016 21:47:19 +0000 (21:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=139946

Patch by Maksim Kisilev <mkisilev@yandex-team.ru> on 2016-03-10
Reviewed by Andy Estes.

The constructor for CheckForVisibilityChangeOnRecalcStyle was improperly comparing the
result of WKContentChange() (which is not a function) to WKContentVisibilityChange. I
believe the above cast would implicitly resolve to WKContentNoChange in all cases,
whether a visibility change had been observed or not.

This patch corrects this problem. I would expect that this might affect some content
visibility change behavior, but I'm not sure what the appropriate test case would be
since this was apparently found through code inspection.

* style/StyleTreeResolver.cpp:
(WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle):

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

Source/WebCore/ChangeLog
Source/WebCore/style/StyleTreeResolver.cpp

index 20e6837..04fa4ef 100644 (file)
@@ -1,3 +1,22 @@
+2016-03-10  Maksim Kisilev <mkisilev@yandex-team.ru>
+
+        Fix typo in StyleTreeResolver.cpp
+        https://bugs.webkit.org/show_bug.cgi?id=139946
+
+        Reviewed by Andy Estes.
+
+        The constructor for CheckForVisibilityChangeOnRecalcStyle was improperly comparing the
+        result of WKContentChange() (which is not a function) to WKContentVisibilityChange. I
+        believe the above cast would implicitly resolve to WKContentNoChange in all cases,
+        whether a visibility change had been observed or not.
+        
+        This patch corrects this problem. I would expect that this might affect some content
+        visibility change behavior, but I'm not sure what the appropriate test case would be
+        since this was apparently found through code inspection.
+
+        * style/StyleTreeResolver.cpp:
+        (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle):
+
 2016-03-11  Chris Dumez  <cdumez@apple.com>
 
         iOS-sim debug: WebCoreNSURLSessionTest.BasicOperation and WebCoreNSURLSessionTest.InvalidateEmpty asserting
index 455d04f..7a642c0 100644 (file)
@@ -790,7 +790,7 @@ public:
         : m_element(element)
         , m_previousDisplay(currentStyle ? currentStyle->display() : NONE)
         , m_previousVisibility(currentStyle ? currentStyle->visibility() : HIDDEN)
-        , m_previousImplicitVisibility(WKObservingContentChanges() && WKContentChange() != WKContentVisibilityChange ? elementImplicitVisibility(element) : VISIBLE)
+        , m_previousImplicitVisibility(WKObservingContentChanges() && WKObservedContentChange() != WKContentVisibilityChange ? elementImplicitVisibility(element) : VISIBLE)
     {
     }
     ~CheckForVisibilityChangeOnRecalcStyle()