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

Side by Side Diff: Source/core/rendering/RenderObject.h

Issue 33983003: Introduce DEFINE_RENDER_OBJECT_TYPE_CASTS to replace manual toRenderFoo, and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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
« no previous file with comments | « Source/core/rendering/RenderNamedFlowThread.h ('k') | Source/core/rendering/RenderPart.h » ('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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 quad.scale(1 / zoom, 1 / zoom); 1376 quad.scale(1 / zoom, 1 / zoom);
1377 } 1377 }
1378 1378
1379 inline void adjustFloatRectForAbsoluteZoom(FloatRect& rect, RenderObject* render er) 1379 inline void adjustFloatRectForAbsoluteZoom(FloatRect& rect, RenderObject* render er)
1380 { 1380 {
1381 float zoom = renderer->style()->effectiveZoom(); 1381 float zoom = renderer->style()->effectiveZoom();
1382 if (zoom != 1) 1382 if (zoom != 1)
1383 rect.scale(1 / zoom, 1 / zoom); 1383 rect.scale(1 / zoom, 1 / zoom);
1384 } 1384 }
1385 1385
1386 #define DEFINE_RENDER_OBJECT_TYPE_CASTS(thisType, predicate) \
1387 DEFINE_TYPE_CASTS(thisType, RenderObject, object, object->predicate, object. predicate)
1388
1386 } // namespace WebCore 1389 } // namespace WebCore
1387 1390
1388 #ifndef NDEBUG 1391 #ifndef NDEBUG
1389 // Outside the WebCore namespace for ease of invocation from gdb. 1392 // Outside the WebCore namespace for ease of invocation from gdb.
1390 void showTree(const WebCore::RenderObject*); 1393 void showTree(const WebCore::RenderObject*);
1391 void showLineTree(const WebCore::RenderObject*); 1394 void showLineTree(const WebCore::RenderObject*);
1392 void showRenderTree(const WebCore::RenderObject* object1); 1395 void showRenderTree(const WebCore::RenderObject* object1);
1393 // We don't make object2 an optional parameter so that showRenderTree 1396 // We don't make object2 an optional parameter so that showRenderTree
1394 // can be called from gdb easily. 1397 // can be called from gdb easily.
1395 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); 1398 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2);
1396 1399
1397 #endif 1400 #endif
1398 1401
1399 #endif // RenderObject_h 1402 #endif // RenderObject_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderNamedFlowThread.h ('k') | Source/core/rendering/RenderPart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698