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

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

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/PrintContext.cpp ('k') | Source/core/page/TouchAdjustment.cpp » ('j') | 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 containerViewportRect.setY(containerViewportRect.y() - ScrollableArea::p ixelsPerLineStep()); 172 containerViewportRect.setY(containerViewportRect.y() - ScrollableArea::p ixelsPerLineStep());
173 containerViewportRect.setHeight(containerViewportRect.height() + Scrolla bleArea::pixelsPerLineStep()); 173 containerViewportRect.setHeight(containerViewportRect.height() + Scrolla bleArea::pixelsPerLineStep());
174 break; 174 break;
175 case WebFocusTypeDown: 175 case WebFocusTypeDown:
176 containerViewportRect.setHeight(containerViewportRect.height() + Scrolla bleArea::pixelsPerLineStep()); 176 containerViewportRect.setHeight(containerViewportRect.height() + Scrolla bleArea::pixelsPerLineStep());
177 break; 177 break;
178 default: 178 default:
179 break; 179 break;
180 } 180 }
181 181
182 RenderObject* render = node->renderer(); 182 LayoutObject* render = node->renderer();
183 if (!render) 183 if (!render)
184 return true; 184 return true;
185 185
186 LayoutRect rect(render->absoluteClippedOverflowRect()); 186 LayoutRect rect(render->absoluteClippedOverflowRect());
187 if (rect.isEmpty()) 187 if (rect.isEmpty())
188 return true; 188 return true;
189 189
190 return !containerViewportRect.intersects(rect); 190 return !containerViewportRect.intersects(rect);
191 } 191 }
192 192
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 b.inflate(deflateFactor); 275 b.inflate(deflateFactor);
276 } 276 }
277 277
278 bool isScrollableNode(const Node* node) 278 bool isScrollableNode(const Node* node)
279 { 279 {
280 ASSERT(!node->isDocumentNode()); 280 ASSERT(!node->isDocumentNode());
281 281
282 if (!node) 282 if (!node)
283 return false; 283 return false;
284 284
285 if (RenderObject* renderer = node->renderer()) 285 if (LayoutObject* renderer = node->renderer())
286 return renderer->isBox() && toRenderBox(renderer)->canBeScrolledAndHasSc rollableArea() && node->hasChildren(); 286 return renderer->isBox() && toRenderBox(renderer)->canBeScrolledAndHasSc rollableArea() && node->hasChildren();
287 287
288 return false; 288 return false;
289 } 289 }
290 290
291 Node* scrollableEnclosingBoxOrParentFrameForNodeInDirection(WebFocusType type, N ode* node) 291 Node* scrollableEnclosingBoxOrParentFrameForNodeInDirection(WebFocusType type, N ode* node)
292 { 292 {
293 ASSERT(node); 293 ASSERT(node);
294 Node* parent = node; 294 Node* parent = node;
295 do { 295 do {
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 LayoutRect rect = virtualRectForDirection(type, rectToAbsoluteCoordinates(ar ea.document().frame(), area.computeRect(area.imageElement()->renderer())), 1); 622 LayoutRect rect = virtualRectForDirection(type, rectToAbsoluteCoordinates(ar ea.document().frame(), area.computeRect(area.imageElement()->renderer())), 1);
623 return rect; 623 return rect;
624 } 624 }
625 625
626 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate) 626 HTMLFrameOwnerElement* frameOwnerElement(FocusCandidate& candidate)
627 { 627 {
628 return candidate.isFrameOwnerElement() ? toHTMLFrameOwnerElement(candidate.v isibleNode) : nullptr; 628 return candidate.isFrameOwnerElement() ? toHTMLFrameOwnerElement(candidate.v isibleNode) : nullptr;
629 }; 629 };
630 630
631 } // namespace blink 631 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/page/PrintContext.cpp ('k') | Source/core/page/TouchAdjustment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698