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

Unified Diff: third_party/WebKit/Source/core/page/SpatialNavigation.cpp

Issue 2640143005: Support subpixel layout for borders. (Closed)
Patch Set: Created 3 years, 11 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
Index: third_party/WebKit/Source/core/page/SpatialNavigation.cpp
diff --git a/third_party/WebKit/Source/core/page/SpatialNavigation.cpp b/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
index 63f72a1aefa3ef9ffd818cff6519274e99cef8ed..2a80c6c132cd96e603596f1a4df14c3809e6ccec 100644
--- a/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
+++ b/third_party/WebKit/Source/core/page/SpatialNavigation.cpp
@@ -419,12 +419,12 @@ LayoutRect nodeRectInAbsoluteCoordinates(Node* node, bool ignoreBorder) {
if (ignoreBorder) {
rect.move(node->layoutObject()->style()->borderLeftWidth(),
node->layoutObject()->style()->borderTopWidth());
- rect.setWidth(rect.width() -
- node->layoutObject()->style()->borderLeftWidth() -
- node->layoutObject()->style()->borderRightWidth());
- rect.setHeight(rect.height() -
- node->layoutObject()->style()->borderTopWidth() -
- node->layoutObject()->style()->borderBottomWidth());
+ rect.setWidth(LayoutUnit(
+ rect.width() - node->layoutObject()->style()->borderLeftWidth() -
+ node->layoutObject()->style()->borderRightWidth()));
+ rect.setHeight(LayoutUnit(
+ rect.height() - node->layoutObject()->style()->borderTopWidth() -
+ node->layoutObject()->style()->borderBottomWidth()));
}
return rect;
}

Powered by Google App Engine
This is Rietveld 408576698