Simple line layout: RunResolver::Iterator class cleanup.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Apr 2015 20:39:11 +0000 (20:39 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Apr 2015 20:39:11 +0000 (20:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143445

Reviewed by Antti Koivisto.

1. SimpleLineLayout::Run is an intermediate structure and should not be publicly accessible through RunResolver::Iterator.
RunResolver::Run is the class to use to access run properties.
2. Also move advance()/advanceLine() to private. Callers should use LineResolver to advance on lines.

No change in functionality.

* rendering/SimpleLineLayoutResolver.h:

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/SimpleLineLayoutResolver.h

index a9e4885..806f589 100644 (file)
@@ -1,3 +1,18 @@
+2015-04-06  Zalan Bujtas  <zalan@apple.com>
+
+        Simple line layout: RunResolver::Iterator class cleanup.
+        https://bugs.webkit.org/show_bug.cgi?id=143445
+
+        Reviewed by Antti Koivisto.
+
+        1. SimpleLineLayout::Run is an intermediate structure and should not be publicly accessible through RunResolver::Iterator.
+        RunResolver::Run is the class to use to access run properties.
+        2. Also move advance()/advanceLine() to private. Callers should use LineResolver to advance on lines.
+
+        No change in functionality.
+
+        * rendering/SimpleLineLayoutResolver.h:
+
 2015-04-06  Simon Fraser  <simon.fraser@apple.com>
 
         Use a RenderObject bit for isRenderFlowThread()
index f4cf052..0a98d1f 100644 (file)
@@ -72,6 +72,9 @@ public:
     };
 
     class Iterator {
+    friend class Run;
+    friend class RunResolver;
+    friend class LineResolver;
     public:
         Iterator(const RunResolver&, unsigned runIndex, unsigned lineIndex);
 
@@ -82,14 +85,13 @@ public:
 
         Run operator*() const;
 
+    private:
+        const SimpleLineLayout::Run& simpleRun() const;
+        unsigned lineIndex() const { return m_lineIndex; }
         Iterator& advance();
         Iterator& advanceLines(unsigned);
-
         const RunResolver& resolver() const { return m_resolver; }
-        const SimpleLineLayout::Run& simpleRun() const;
-        unsigned lineIndex() const { return m_lineIndex; }
 
-    private:
         const RunResolver& m_resolver;
         unsigned m_runIndex;
         unsigned m_lineIndex;