OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 #include "core/page/FocusController.h" | 58 #include "core/page/FocusController.h" |
59 #include "core/page/FrameTree.h" | 59 #include "core/page/FrameTree.h" |
60 #include "core/frame/FrameView.h" | 60 #include "core/frame/FrameView.h" |
61 #include "core/page/Page.h" | 61 #include "core/page/Page.h" |
62 #include "core/frame/Settings.h" | 62 #include "core/frame/Settings.h" |
63 #include "core/page/SpatialNavigation.h" | 63 #include "core/page/SpatialNavigation.h" |
64 #include "core/rendering/HitTestRequest.h" | 64 #include "core/rendering/HitTestRequest.h" |
65 #include "core/rendering/HitTestResult.h" | 65 #include "core/rendering/HitTestResult.h" |
66 #include "core/rendering/InlineTextBox.h" | 66 #include "core/rendering/InlineTextBox.h" |
67 #include "core/rendering/RenderLayer.h" | 67 #include "core/rendering/RenderLayer.h" |
| 68 #include "core/rendering/RenderPart.h" |
68 #include "core/rendering/RenderText.h" | 69 #include "core/rendering/RenderText.h" |
69 #include "core/rendering/RenderTheme.h" | 70 #include "core/rendering/RenderTheme.h" |
70 #include "core/rendering/RenderView.h" | 71 #include "core/rendering/RenderView.h" |
71 #include "core/rendering/RenderWidget.h" | |
72 #include "platform/SecureTextInput.h" | 72 #include "platform/SecureTextInput.h" |
73 #include "platform/geometry/FloatQuad.h" | 73 #include "platform/geometry/FloatQuad.h" |
74 #include "platform/graphics/GraphicsContext.h" | 74 #include "platform/graphics/GraphicsContext.h" |
75 #include "wtf/text/CString.h" | 75 #include "wtf/text/CString.h" |
76 #include <stdio.h> | 76 #include <stdio.h> |
77 | 77 |
78 #define EDIT_DEBUG 0 | 78 #define EDIT_DEBUG 0 |
79 | 79 |
80 namespace blink { | 80 namespace blink { |
81 | 81 |
(...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1652 textControl->selectionChanged(userTriggered == UserTriggered); | 1652 textControl->selectionChanged(userTriggered == UserTriggered); |
1653 } | 1653 } |
1654 | 1654 |
1655 // Helper function that tells whether a particular node is an element that has a
n entire | 1655 // Helper function that tells whether a particular node is an element that has a
n entire |
1656 // LocalFrame and FrameView, a <frame>, <iframe>, or <object>. | 1656 // LocalFrame and FrameView, a <frame>, <iframe>, or <object>. |
1657 static bool isFrameElement(const Node* n) | 1657 static bool isFrameElement(const Node* n) |
1658 { | 1658 { |
1659 if (!n) | 1659 if (!n) |
1660 return false; | 1660 return false; |
1661 RenderObject* renderer = n->renderer(); | 1661 RenderObject* renderer = n->renderer(); |
1662 if (!renderer || !renderer->isWidget()) | 1662 if (!renderer || !renderer->isRenderPart()) |
1663 return false; | 1663 return false; |
1664 Widget* widget = toRenderWidget(renderer)->widget(); | 1664 Widget* widget = toRenderPart(renderer)->widget(); |
1665 return widget && widget->isFrameView(); | 1665 return widget && widget->isFrameView(); |
1666 } | 1666 } |
1667 | 1667 |
1668 void FrameSelection::setFocusedNodeIfNeeded() | 1668 void FrameSelection::setFocusedNodeIfNeeded() |
1669 { | 1669 { |
1670 if (isNone() || !isFocused()) | 1670 if (isNone() || !isFocused()) |
1671 return; | 1671 return; |
1672 | 1672 |
1673 bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsi
ngEnabled(); | 1673 bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsi
ngEnabled(); |
1674 if (caretBrowsing) { | 1674 if (caretBrowsing) { |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1932 sel.showTreeForThis(); | 1932 sel.showTreeForThis(); |
1933 } | 1933 } |
1934 | 1934 |
1935 void showTree(const blink::FrameSelection* sel) | 1935 void showTree(const blink::FrameSelection* sel) |
1936 { | 1936 { |
1937 if (sel) | 1937 if (sel) |
1938 sel->showTreeForThis(); | 1938 sel->showTreeForThis(); |
1939 } | 1939 } |
1940 | 1940 |
1941 #endif | 1941 #endif |
OLD | NEW |