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

Side by Side Diff: third_party/WebKit/Source/core/page/SpatialNavigation.cpp

Issue 2640143005: Support subpixel layout for borders. (Closed)
Patch Set: Rebaselined tests. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) 2 * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
3 * Copyright (C) 2009 Antonio Gomes <tonikitoo@webkit.org> 3 * Copyright (C) 2009 Antonio Gomes <tonikitoo@webkit.org>
4 * 4 *
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 if (node->isDocumentNode()) 412 if (node->isDocumentNode())
413 return frameRectInAbsoluteCoordinates(toDocument(node)->frame()); 413 return frameRectInAbsoluteCoordinates(toDocument(node)->frame());
414 LayoutRect rect = 414 LayoutRect rect =
415 rectToAbsoluteCoordinates(node->document().frame(), node->boundingBox()); 415 rectToAbsoluteCoordinates(node->document().frame(), node->boundingBox());
416 416
417 // For authors that use border instead of outline in their CSS, we compensate 417 // For authors that use border instead of outline in their CSS, we compensate
418 // by ignoring the border when calculating the rect of the focused element. 418 // by ignoring the border when calculating the rect of the focused element.
419 if (ignoreBorder) { 419 if (ignoreBorder) {
420 rect.move(node->layoutObject()->style()->borderLeftWidth(), 420 rect.move(node->layoutObject()->style()->borderLeftWidth(),
421 node->layoutObject()->style()->borderTopWidth()); 421 node->layoutObject()->style()->borderTopWidth());
422 rect.setWidth(rect.width() - 422 rect.setWidth(LayoutUnit(
423 node->layoutObject()->style()->borderLeftWidth() - 423 rect.width() - node->layoutObject()->style()->borderLeftWidth() -
424 node->layoutObject()->style()->borderRightWidth()); 424 node->layoutObject()->style()->borderRightWidth()));
425 rect.setHeight(rect.height() - 425 rect.setHeight(LayoutUnit(
426 node->layoutObject()->style()->borderTopWidth() - 426 rect.height() - node->layoutObject()->style()->borderTopWidth() -
427 node->layoutObject()->style()->borderBottomWidth()); 427 node->layoutObject()->style()->borderBottomWidth()));
428 } 428 }
429 return rect; 429 return rect;
430 } 430 }
431 431
432 LayoutRect frameRectInAbsoluteCoordinates(LocalFrame* frame) { 432 LayoutRect frameRectInAbsoluteCoordinates(LocalFrame* frame) {
433 return rectToAbsoluteCoordinates( 433 return rectToAbsoluteCoordinates(
434 frame, LayoutRect(frame->view()->visibleContentRect())); 434 frame, LayoutRect(frame->view()->visibleContentRect()));
435 } 435 }
436 436
437 // This method calculates the exitPoint from the startingRect and the entryPoint 437 // This method calculates the exitPoint from the startingRect and the entryPoint
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 return rect; 683 return rect;
684 } 684 }
685 685
686 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) { 686 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) {
687 return candidate.isFrameOwnerElement() 687 return candidate.isFrameOwnerElement()
688 ? toHTMLFrameOwnerElement(candidate.visibleNode) 688 ? toHTMLFrameOwnerElement(candidate.visibleNode)
689 : nullptr; 689 : nullptr;
690 }; 690 };
691 691
692 } // namespace blink 692 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/InlineFlowBox.h ('k') | third_party/WebKit/Source/core/paint/BoxBorderPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698