Chromium Code Reviews| 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 2997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3008 | 3008 |
| 3009 ASSERT(!node()); | 3009 ASSERT(!node()); |
| 3010 return createPositionWithAffinity(0, DOWNSTREAM); | 3010 return createPositionWithAffinity(0, DOWNSTREAM); |
| 3011 } | 3011 } |
| 3012 | 3012 |
| 3013 CursorDirective LayoutObject::getCursor(const LayoutPoint&, Cursor&) const | 3013 CursorDirective LayoutObject::getCursor(const LayoutPoint&, Cursor&) const |
| 3014 { | 3014 { |
| 3015 return SetCursorBasedOnStyle; | 3015 return SetCursorBasedOnStyle; |
| 3016 } | 3016 } |
| 3017 | 3017 |
| 3018 void LayoutObject::setSelectionState(SelectionState state) | |
| 3019 { | |
| 3020 if (selectionState() == state) | |
| 3021 return; | |
| 3022 | |
| 3023 m_bitfields.setSelectionState(state); | |
| 3024 invalidateDisplayItemClient(DisplayItemClientData(*this)); | |
|
Xianzhu
2015/03/18 16:10:07
Alternative way is to call 'if slimmingPaintEnable
| |
| 3025 } | |
| 3026 | |
| 3027 | |
| 3018 bool LayoutObject::canUpdateSelectionOnRootLineBoxes() const | 3028 bool LayoutObject::canUpdateSelectionOnRootLineBoxes() const |
| 3019 { | 3029 { |
| 3020 if (needsLayout()) | 3030 if (needsLayout()) |
| 3021 return false; | 3031 return false; |
| 3022 | 3032 |
| 3023 const LayoutBlock* containingBlock = this->containingBlock(); | 3033 const LayoutBlock* containingBlock = this->containingBlock(); |
| 3024 return containingBlock ? !containingBlock->needsLayout() : false; | 3034 return containingBlock ? !containingBlock->needsLayout() : false; |
| 3025 } | 3035 } |
| 3026 | 3036 |
| 3027 // We only create "generated" child renderers like one for first-letter if: | 3037 // We only create "generated" child renderers like one for first-letter if: |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3218 { | 3228 { |
| 3219 if (object1) { | 3229 if (object1) { |
| 3220 const blink::LayoutObject* root = object1; | 3230 const blink::LayoutObject* root = object1; |
| 3221 while (root->parent()) | 3231 while (root->parent()) |
| 3222 root = root->parent(); | 3232 root = root->parent(); |
| 3223 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3233 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3224 } | 3234 } |
| 3225 } | 3235 } |
| 3226 | 3236 |
| 3227 #endif | 3237 #endif |
| OLD | NEW |