Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(669)

Unified Diff: sky/engine/core/dom/Range.cpp

Issue 686653002: Remove a bunch of fixed position dead code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/dom/Range.h ('k') | sky/engine/core/page/scrolling/ScrollingConstraints.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Range.cpp
diff --git a/sky/engine/core/dom/Range.cpp b/sky/engine/core/dom/Range.cpp
index 91837c45ef646e19a1a399071dab1e3d2afa58bc..5467b84eac9ac0dcd0d8d977ea5698fa2a528d6b 100644
--- a/sky/engine/core/dom/Range.cpp
+++ b/sky/engine/core/dom/Range.cpp
@@ -1207,16 +1207,13 @@ IntRect Range::boundingBox() const
return result;
}
-void Range::textRects(Vector<IntRect>& rects, bool useSelectionHeight, RangeInFixedPosition* inFixed) const
+void Range::textRects(Vector<IntRect>& rects, bool useSelectionHeight) const
{
Node* startContainer = m_start.container();
ASSERT(startContainer);
Node* endContainer = m_end.container();
ASSERT(endContainer);
- bool allFixed = true;
- bool someFixed = false;
-
Node* stopNode = pastLastNode();
for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next(*node)) {
RenderObject* r = node->renderer();
@@ -1225,26 +1222,17 @@ void Range::textRects(Vector<IntRect>& rects, bool useSelectionHeight, RangeInFi
RenderText* renderText = toRenderText(r);
int startOffset = node == startContainer ? m_start.offset() : 0;
int endOffset = node == endContainer ? m_end.offset() : std::numeric_limits<int>::max();
- bool isFixed = false;
- renderText->absoluteRectsForRange(rects, startOffset, endOffset, useSelectionHeight, &isFixed);
- allFixed &= isFixed;
- someFixed |= isFixed;
+ renderText->absoluteRectsForRange(rects, startOffset, endOffset, useSelectionHeight);
}
-
- if (inFixed)
- *inFixed = allFixed ? EntirelyFixedPosition : (someFixed ? PartiallyFixedPosition : NotFixedPosition);
}
-void Range::textQuads(Vector<FloatQuad>& quads, bool useSelectionHeight, RangeInFixedPosition* inFixed) const
+void Range::textQuads(Vector<FloatQuad>& quads, bool useSelectionHeight) const
{
Node* startContainer = m_start.container();
ASSERT(startContainer);
Node* endContainer = m_end.container();
ASSERT(endContainer);
- bool allFixed = true;
- bool someFixed = false;
-
Node* stopNode = pastLastNode();
for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next(*node)) {
RenderObject* r = node->renderer();
@@ -1253,14 +1241,8 @@ void Range::textQuads(Vector<FloatQuad>& quads, bool useSelectionHeight, RangeIn
RenderText* renderText = toRenderText(r);
int startOffset = node == startContainer ? m_start.offset() : 0;
int endOffset = node == endContainer ? m_end.offset() : std::numeric_limits<int>::max();
- bool isFixed = false;
- renderText->absoluteQuadsForRange(quads, startOffset, endOffset, useSelectionHeight, &isFixed);
- allFixed &= isFixed;
- someFixed |= isFixed;
+ renderText->absoluteQuadsForRange(quads, startOffset, endOffset, useSelectionHeight);
}
-
- if (inFixed)
- *inFixed = allFixed ? EntirelyFixedPosition : (someFixed ? PartiallyFixedPosition : NotFixedPosition);
}
#ifndef NDEBUG
« no previous file with comments | « sky/engine/core/dom/Range.h ('k') | sky/engine/core/page/scrolling/ScrollingConstraints.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698