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

Unified Diff: Source/core/html/HTMLAreaElement.cpp

Issue 82083002: Move viewport unit resolution to style recalc time (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: rename browser zoom to page zoom Created 6 years, 12 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/frame/FrameView.cpp ('k') | Source/core/html/HTMLMetaElement-in.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLAreaElement.cpp
diff --git a/Source/core/html/HTMLAreaElement.cpp b/Source/core/html/HTMLAreaElement.cpp
index f24966ba8fff44ddeecdb371f41d3416a9ab525e..cf897d4f0ad357f28362e151ac8e28ee2588e2c7 100644
--- a/Source/core/html/HTMLAreaElement.cpp
+++ b/Source/core/html/HTMLAreaElement.cpp
@@ -141,30 +141,29 @@ Path HTMLAreaElement::getRegion(const LayoutSize& size) const
}
Path path;
- RenderView* renderView = document().renderView();
switch (shape) {
case Poly:
if (m_coords.size() >= 6) {
int numPoints = m_coords.size() / 2;
- path.moveTo(FloatPoint(minimumValueForLength(m_coords[0], width, renderView), minimumValueForLength(m_coords[1], height, renderView)));
+ path.moveTo(FloatPoint(minimumValueForLength(m_coords[0], width), minimumValueForLength(m_coords[1], height)));
for (int i = 1; i < numPoints; ++i)
- path.addLineTo(FloatPoint(minimumValueForLength(m_coords[i * 2], width, renderView), minimumValueForLength(m_coords[i * 2 + 1], height, renderView)));
+ path.addLineTo(FloatPoint(minimumValueForLength(m_coords[i * 2], width), minimumValueForLength(m_coords[i * 2 + 1], height)));
path.closeSubpath();
}
break;
case Circle:
if (m_coords.size() >= 3) {
Length radius = m_coords[2];
- int r = min(minimumValueForLength(radius, width, renderView), minimumValueForLength(radius, height, renderView));
- path.addEllipse(FloatRect(minimumValueForLength(m_coords[0], width, renderView) - r, minimumValueForLength(m_coords[1], height, renderView) - r, 2 * r, 2 * r));
+ int r = min(minimumValueForLength(radius, width), minimumValueForLength(radius, height));
+ path.addEllipse(FloatRect(minimumValueForLength(m_coords[0], width) - r, minimumValueForLength(m_coords[1], height) - r, 2 * r, 2 * r));
}
break;
case Rect:
if (m_coords.size() >= 4) {
- int x0 = minimumValueForLength(m_coords[0], width, renderView);
- int y0 = minimumValueForLength(m_coords[1], height, renderView);
- int x1 = minimumValueForLength(m_coords[2], width, renderView);
- int y1 = minimumValueForLength(m_coords[3], height, renderView);
+ int x0 = minimumValueForLength(m_coords[0], width);
+ int y0 = minimumValueForLength(m_coords[1], height);
+ int x1 = minimumValueForLength(m_coords[2], width);
+ int y1 = minimumValueForLength(m_coords[3], height);
path.addRect(FloatRect(x0, y0, x1 - x0, y1 - y0));
}
break;
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/html/HTMLMetaElement-in.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698