Changeset 14498 in webkit
- Timestamp:
- May 19, 2006 5:21:46 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r14495 r14498 1 2006-05-19 Levi Weintraub <lweintraub@apple.com> 2 3 Reviewed by justin. 4 5 Tests for <http://bugzilla.opendarwin.org/show_bug.cgi?id=8931> 6 Drag caret not painted for editable sub-frames 7 8 * editing/resources/select-and-drag-iframe.html: Added. 9 * editing/selection/drag-in-iframe-expected.checksum: Added. 10 * editing/selection/drag-in-iframe-expected.png: Added. 11 * editing/selection/drag-in-iframe-expected.txt: Added. 12 * editing/selection/drag-in-iframe.html: Added. 13 1 14 2006-05-17 Geoffrey Garen <ggaren@apple.com> 2 15 -
trunk/WebCore/ChangeLog
r14497 r14498 1 2006-05-19 Levi Weintraub <lweintraub@apple.com> 2 3 Reviewed by justin. 4 5 <http://bugzilla.opendarwin.org/show_bug.cgi?id=8931> 6 Drag caret not painted for editable sub-frames 7 8 Moved the drag caret out of Frame and into Page. 9 Only the Frame that contains the drag caret will paint it. 10 11 * editing/SelectionController.h: 12 * page/Frame.cpp: 13 (WebCore::Frame::dragCaret): 14 (WebCore::Frame::setDragCaret): 15 (WebCore::Frame::paintDragCaret): 16 * page/FramePrivate.h: 17 * page/Page.cpp: 18 (WebCore::Page::dragCaret): 19 (WebCore::Page::setDragCaret): 20 * page/Page.h: 21 1 22 2006-05-19 Alice Liu <alice.liu@apple.com> 2 23 -
trunk/WebCore/editing/SelectionController.h
r13889 r14498 105 105 106 106 void debugRenderer(RenderObject*, bool selected) const; 107 108 friend class Frame;109 107 110 108 Frame* frame() const; … … 150 148 //void clear(); 151 149 //TextRange *createRange(); 150 151 void needsCaretRepaint(); 152 void paintCaret(GraphicsContext*, const IntRect &rect); 152 153 153 154 #ifndef NDEBUG … … 165 166 166 167 void layout(); 167 void needsCaretRepaint();168 void paintCaret(GraphicsContext*, const IntRect &rect);169 168 IntRect caretRepaintRect() const; 170 169 -
trunk/WebCore/page/Frame.cpp
r14455 r14498 54 54 #include "MouseEventWithHitTestResults.h" 55 55 #include "NodeList.h" 56 #include "Page.h" 56 57 #include "Plugin.h" 57 58 #include "RenderCanvas.h" … … 1126 1127 SelectionController& Frame::dragCaret() const 1127 1128 { 1128 return d->m_ dragCaret;1129 return d->m_page->dragCaret(); 1129 1130 } 1130 1131 … … 1170 1171 void Frame::setDragCaret(const SelectionController& dragCaret) 1171 1172 { 1172 if (d->m_dragCaret != dragCaret) { 1173 d->m_dragCaret.needsCaretRepaint(); 1174 d->m_dragCaret = dragCaret; 1175 d->m_dragCaret.needsCaretRepaint(); 1176 } 1173 d->m_page->setDragCaret(dragCaret); 1177 1174 } 1178 1175 … … 1300 1297 void Frame::paintDragCaret(GraphicsContext* p, const IntRect& rect) const 1301 1298 { 1302 d->m_dragCaret.paintCaret(p, rect); 1299 SelectionController& dragCaret = d->m_page->dragCaret(); 1300 assert(dragCaret.selection().isCaret()); 1301 if (dragCaret.selection().start().node()->document()->frame() == this) 1302 dragCaret.paintCaret(p, rect); 1303 1303 } 1304 1304 -
trunk/WebCore/page/FramePrivate.h
r14447 r14498 183 183 184 184 SelectionController m_selection; 185 SelectionController m_dragCaret;186 185 Selection m_mark; 187 186 Timer<Frame> m_caretBlinkTimer; -
trunk/WebCore/page/Page.cpp
r14256 r14498 123 123 } 124 124 125 SelectionController& Page::dragCaret() const 126 { 127 return m_dragCaret; 125 128 } 129 130 void Page::setDragCaret(const SelectionController& dragCaret) 131 { 132 if (m_dragCaret != dragCaret) { 133 m_dragCaret.needsCaretRepaint(); 134 m_dragCaret = dragCaret; 135 m_dragCaret.needsCaretRepaint(); 136 } 137 } 138 139 } -
trunk/WebCore/page/Page.h
r14256 r14498 23 23 24 24 #include "PlatformString.h" 25 #include "SelectionController.h" 25 26 #include <wtf/HashSet.h> 26 27 … … 62 63 static void setNeedsReapplyStyles(); 63 64 static void setNeedsReapplyStylesForSettingsChange(KHTMLSettings*); 65 66 // FIXME: Replace this with a function on the selection controller or change it to Selection instead? 67 void setDragCaret(const SelectionController&); 68 SelectionController& dragCaret() const; // FIXME: Change to pointer? 64 69 65 70 #if __APPLE__ … … 78 83 int m_frameCount; 79 84 String m_groupName; 85 mutable SelectionController m_dragCaret; 80 86 81 87 #if __APPLE__
Note: See TracChangeset
for help on using the changeset viewer.