Title: [222310] trunk/Source/WebCore
Revision
222310
Author
za...@apple.com
Date
2017-09-20 20:05:13 -0700 (Wed, 20 Sep 2017)

Log Message

Remove redundant SelectionSubtreeData functions.
https://bugs.webkit.org/show_bug.cgi?id=177288

Reviewed by Simon Fraser.

No change in functionality.

* rendering/SelectionSubtreeRoot.h:
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos const):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionClear const): Deleted.
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStart): Deleted.
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStartPos): Deleted.
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEnd): Deleted.
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEndPos): Deleted.
(): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (222309 => 222310)


--- trunk/Source/WebCore/ChangeLog	2017-09-21 02:55:06 UTC (rev 222309)
+++ trunk/Source/WebCore/ChangeLog	2017-09-21 03:05:13 UTC (rev 222310)
@@ -1,3 +1,22 @@
+2017-09-20  Zalan Bujtas  <za...@apple.com>
+
+        Remove redundant SelectionSubtreeData functions.
+        https://bugs.webkit.org/show_bug.cgi?id=177288
+
+        Reviewed by Simon Fraser.
+
+        No change in functionality.
+
+        * rendering/SelectionSubtreeRoot.h:
+        (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData):
+        (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos const):
+        (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionClear const): Deleted.
+        (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStart): Deleted.
+        (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStartPos): Deleted.
+        (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEnd): Deleted.
+        (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEndPos): Deleted.
+        (): Deleted.
+
 2017-09-20  Alex Christensen  <achristen...@webkit.org>
 
         Add infrastructure for adding custom headers to requests per website

Modified: trunk/Source/WebCore/rendering/SelectionSubtreeRoot.h (222309 => 222310)


--- trunk/Source/WebCore/rendering/SelectionSubtreeRoot.h	2017-09-21 02:55:06 UTC (rev 222309)
+++ trunk/Source/WebCore/rendering/SelectionSubtreeRoot.h	2017-09-21 03:05:13 UTC (rev 222310)
@@ -59,8 +59,8 @@
 
         SelectionSubtreeData(RenderObject* selectionStart, std::optional<unsigned> selectionStartPos, RenderObject* selectionEnd, std::optional<unsigned> selectionEndPos)
             : m_selectionStart(selectionStart)
+            , m_selectionEnd(selectionEnd)
             , m_selectionStartPos(selectionStartPos)
-            , m_selectionEnd(selectionEnd)
             , m_selectionEndPos(selectionEndPos)
         {
         }
@@ -69,23 +69,11 @@
         std::optional<unsigned> selectionStartPos() const { return m_selectionStartPos; }
         RenderObject* selectionEnd() const { return m_selectionEnd; }
         std::optional<unsigned> selectionEndPos() const { return m_selectionEndPos; }
-        bool selectionClear() const
-        {
-            return !m_selectionStart
-            && (!m_selectionStartPos)
-            && !m_selectionEnd
-            && (!m_selectionEndPos);
-        }
-
         void selectionStartEndPositions(unsigned& startPos, unsigned& endPos) const
         {
             startPos = m_selectionStartPos.value();
             endPos = m_selectionEndPos.value();
         }
-        void setSelectionStart(RenderObject* selectionStart) { m_selectionStart = selectionStart; }
-        void setSelectionStartPos(std::optional<unsigned> selectionStartPos) { m_selectionStartPos = selectionStartPos;}
-        void setSelectionEnd(RenderObject* selectionEnd) { m_selectionEnd = selectionEnd; }
-        void setSelectionEndPos(std::optional<unsigned> selectionEndPos) { m_selectionEndPos = selectionEndPos;}
         void clearSelection()
         {
             m_selectionStart = nullptr;
@@ -96,8 +84,8 @@
 
     private:
         RenderObject* m_selectionStart { nullptr };
+        RenderObject* m_selectionEnd { nullptr };
         std::optional<unsigned> m_selectionStartPos;
-        RenderObject* m_selectionEnd { nullptr };
         std::optional<unsigned> m_selectionEndPos;
     };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to