Chromium Code Reviews| 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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 940 | 940 |
| 941 virtual void imageChanged(ImageResource*, const IntRect* = 0) OVERRIDE FINAL ; | 941 virtual void imageChanged(ImageResource*, const IntRect* = 0) OVERRIDE FINAL ; |
| 942 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) { } | 942 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) { } |
| 943 virtual bool willRenderImage(ImageResource*) OVERRIDE FINAL; | 943 virtual bool willRenderImage(ImageResource*) OVERRIDE FINAL; |
| 944 | 944 |
| 945 void selectionStartEnd(int& spos, int& epos) const; | 945 void selectionStartEnd(int& spos, int& epos) const; |
| 946 | 946 |
| 947 void remove() { if (parent()) parent()->removeChild(this); } | 947 void remove() { if (parent()) parent()->removeChild(this); } |
| 948 | 948 |
| 949 bool isInert() const; | 949 bool isInert() const; |
| 950 virtual bool visibleForTouchAction() const { return false; } | 950 |
| 951 // touch-action applies to all elements with both width AND height propertie s. | |
| 952 // According to the CSS Box Model Spec (http://dev.w3.org/csswg/css-box/#the -width-and-height-properties) | |
| 953 // width applies to all elements but non-replaced inline elements, table row s, and row groups and | |
| 954 // height applies to all elements but non-replaced inline elements, table co lumns, and column groups. | |
| 955 bool visibleForTouchAction() const | |
|
ojan
2014/04/09 22:20:13
This function body is long for a header file. Can
| |
| 956 { | |
| 957 if (isInline() && !isReplaced()) | |
|
ojan
2014/04/09 22:20:13
Makes me a little sad that we can't use inheritanc
| |
| 958 return false; | |
| 959 if (isTableRow() || isRenderTableCol()) | |
| 960 return false; | |
| 961 | |
| 962 return true; | |
| 963 } | |
| 964 | |
| 951 bool visibleToHitTestRequest(const HitTestRequest& request) const | 965 bool visibleToHitTestRequest(const HitTestRequest& request) const |
| 952 { | 966 { |
| 953 if (request.touchAction() && !visibleForTouchAction()) | 967 if (request.touchAction() && !visibleForTouchAction()) |
| 954 return false; | 968 return false; |
| 955 return style()->visibility() == VISIBLE && (request.ignorePointerEventsN one() || style()->pointerEvents() != PE_NONE) && !isInert(); | 969 return style()->visibility() == VISIBLE && (request.ignorePointerEventsN one() || style()->pointerEvents() != PE_NONE) && !isInert(); |
| 956 } | 970 } |
| 957 | 971 |
| 958 bool visibleToHitTesting() const { return style()->visibility() == VISIBLE & & style()->pointerEvents() != PE_NONE && !isInert(); } | 972 bool visibleToHitTesting() const { return style()->visibility() == VISIBLE & & style()->pointerEvents() != PE_NONE && !isInert(); } |
| 959 | 973 |
| 960 // Map points and quads through elements, potentially via 3d transforms. You should never need to call these directly; use | 974 // Map points and quads through elements, potentially via 3d transforms. You should never need to call these directly; use |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1444 void showTree(const WebCore::RenderObject*); | 1458 void showTree(const WebCore::RenderObject*); |
| 1445 void showLineTree(const WebCore::RenderObject*); | 1459 void showLineTree(const WebCore::RenderObject*); |
| 1446 void showRenderTree(const WebCore::RenderObject* object1); | 1460 void showRenderTree(const WebCore::RenderObject* object1); |
| 1447 // We don't make object2 an optional parameter so that showRenderTree | 1461 // We don't make object2 an optional parameter so that showRenderTree |
| 1448 // can be called from gdb easily. | 1462 // can be called from gdb easily. |
| 1449 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); | 1463 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); |
| 1450 | 1464 |
| 1451 #endif | 1465 #endif |
| 1452 | 1466 |
| 1453 #endif // RenderObject_h | 1467 #endif // RenderObject_h |
| OLD | NEW |