RenderSearchField should not use isTextField() in SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 May 2017 19:17:19 +0000 (19:17 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 May 2017 19:17:19 +0000 (19:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=171608

Reviewed by Simon Fraser.

isTextField() is true for any generic single line text control.

* rendering/RenderObject.h:
(WebCore::RenderObject::isSearchField):
* rendering/RenderSearchField.h:

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderSearchField.h

index 434563b..967f110 100644 (file)
@@ -1,3 +1,16 @@
+2017-05-03  Zalan Bujtas  <zalan@apple.com>
+
+        RenderSearchField should not use isTextField() in SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT
+        https://bugs.webkit.org/show_bug.cgi?id=171608
+
+        Reviewed by Simon Fraser.
+
+        isTextField() is true for any generic single line text control.
+
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::isSearchField):
+        * rendering/RenderSearchField.h:
+
 2017-05-03  Frederic Wang  <fwang@igalia.com>
 
         Remove ScrollingCoordinator::supportsFixedPositionLayers()
index f126dad..aaacbe7 100644 (file)
@@ -266,6 +266,7 @@ public:
     virtual bool isTextControl() const { return false; }
     virtual bool isTextArea() const { return false; }
     virtual bool isTextField() const { return false; }
+    virtual bool isSearchField() const { return false; }
     virtual bool isTextControlInnerBlock() const { return false; }
     virtual bool isVideo() const { return false; }
     virtual bool isWidget() const { return false; }
index fa36a71..4c2d3fa 100644 (file)
@@ -45,6 +45,8 @@ public:
     void hidePopup();
 
 private:
+    bool isSearchField() const final { return true; }
+
     void willBeDestroyed() override;
     void centerContainerIfNeeded(RenderBox*) const override;
     LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, LayoutUnit nonContentHeight) const override;
@@ -92,4 +94,4 @@ private:
 
 } // namespace WebCore
 
-SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderSearchField, isTextField())
+SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderSearchField, isSearchField())