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 2576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2587 void LayoutObject::removeShapeImageClient(ShapeValue* shapeValue) | 2587 void LayoutObject::removeShapeImageClient(ShapeValue* shapeValue) |
2588 { | 2588 { |
2589 if (!shapeValue) | 2589 if (!shapeValue) |
2590 return; | 2590 return; |
2591 if (StyleImage* shapeImage = shapeValue->image()) | 2591 if (StyleImage* shapeImage = shapeValue->image()) |
2592 shapeImage->removeClient(this); | 2592 shapeImage->removeClient(this); |
2593 } | 2593 } |
2594 | 2594 |
2595 PositionWithAffinity LayoutObject::positionForPoint(const LayoutPoint&) | 2595 PositionWithAffinity LayoutObject::positionForPoint(const LayoutPoint&) |
2596 { | 2596 { |
2597 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); | 2597 return createPositionWithAffinity(caretMinOffset()); |
2598 } | 2598 } |
2599 | 2599 |
2600 void LayoutObject::updateDragState(bool dragOn) | 2600 void LayoutObject::updateDragState(bool dragOn) |
2601 { | 2601 { |
2602 bool valueChanged = (dragOn != isDragging()); | 2602 bool valueChanged = (dragOn != isDragging()); |
2603 setIsDragging(dragOn); | 2603 setIsDragging(dragOn); |
2604 if (valueChanged && node()) { | 2604 if (valueChanged && node()) { |
2605 if (node()->isElementNode() && toElement(node())->childrenOrSiblingsAffe
ctedByDrag()) | 2605 if (node()->isElementNode() && toElement(node())->childrenOrSiblingsAffe
ctedByDrag()) |
2606 node()->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonFor
Tracing::create(StyleChangeReason::Drag)); | 2606 node()->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonFor
Tracing::create(StyleChangeReason::Drag)); |
2607 else if (style()->affectedByDrag()) | 2607 else if (style()->affectedByDrag()) |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3029 return PositionWithAffinity(firstPositionInOrBeforeNode(node), DOWNS
TREAM); | 3029 return PositionWithAffinity(firstPositionInOrBeforeNode(node), DOWNS
TREAM); |
3030 | 3030 |
3031 // Repeat at the next level up. | 3031 // Repeat at the next level up. |
3032 child = parent; | 3032 child = parent; |
3033 } | 3033 } |
3034 | 3034 |
3035 // Everything was anonymous. Give up. | 3035 // Everything was anonymous. Give up. |
3036 return PositionWithAffinity(); | 3036 return PositionWithAffinity(); |
3037 } | 3037 } |
3038 | 3038 |
| 3039 PositionWithAffinity LayoutObject::createPositionWithAffinity(int offset) |
| 3040 { |
| 3041 return createPositionWithAffinity(offset, DOWNSTREAM); |
| 3042 } |
| 3043 |
3039 PositionWithAffinity LayoutObject::createPositionWithAffinity(const Position& po
sition) | 3044 PositionWithAffinity LayoutObject::createPositionWithAffinity(const Position& po
sition) |
3040 { | 3045 { |
3041 if (position.isNotNull()) | 3046 if (position.isNotNull()) |
3042 return PositionWithAffinity(position); | 3047 return PositionWithAffinity(position); |
3043 | 3048 |
3044 ASSERT(!node()); | 3049 ASSERT(!node()); |
3045 return createPositionWithAffinity(0, DOWNSTREAM); | 3050 return createPositionWithAffinity(0); |
3046 } | 3051 } |
3047 | 3052 |
3048 CursorDirective LayoutObject::getCursor(const LayoutPoint&, Cursor&) const | 3053 CursorDirective LayoutObject::getCursor(const LayoutPoint&, Cursor&) const |
3049 { | 3054 { |
3050 return SetCursorBasedOnStyle; | 3055 return SetCursorBasedOnStyle; |
3051 } | 3056 } |
3052 | 3057 |
3053 bool LayoutObject::canUpdateSelectionOnRootLineBoxes() const | 3058 bool LayoutObject::canUpdateSelectionOnRootLineBoxes() const |
3054 { | 3059 { |
3055 if (needsLayout()) | 3060 if (needsLayout()) |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3397 const blink::LayoutObject* root = object1; | 3402 const blink::LayoutObject* root = object1; |
3398 while (root->parent()) | 3403 while (root->parent()) |
3399 root = root->parent(); | 3404 root = root->parent(); |
3400 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3405 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3401 } else { | 3406 } else { |
3402 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3407 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3403 } | 3408 } |
3404 } | 3409 } |
3405 | 3410 |
3406 #endif | 3411 #endif |
OLD | NEW |