Text bounding box computation for simple line layout is wrong
[WebKit-https.git] / Source / WebCore / rendering / RenderTextLineBoxes.h
index e95629e..d87c6b1 100644 (file)
@@ -27,6 +27,7 @@
 #define RenderTextLineBoxes_h
 
 #include "LayoutRect.h"
+#include "RenderObject.h"
 #include "VisiblePosition.h"
 
 namespace WebCore {
@@ -49,26 +50,43 @@ public:
     void remove(InlineTextBox&);
 
     void removeAllFromParent(RenderText&);
-    void deleteAll(RenderText&);
+    void deleteAll();
+
+    void dirtyAll();
+    bool dirtyRange(RenderText&, unsigned start, unsigned end, int lengthDelta);
 
     InlineTextBox* findNext(int offset, int& position) const;
 
     bool hasRenderedText() const;
     int caretMinOffset() const;
     int caretMaxOffset(const RenderText&) const;
+    enum OffsetType { CaretOffset, CharacterOffset };
+    bool containsOffset(const RenderText&, unsigned, OffsetType) const;
+    unsigned countCharacterOffsetsUntil(unsigned) const;
 
     VisiblePosition positionForPoint(const RenderText&, const LayoutPoint&) const;
 
+    void setSelectionState(RenderText&, RenderObject::SelectionState);
+    LayoutRect selectionRectForRange(unsigned start, unsigned end);
+
     IntRect boundingBox(const RenderText&) const;
+    IntPoint firstRunLocation() const;
     LayoutRect visualOverflowBoundingBox(const RenderText&) const;
 
-    void dirtyAll();
-    bool dirtyRange(RenderText&, unsigned start, unsigned end, int lengthDelta);
+    Vector<IntRect> absoluteRects(const LayoutPoint& accumulatedOffset) const;
+    Vector<IntRect> absoluteRectsForRange(const RenderText&, unsigned start, unsigned end, bool useSelectionHeight, bool* wasFixed) const;
+    enum ClippingOption { NoClipping, ClipToEllipsis };
+    Vector<FloatQuad> absoluteQuads(const RenderText&, bool* wasFixed, ClippingOption) const;
+    Vector<FloatQuad> absoluteQuadsForRange(const RenderText&, unsigned start, unsigned end, bool useSelectionHeight, bool* wasFixed) const;
 
 #if !ASSERT_DISABLED
     ~RenderTextLineBoxes();
 #endif
 
+#if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED
+    void invalidateParentChildLists();
+#endif
+
 private:
     void checkConsistency() const;