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

Unified Diff: Source/core/layout/LayoutInline.cpp

Issue 1316163002: Make the LayoutRect->FloatRect constructor explicit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/svg/LayoutSVGBlock.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutInline.cpp
diff --git a/Source/core/layout/LayoutInline.cpp b/Source/core/layout/LayoutInline.cpp
index 0ec59c7cdb61b20bc9a6afcd9defc9ab2ff93663..1c42a8294ba0bc435b66457f540cf10aa64323d0 100644
--- a/Source/core/layout/LayoutInline.cpp
+++ b/Source/core/layout/LayoutInline.cpp
@@ -682,6 +682,10 @@ public:
{
m_quads.append(m_geometryMap.absoluteRect(rect));
}
+ void operator()(const LayoutRect& rect)
+ {
+ operator()(FloatRect(rect));
+ }
private:
Vector<FloatQuad>& m_quads;
LayoutGeometryMap m_geometryMap;
@@ -786,6 +790,11 @@ public:
m_intersected = m_intersected || m_location.intersects(rect);
m_region.unite(enclosingIntRect(rect));
}
+ void operator()(const LayoutRect& rect)
+ {
+ m_intersected = m_intersected || m_location.intersects(rect);
+ m_region.unite(enclosingIntRect(rect));
+ }
bool intersected() const { return m_intersected; }
private:
bool m_intersected;
@@ -849,6 +858,10 @@ public:
{
m_rect.uniteIfNonZero(rect);
}
+ void operator()(const LayoutRect& rect)
+ {
+ operator()(FloatRect(rect));
+ }
private:
FloatRect& m_rect;
};
@@ -1353,8 +1366,12 @@ public:
void operator()(const FloatRect& rect)
{
+ operator()(LayoutRect(rect));
+ }
+ void operator()(const LayoutRect& rect)
+ {
LayoutRect layoutRect(rect);
- layoutRect.move(m_accumulatedOffset.x(), m_accumulatedOffset.y());
+ layoutRect.moveBy(m_accumulatedOffset);
m_rects.append(layoutRect);
}
private:
@@ -1372,6 +1389,11 @@ public:
if (!rect.isEmpty())
AbsoluteLayoutRectsGeneratorContext::operator()(rect);
}
+ void operator()(const LayoutRect& rect)
+ {
+ if (!rect.isEmpty())
+ AbsoluteLayoutRectsGeneratorContext::operator()(FloatRect(rect));
+ }
};
} // unnamed namespace
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/svg/LayoutSVGBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698