OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 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) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 3298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3309 } | 3309 } |
3310 | 3310 |
3311 bool RenderObject::isInert() const | 3311 bool RenderObject::isInert() const |
3312 { | 3312 { |
3313 const RenderObject* renderer = this; | 3313 const RenderObject* renderer = this; |
3314 while (!renderer->node()) | 3314 while (!renderer->node()) |
3315 renderer = renderer->parent(); | 3315 renderer = renderer->parent(); |
3316 return renderer->node()->isInert(); | 3316 return renderer->node()->isInert(); |
3317 } | 3317 } |
3318 | 3318 |
3319 // touch-action applies to all elements with both width AND height properties. | |
Rick Byers
2014/06/11 12:52:01
We need to keep this logic (and comment) somewhere
| |
3320 // According to the CSS Box Model Spec (http://dev.w3.org/csswg/css-box/#the-wid th-and-height-properties) | |
3321 // width applies to all elements but non-replaced inline elements, table rows, a nd row groups and | |
3322 // height applies to all elements but non-replaced inline elements, table column s, and column groups. | |
3323 bool RenderObject::visibleForTouchAction() const | |
3324 { | |
3325 if (isInline() && !isReplaced()) | |
3326 return false; | |
3327 if (isTableRow() || isRenderTableCol()) | |
3328 return false; | |
3329 | |
3330 return true; | |
3331 } | |
3332 | |
3333 void RenderObject::imageChanged(ImageResource* image, const IntRect* rect) | 3319 void RenderObject::imageChanged(ImageResource* image, const IntRect* rect) |
3334 { | 3320 { |
3335 imageChanged(static_cast<WrappedImagePtr>(image), rect); | 3321 imageChanged(static_cast<WrappedImagePtr>(image), rect); |
3336 } | 3322 } |
3337 | 3323 |
3338 Element* RenderObject::offsetParent() const | 3324 Element* RenderObject::offsetParent() const |
3339 { | 3325 { |
3340 if (isDocumentElement() || isBody()) | 3326 if (isDocumentElement() || isBody()) |
3341 return 0; | 3327 return 0; |
3342 | 3328 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3560 { | 3546 { |
3561 if (object1) { | 3547 if (object1) { |
3562 const WebCore::RenderObject* root = object1; | 3548 const WebCore::RenderObject* root = object1; |
3563 while (root->parent()) | 3549 while (root->parent()) |
3564 root = root->parent(); | 3550 root = root->parent(); |
3565 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3551 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3566 } | 3552 } |
3567 } | 3553 } |
3568 | 3554 |
3569 #endif | 3555 #endif |
OLD | NEW |