OLD | NEW |
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 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1369 { | 1369 { |
1370 if (!has3DRendering) | 1370 if (!has3DRendering) |
1371 matrix.makeAffine(); | 1371 matrix.makeAffine(); |
1372 } | 1372 } |
1373 | 1373 |
1374 inline int adjustForAbsoluteZoom(int value, RenderObject* renderer) | 1374 inline int adjustForAbsoluteZoom(int value, RenderObject* renderer) |
1375 { | 1375 { |
1376 return adjustForAbsoluteZoom(value, renderer->style()); | 1376 return adjustForAbsoluteZoom(value, renderer->style()); |
1377 } | 1377 } |
1378 | 1378 |
1379 inline LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit value, RenderObject
* renderer) | 1379 inline LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit value, RenderObject
& renderer) |
1380 { | 1380 { |
1381 return adjustLayoutUnitForAbsoluteZoom(value, renderer->style()); | 1381 ASSERT(renderer.style()); |
| 1382 return adjustLayoutUnitForAbsoluteZoom(value, *renderer.style()); |
1382 } | 1383 } |
1383 | 1384 |
1384 inline void adjustFloatQuadForAbsoluteZoom(FloatQuad& quad, RenderObject* render
er) | 1385 inline void adjustFloatQuadForAbsoluteZoom(FloatQuad& quad, RenderObject& render
er) |
1385 { | 1386 { |
1386 float zoom = renderer->style()->effectiveZoom(); | 1387 float zoom = renderer.style()->effectiveZoom(); |
1387 if (zoom != 1) | 1388 if (zoom != 1) |
1388 quad.scale(1 / zoom, 1 / zoom); | 1389 quad.scale(1 / zoom, 1 / zoom); |
1389 } | 1390 } |
1390 | 1391 |
1391 inline void adjustFloatRectForAbsoluteZoom(FloatRect& rect, RenderObject* render
er) | 1392 inline void adjustFloatRectForAbsoluteZoom(FloatRect& rect, RenderObject& render
er) |
1392 { | 1393 { |
1393 float zoom = renderer->style()->effectiveZoom(); | 1394 float zoom = renderer.style()->effectiveZoom(); |
1394 if (zoom != 1) | 1395 if (zoom != 1) |
1395 rect.scale(1 / zoom, 1 / zoom); | 1396 rect.scale(1 / zoom, 1 / zoom); |
1396 } | 1397 } |
1397 | 1398 |
1398 #define DEFINE_RENDER_OBJECT_TYPE_CASTS(thisType, predicate) \ | 1399 #define DEFINE_RENDER_OBJECT_TYPE_CASTS(thisType, predicate) \ |
1399 DEFINE_TYPE_CASTS(thisType, RenderObject, object, object->predicate, object.
predicate) | 1400 DEFINE_TYPE_CASTS(thisType, RenderObject, object, object->predicate, object.
predicate) |
1400 | 1401 |
1401 } // namespace WebCore | 1402 } // namespace WebCore |
1402 | 1403 |
1403 #ifndef NDEBUG | 1404 #ifndef NDEBUG |
1404 // Outside the WebCore namespace for ease of invocation from gdb. | 1405 // Outside the WebCore namespace for ease of invocation from gdb. |
1405 void showTree(const WebCore::RenderObject*); | 1406 void showTree(const WebCore::RenderObject*); |
1406 void showLineTree(const WebCore::RenderObject*); | 1407 void showLineTree(const WebCore::RenderObject*); |
1407 void showRenderTree(const WebCore::RenderObject* object1); | 1408 void showRenderTree(const WebCore::RenderObject* object1); |
1408 // We don't make object2 an optional parameter so that showRenderTree | 1409 // We don't make object2 an optional parameter so that showRenderTree |
1409 // can be called from gdb easily. | 1410 // can be called from gdb easily. |
1410 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1411 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
1411 | 1412 |
1412 #endif | 1413 #endif |
1413 | 1414 |
1414 #endif // RenderObject_h | 1415 #endif // RenderObject_h |
OLD | NEW |