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

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

Issue 383153007: Fixes for re-enabling more MSVC level 4 warnings: Source/core/ edition (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comments Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/FrameTree.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 } 493 }
494 } 494 }
495 495
496 static LayoutRect rectToAbsoluteCoordinates(LocalFrame* initialFrame, const Layo utRect& initialRect) 496 static LayoutRect rectToAbsoluteCoordinates(LocalFrame* initialFrame, const Layo utRect& initialRect)
497 { 497 {
498 LayoutRect rect = initialRect; 498 LayoutRect rect = initialRect;
499 for (Frame* frame = initialFrame; frame; frame = frame->tree().parent()) { 499 for (Frame* frame = initialFrame; frame; frame = frame->tree().parent()) {
500 if (!frame->isLocalFrame()) 500 if (!frame->isLocalFrame())
501 continue; 501 continue;
502 // FIXME: Spatial navigation is broken for OOPI. 502 // FIXME: Spatial navigation is broken for OOPI.
503 if (Element* element = frame->deprecatedLocalOwner()) { 503 Element* element = frame->deprecatedLocalOwner();
504 do { 504 if (element) {
505 for (; element; element = element->offsetParent())
505 rect.move(element->offsetLeft(), element->offsetTop()); 506 rect.move(element->offsetLeft(), element->offsetTop());
506 } while ((element = element->offsetParent()));
507 rect.move((-toLocalFrame(frame)->view()->scrollOffset())); 507 rect.move((-toLocalFrame(frame)->view()->scrollOffset()));
508 } 508 }
509 } 509 }
510 return rect; 510 return rect;
511 } 511 }
512 512
513 LayoutRect nodeRectInAbsoluteCoordinates(Node* node, bool ignoreBorder) 513 LayoutRect nodeRectInAbsoluteCoordinates(Node* node, bool ignoreBorder)
514 { 514 {
515 ASSERT(node && node->renderer() && !node->document().view()->needsLayout()); 515 ASSERT(node && node->renderer() && !node->document().view()->needsLayout());
516 516
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 LayoutRect rect = virtualRectForDirection(type, rectToAbsoluteCoordinates(ar ea.document().frame(), area.computeRect(area.imageElement()->renderer())), 1); 747 LayoutRect rect = virtualRectForDirection(type, rectToAbsoluteCoordinates(ar ea.document().frame(), area.computeRect(area.imageElement()->renderer())), 1);
748 return rect; 748 return rect;
749 } 749 }
750 750
751 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) 751 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate)
752 { 752 {
753 return candidate.isFrameOwnerElement() ? toHTMLFrameOwnerElement(candidate.v isibleNode) : 0; 753 return candidate.isFrameOwnerElement() ? toHTMLFrameOwnerElement(candidate.v isibleNode) : 0;
754 }; 754 };
755 755
756 } // namespace WebCore 756 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/FrameTree.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698