| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
| 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
| 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| 11 * | 11 * |
| 12 * This library is distributed in the hope that it will be useful, | 12 * This library is distributed in the hope that it will be useful, |
| 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 * Library General Public License for more details. | 15 * Library General Public License for more details. |
| 16 * | 16 * |
| 17 * You should have received a copy of the GNU Library General Public License | 17 * You should have received a copy of the GNU Library General Public License |
| 18 * along with this library; see the file COPYING.LIB. If not, write to | 18 * along with this library; see the file COPYING.LIB. If not, write to |
| 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 20 * Boston, MA 02110-1301, USA. | 20 * Boston, MA 02110-1301, USA. |
| 21 * | 21 * |
| 22 */ | 22 */ |
| 23 | 23 |
| 24 #include "core/layout/LayoutFrame.h" | 24 #include "core/layout/LayoutFrame.h" |
| 25 | 25 |
| 26 #include "core/frame/FrameView.h" | 26 #include "core/frame/FrameView.h" |
| 27 #include "core/frame/LocalFrame.h" |
| 27 #include "core/html/HTMLFrameElement.h" | 28 #include "core/html/HTMLFrameElement.h" |
| 29 #include "core/input/EventHandler.h" |
| 30 #include "core/style/CursorData.h" |
| 28 | 31 |
| 29 namespace blink { | 32 namespace blink { |
| 30 | 33 |
| 31 LayoutFrame::LayoutFrame(HTMLFrameElement* frame) | 34 LayoutFrame::LayoutFrame(HTMLFrameElement* frame) |
| 32 : LayoutPart(frame) | 35 : LayoutPart(frame) |
| 33 { | 36 { |
| 34 setInline(false); | 37 setInline(false); |
| 35 } | 38 } |
| 36 | 39 |
| 37 FrameEdgeInfo LayoutFrame::edgeInfo() const | 40 FrameEdgeInfo LayoutFrame::edgeInfo() const |
| 38 { | 41 { |
| 39 HTMLFrameElement* element = toHTMLFrameElement(node()); | 42 HTMLFrameElement* element = toHTMLFrameElement(node()); |
| 40 return FrameEdgeInfo(element->noResize(), element->hasFrameBorder()); | 43 return FrameEdgeInfo(element->noResize(), element->hasFrameBorder()); |
| 41 } | 44 } |
| 42 | 45 |
| 46 void LayoutFrame::imageChanged(WrappedImagePtr image, const IntRect*) |
| 47 { |
| 48 if (const CursorList* cursors = style()->cursors()) { |
| 49 for (const CursorData& cursor : *cursors) { |
| 50 if (cursor.image() && cursor.image()->cachedImage() == image) { |
| 51 if (LocalFrame* frame = this->frame()) { |
| 52 // Cursor update scheduling is done by the local root, which
is the main frame if there |
| 53 // are no RemoteFrame ancestors in the frame tree. Use of lo
calFrameRoot() is |
| 54 // discouraged but will change when cursor update scheduling
is moved from EventHandler |
| 55 // to PageEventHandler. |
| 56 frame->localFrameRoot()->eventHandler().scheduleCursorUpdate
(); |
| 57 } |
| 58 } |
| 59 } |
| 60 } |
| 61 } |
| 62 |
| 43 void LayoutFrame::updateFromElement() | 63 void LayoutFrame::updateFromElement() |
| 44 { | 64 { |
| 45 if (parent() && parent()->isFrameSet()) | 65 if (parent() && parent()->isFrameSet()) |
| 46 toLayoutFrameSet(parent())->notifyFrameEdgeInfoChanged(); | 66 toLayoutFrameSet(parent())->notifyFrameEdgeInfoChanged(); |
| 47 } | 67 } |
| 48 | 68 |
| 49 } // namespace blink | 69 } // namespace blink |
| OLD | NEW |