| 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 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 showRenderObject(printedCharacters); | 1565 showRenderObject(printedCharacters); |
| 1566 | 1566 |
| 1567 for (const RenderObject* child = slowFirstChild(); child; child = child->nex
tSibling()) | 1567 for (const RenderObject* child = slowFirstChild(); child; child = child->nex
tSibling()) |
| 1568 child->showRenderTreeAndMark(markedObject1, markedLabel1, markedObject2,
markedLabel2, depth + 1); | 1568 child->showRenderTreeAndMark(markedObject1, markedLabel1, markedObject2,
markedLabel2, depth + 1); |
| 1569 } | 1569 } |
| 1570 | 1570 |
| 1571 #endif // NDEBUG | 1571 #endif // NDEBUG |
| 1572 | 1572 |
| 1573 bool RenderObject::isSelectable() const | 1573 bool RenderObject::isSelectable() const |
| 1574 { | 1574 { |
| 1575 return !isInert() && !(style()->userSelect() == SELECT_NONE && style()->user
Modify() == READ_ONLY); | 1575 return !(style()->userSelect() == SELECT_NONE && style()->userModify() == RE
AD_ONLY); |
| 1576 } | 1576 } |
| 1577 | 1577 |
| 1578 Color RenderObject::selectionBackgroundColor() const | 1578 Color RenderObject::selectionBackgroundColor() const |
| 1579 { | 1579 { |
| 1580 if (!isSelectable()) | 1580 if (!isSelectable()) |
| 1581 return Color::transparent; | 1581 return Color::transparent; |
| 1582 | 1582 |
| 1583 return frame()->selection().isFocusedAndActive() ? | 1583 return frame()->selection().isFocusedAndActive() ? |
| 1584 RenderTheme::theme().activeSelectionBackgroundColor() : | 1584 RenderTheme::theme().activeSelectionBackgroundColor() : |
| 1585 RenderTheme::theme().inactiveSelectionBackgroundColor(); | 1585 RenderTheme::theme().inactiveSelectionBackgroundColor(); |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2373 int RenderObject::previousOffsetForBackwardDeletion(int current) const | 2373 int RenderObject::previousOffsetForBackwardDeletion(int current) const |
| 2374 { | 2374 { |
| 2375 return current - 1; | 2375 return current - 1; |
| 2376 } | 2376 } |
| 2377 | 2377 |
| 2378 int RenderObject::nextOffset(int current) const | 2378 int RenderObject::nextOffset(int current) const |
| 2379 { | 2379 { |
| 2380 return current + 1; | 2380 return current + 1; |
| 2381 } | 2381 } |
| 2382 | 2382 |
| 2383 bool RenderObject::isInert() const | |
| 2384 { | |
| 2385 const RenderObject* renderer = this; | |
| 2386 while (!renderer->node()) | |
| 2387 renderer = renderer->parent(); | |
| 2388 return renderer->node()->isInert(); | |
| 2389 } | |
| 2390 | |
| 2391 // touch-action applies to all elements with both width AND height properties. | 2383 // touch-action applies to all elements with both width AND height properties. |
| 2392 // According to the CSS Box Model Spec (http://dev.w3.org/csswg/css-box/#the-wid
th-and-height-properties) | 2384 // According to the CSS Box Model Spec (http://dev.w3.org/csswg/css-box/#the-wid
th-and-height-properties) |
| 2393 // width applies to all elements but non-replaced inline elements, table rows, a
nd row groups and | 2385 // width applies to all elements but non-replaced inline elements, table rows, a
nd row groups and |
| 2394 // height applies to all elements but non-replaced inline elements, table column
s, and column groups. | 2386 // height applies to all elements but non-replaced inline elements, table column
s, and column groups. |
| 2395 bool RenderObject::supportsTouchAction() const | 2387 bool RenderObject::supportsTouchAction() const |
| 2396 { | 2388 { |
| 2397 if (isInline() && !isReplaced()) | 2389 if (isInline() && !isReplaced()) |
| 2398 return false; | 2390 return false; |
| 2399 return true; | 2391 return true; |
| 2400 } | 2392 } |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2572 { | 2564 { |
| 2573 if (object1) { | 2565 if (object1) { |
| 2574 const blink::RenderObject* root = object1; | 2566 const blink::RenderObject* root = object1; |
| 2575 while (root->parent()) | 2567 while (root->parent()) |
| 2576 root = root->parent(); | 2568 root = root->parent(); |
| 2577 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 2569 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 2578 } | 2570 } |
| 2579 } | 2571 } |
| 2580 | 2572 |
| 2581 #endif | 2573 #endif |
| OLD | NEW |