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 |
11 * modify it under the terms of the GNU Library General Public | 11 * modify it under the terms of the GNU Library General Public |
12 * License as published by the Free Software Foundation; either | 12 * License as published by the Free Software Foundation; either |
13 * version 2 of the License, or (at your option) any later version. | 13 * version 2 of the License, or (at your option) any later version. |
14 * | 14 * |
15 * This library is distributed in the hope that it will be useful, | 15 * This library is distributed in the hope that it will be useful, |
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
18 * Library General Public License for more details. | 18 * Library General Public License for more details. |
19 * | 19 * |
20 * You should have received a copy of the GNU Library General Public License | 20 * You should have received a copy of the GNU Library General Public License |
21 * along with this library; see the file COPYING.LIB. If not, write to | 21 * along with this library; see the file COPYING.LIB. If not, write to |
22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 22 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
23 * Boston, MA 02110-1301, USA. | 23 * Boston, MA 02110-1301, USA. |
24 * | 24 * |
25 */ | 25 */ |
26 | 26 |
27 #include "core/layout/LayoutObject.h" | 27 #include "core/layout/LayoutObject.h" |
28 | 28 |
29 #include "core/HTMLNames.h" | 29 #include "core/HTMLNames.h" |
| 30 #include "core/animation/ElementAnimations.h" |
30 #include "core/css/resolver/StyleResolver.h" | 31 #include "core/css/resolver/StyleResolver.h" |
31 #include "core/dom/AXObjectCache.h" | 32 #include "core/dom/AXObjectCache.h" |
32 #include "core/dom/ElementTraversal.h" | 33 #include "core/dom/ElementTraversal.h" |
33 #include "core/dom/StyleChangeReason.h" | 34 #include "core/dom/StyleChangeReason.h" |
34 #include "core/dom/StyleEngine.h" | 35 #include "core/dom/StyleEngine.h" |
35 #include "core/dom/shadow/ShadowRoot.h" | 36 #include "core/dom/shadow/ShadowRoot.h" |
36 #include "core/editing/EditingBoundary.h" | 37 #include "core/editing/EditingBoundary.h" |
37 #include "core/editing/EditingUtilities.h" | 38 #include "core/editing/EditingUtilities.h" |
38 #include "core/editing/FrameSelection.h" | 39 #include "core/editing/FrameSelection.h" |
39 #include "core/editing/TextAffinity.h" | 40 #include "core/editing/TextAffinity.h" |
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2065 TouchAction oldTouchAction = m_style ? m_style->getTouchAction() : TouchActi
onAuto; | 2066 TouchAction oldTouchAction = m_style ? m_style->getTouchAction() : TouchActi
onAuto; |
2066 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.getTouchAction() == TouchActionAuto)) { | 2067 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.getTouchAction() == TouchActionAuto)) { |
2067 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); | 2068 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); |
2068 if (newStyle.getTouchAction() != TouchActionAuto) | 2069 if (newStyle.getTouchAction() != TouchActionAuto) |
2069 registry.didAddEventHandler(*node(), EventHandlerRegistry::TouchEven
tBlocking); | 2070 registry.didAddEventHandler(*node(), EventHandlerRegistry::TouchEven
tBlocking); |
2070 else | 2071 else |
2071 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE
ventBlocking); | 2072 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE
ventBlocking); |
2072 } | 2073 } |
2073 } | 2074 } |
2074 | 2075 |
| 2076 void LayoutObject::clearBaseComputedStyle() |
| 2077 { |
| 2078 if (!node()) |
| 2079 return; |
| 2080 if (!node()->isElementNode()) |
| 2081 return; |
| 2082 if (ElementAnimations* animations = toElement(node())->elementAnimations()) |
| 2083 animations->clearBaseComputedStyle(); |
| 2084 } |
| 2085 |
2075 static bool areNonIdenticalCursorListsEqual(const ComputedStyle* a, const Comput
edStyle* b) | 2086 static bool areNonIdenticalCursorListsEqual(const ComputedStyle* a, const Comput
edStyle* b) |
2076 { | 2087 { |
2077 ASSERT(a->cursors() != b->cursors()); | 2088 ASSERT(a->cursors() != b->cursors()); |
2078 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors(); | 2089 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors(); |
2079 } | 2090 } |
2080 | 2091 |
2081 static inline bool areCursorsEqual(const ComputedStyle* a, const ComputedStyle*
b) | 2092 static inline bool areCursorsEqual(const ComputedStyle* a, const ComputedStyle*
b) |
2082 { | 2093 { |
2083 return a->cursor() == b->cursor() && (a->cursors() == b->cursors() || areNon
IdenticalCursorListsEqual(a, b)); | 2094 return a->cursor() == b->cursor() && (a->cursors() == b->cursors() || areNon
IdenticalCursorListsEqual(a, b)); |
2084 } | 2095 } |
(...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3727 const blink::LayoutObject* root = object1; | 3738 const blink::LayoutObject* root = object1; |
3728 while (root->parent()) | 3739 while (root->parent()) |
3729 root = root->parent(); | 3740 root = root->parent(); |
3730 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3741 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3731 } else { | 3742 } else { |
3732 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3743 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3733 } | 3744 } |
3734 } | 3745 } |
3735 | 3746 |
3736 #endif | 3747 #endif |
OLD | NEW |