Changeset 29581 in webkit
- Timestamp:
- Jan 17, 2008, 9:44:35 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r29579 r29581 1 2008-01-16 Adam Roben <aroben@apple.com> 2 3 Move focused/active state from Frame to SelectionController/FocusController 4 5 This is the first part of <rdar://5006915> Inactive look for Aqua 6 controls. 7 8 The following methods were moved/renamed: 9 - Frame::setIsActive -> FocusController::setActive 10 - Frame::isActive -> SelectionController::isActiveAndFocused 11 - Frame::setWindowHasFocus -> SelectionController::setFocused 12 13 Active state is now correctly a Page-level concept. 14 15 The Mac parts of this patch were written by Darin. 16 17 Reviewed by Darin. 18 19 All tests pass. 20 21 * WebCore.base.exp: Updated for method renames. 22 * css/CSSStyleSelector.cpp: 23 (WebCore::CSSStyleSelector::checkOneSelector): Ditto. 24 * editing/SelectionController.cpp: 25 (WebCore::SelectionController::SelectionController): Initialize new 26 member. 27 (WebCore::SelectionController::focusedOrActiveStateChanged): New 28 private method. Most of this code came from Frame::setIsActive. 29 (WebCore::SelectionController::pageActivationChanged): Added. 30 (WebCore::SelectionController::setFocused): Added. Replaces 31 Frame::setWindowHasFocus. 32 (WebCore::SelectionController::isFocusedAndActive): Added. Replaces 33 Frame::isActive. 34 * editing/SelectionController.h: 35 * page/FocusController.cpp: 36 (WebCore::FocusController::FocusController): Initialize new member. 37 (WebCore::FocusController::setFocusedFrame): Changed to just call 38 SelectionController::setFocused, since active state has doesn't change 39 when the focused frame changes. 40 (WebCore::FocusController::setActive): Added. Replaces 41 Frame::setIsActive. 42 * page/FocusController.h: 43 (WebCore::FocusController::isActive): Added. 44 * page/Frame.cpp: 45 (WebCore::Frame::setDocument): Updated for method renames. 46 (WebCore::Frame::setFocusedNodeIfNeeded): Ditto. 47 (WebCore::Frame::updateSecureKeyboardEntryIfActive): Ditto. 48 (WebCore::FramePrivate::FramePrivate): Removed initialization of 49 removed members. 50 * page/Frame.h: 51 * page/FramePrivate.h: 52 * page/mac/WebCoreFrameBridge.h: Removed -selectionColor. 53 * page/mac/WebCoreFrameBridge.mm: Ditto. 54 * rendering/RenderListBox.cpp: 55 (WebCore::RenderListBox::paintItemForeground): Updated for method 56 renames. 57 (WebCore::RenderListBox::paintItemBackground): Ditto. 58 * rendering/RenderObject.cpp: 59 (WebCore::RenderObject::selectionBackgroundColor): Ditto. 60 (WebCore::RenderObject::selectionForegroundColor): Ditto. 61 * rendering/RenderTextControl.cpp: 62 (WebCore::RenderTextControl::capsLockStateMayHaveChanged): Ditto. 63 * rendering/RenderTheme.cpp: 64 (WebCore::RenderTheme::isFocused): Ditto. 65 1 66 2008-01-17 Holger Hans Peter Freyther <holger.freyther@trolltech.com> 2 67 -
trunk/WebCore/WebCore.base.exp
r29492 r29581 309 309 __ZN7WebCore15FocusController15setInitialFocusENS_14FocusDirectionEPNS_13KeyboardEventE 310 310 __ZN7WebCore15FocusController18focusedOrMainFrameEv 311 __ZN7WebCore15FocusController9setActiveEb 311 312 __ZN7WebCore15StringTruncator13rightTruncateERKNS_6StringEfRKNS_4FontEb 312 313 __ZN7WebCore15StringTruncator14centerTruncateERKNS_6StringEfRKNS_4FontEb … … 342 343 __ZN7WebCore19InspectorController5closeEv 343 344 __ZN7WebCore19InspectorController7inspectEPNS_4NodeE 345 __ZN7WebCore19SelectionController10setFocusedEb 344 346 __ZN7WebCore19SelectionController16setSelectedRangeEPNS_5RangeENS_9EAffinityEb 345 347 __ZN7WebCore19SelectionController5clearEv … … 389 391 __ZN7WebCore5Cache13setCapacitiesEjjj 390 392 __ZN7WebCore5Frame11scriptProxyEv 391 __ZN7WebCore5Frame11setIsActiveEb392 393 __ZN7WebCore5Frame11shouldCloseEv 393 394 __ZN7WebCore5Frame17bindingRootObjectEv 394 __ZN7WebCore5Frame17setWindowHasFocusEb395 395 __ZN7WebCore5Frame18windowScriptObjectEv 396 396 __ZN7WebCore5Frame20setSelectionFromNoneEv … … 624 624 __ZNK7WebCore19ResourceRequestBase7isEmptyEv 625 625 __ZNK7WebCore19SelectionController17isInPasswordFieldEv 626 __ZNK7WebCore19SelectionController18isFocusedAndActiveEv 626 627 __ZNK7WebCore20ResourceResponseBase14httpStatusCodeEv 627 628 __ZNK7WebCore20ResourceResponseBase16httpHeaderFieldsEv -
trunk/WebCore/css/CSSStyleSelector.cpp
r29502 r29581 60 60 #include "Rect.h" 61 61 #include "RenderTheme.h" 62 #include "SelectionController.h" 62 63 #include "Settings.h" 63 64 #include "ShadowValue.h" … … 1639 1640 } 1640 1641 case CSSSelector::PseudoFocus: 1641 if (e && e->focused() && e->document()->frame()-> isActive())1642 if (e && e->focused() && e->document()->frame()->selectionController()->isFocusedAndActive()) 1642 1643 return true; 1643 1644 break; -
trunk/WebCore/editing/SelectionController.cpp
r28523 r29581 31 31 #include "Editor.h" 32 32 #include "Element.h" 33 #include "EventHandler.h" 33 34 #include "EventNames.h" 34 35 #include "ExceptionCode.h" … … 44 45 #include "Page.h" 45 46 #include "Range.h" 47 #include "RenderTheme.h" 46 48 #include "RenderView.h" 47 49 #include "TextIterator.h" … … 66 68 , m_isCaretBlinkingSuspended(false) 67 69 , m_xPosForVerticalArrowNavigation(NoXPosForVerticalArrowNavigation) 70 , m_focused(false) 68 71 { 69 72 } … … 1020 1023 return !isTableElement(startNode) && !editingIgnoresContent(startNode); 1021 1024 } 1025 1026 void SelectionController::focusedOrActiveStateChanged() 1027 { 1028 bool activeAndFocused = isFocusedAndActive(); 1029 1030 // Because RenderObject::selectionBackgroundColor() and 1031 // RenderObject::selectionForegroundColor() check if the frame is active, 1032 // we have to update places those colors were painted. 1033 if (m_frame->view()) 1034 m_frame->view()->updateContents(enclosingIntRect(m_frame->selectionRect())); 1035 1036 // Caret appears in the active frame. 1037 if (activeAndFocused) 1038 m_frame->setSelectionFromNone(); 1039 m_frame->setCaretVisible(activeAndFocused); 1040 1041 // Update for caps lock state 1042 m_frame->eventHandler()->capsLockStateMayHaveChanged(); 1043 1044 // Because CSSStyleSelector::checkOneSelector() and 1045 // RenderTheme::isFocused() check if the frame is active, we have to 1046 // update style and theme state that depended on those. 1047 if (Node* node = m_frame->document()->focusedNode()) { 1048 node->setChanged(); 1049 if (RenderObject* renderer = node->renderer()) 1050 if (renderer && renderer->style()->hasAppearance()) 1051 theme()->stateChanged(renderer, FocusState); 1052 } 1053 1054 // Secure keyboard entry is set by the active frame. 1055 if (m_frame->document()->useSecureKeyboardEntryWhenActive()) 1056 m_frame->setUseSecureKeyboardEntry(activeAndFocused); 1057 } 1058 1059 void SelectionController::pageActivationChanged() 1060 { 1061 focusedOrActiveStateChanged(); 1062 } 1063 1064 void SelectionController::setFocused(bool flag) 1065 { 1066 if (m_focused == flag) 1067 return; 1068 m_focused = flag; 1069 1070 focusedOrActiveStateChanged(); 1071 1072 if (Document* doc = m_frame->document()) 1073 doc->dispatchWindowEvent(flag ? focusEvent : blurEvent, false, false); 1074 } 1075 1076 bool SelectionController::isFocusedAndActive() const 1077 { 1078 return m_focused && m_frame->page() && m_frame->page()->focusController()->isActive(); 1079 } 1022 1080 1023 1081 #ifndef NDEBUG -
trunk/WebCore/editing/SelectionController.h
r27744 r29581 112 112 bool isCaretBlinkingSuspended() const { return m_isCaretBlinkingSuspended; } 113 113 114 // Focus 115 void setFocused(bool); 116 bool isFocusedAndActive() const; 117 void pageActivationChanged(); 118 114 119 #ifndef NDEBUG 115 120 void formatForDebugger(char* buffer, unsigned length) const; … … 136 141 #endif 137 142 143 void focusedOrActiveStateChanged(); 144 138 145 Selection m_sel; 139 146 … … 153 160 154 161 int m_xPosForVerticalArrowNavigation; 162 bool m_focused; 155 163 }; 156 164 -
trunk/WebCore/page/FocusController.cpp
r29348 r29581 57 57 FocusController::FocusController(Page* page) 58 58 : m_page(page) 59 , m_isActive(false) 59 60 { 60 61 } … … 65 66 return; 66 67 67 if (m_focusedFrame) { 68 m_focusedFrame->setWindowHasFocus(false); 69 m_focusedFrame->setIsActive(false); 70 } 68 if (m_focusedFrame) 69 m_focusedFrame->selectionController()->setFocused(false); 71 70 72 71 m_focusedFrame = frame; 73 72 74 if (m_focusedFrame) { 75 m_focusedFrame->setWindowHasFocus(true); 76 m_focusedFrame->setIsActive(true); 77 } 73 if (m_focusedFrame) 74 m_focusedFrame->selectionController()->setFocused(true); 78 75 } 79 76 … … 293 290 } 294 291 292 void FocusController::setActive(bool active) 293 { 294 if (m_isActive == active) 295 return; 296 297 m_isActive = active; 298 299 if (Frame* frame = focusedFrame()) 300 frame->selectionController()->pageActivationChanged(); 301 } 302 295 303 } // namespace WebCore -
trunk/WebCore/page/FocusController.h
r29348 r29581 51 51 bool setFocusedNode(Node*, PassRefPtr<Frame>); 52 52 53 void setActive(bool); 54 bool isActive() const { return m_isActive; } 55 53 56 private: 54 57 Page* m_page; 55 58 RefPtr<Frame> m_focusedFrame; 59 bool m_isActive; 56 60 }; 57 61 -
trunk/WebCore/page/Frame.cpp
r29344 r29581 276 276 277 277 d->m_doc = newDoc; 278 if (d->m_doc && d->m_isActive)278 if (d->m_doc && selectionController()->isFocusedAndActive()) 279 279 setUseSecureKeyboardEntry(d->m_doc->useSecureKeyboardEntryWhenActive()); 280 280 … … 586 586 void Frame::setFocusedNodeIfNeeded() 587 587 { 588 if (!document() || selectionController()->isNone() || ! d->m_isActive)588 if (!document() || selectionController()->isNone() || !selectionController()->isFocusedAndActive()) 589 589 return; 590 590 … … 833 833 void Frame::updateSecureKeyboardEntryIfActive() 834 834 { 835 if ( d->m_isActive)835 if (selectionController()->isFocusedAndActive()) 836 836 setUseSecureKeyboardEntry(d->m_doc->useSecureKeyboardEntryWhenActive()); 837 837 } … … 1536 1536 } 1537 1537 1538 bool Frame::isActive() const1539 {1540 return d->m_isActive;1541 }1542 1543 void Frame::setIsActive(bool flag)1544 {1545 if (d->m_isActive == flag)1546 return;1547 d->m_isActive = flag;1548 1549 // Because RenderObject::selectionBackgroundColor() and1550 // RenderObject::selectionForegroundColor() check if the frame is active,1551 // we have to update places those colors were painted.1552 if (d->m_view)1553 d->m_view->updateContents(enclosingIntRect(selectionRect()));1554 1555 // Caret appears in the active frame.1556 if (flag)1557 setSelectionFromNone();1558 setCaretVisible(flag);1559 1560 // Update for caps lock state1561 eventHandler()->capsLockStateMayHaveChanged();1562 1563 // Because CSSStyleSelector::checkOneSelector() and1564 // RenderTheme::isFocused() check if the frame is active, we have to1565 // update style and theme state that depended on those.1566 if (d->m_doc) {1567 if (Node* node = d->m_doc->focusedNode()) {1568 node->setChanged();1569 if (RenderObject* renderer = node->renderer())1570 if (renderer && renderer->style()->hasAppearance())1571 theme()->stateChanged(renderer, FocusState);1572 }1573 }1574 1575 // Secure keyboard entry is set by the active frame.1576 if (d->m_doc->useSecureKeyboardEntryWhenActive())1577 setUseSecureKeyboardEntry(flag);1578 }1579 1580 void Frame::setWindowHasFocus(bool flag)1581 {1582 if (d->m_windowHasFocus == flag)1583 return;1584 d->m_windowHasFocus = flag;1585 1586 if (Document *doc = document())1587 doc->dispatchWindowEvent(flag ? focusEvent : blurEvent, false, false);1588 }1589 1590 1538 bool Frame::inViewSourceMode() const 1591 1539 { … … 1953 1901 , m_caretVisible(false) 1954 1902 , m_caretPaint(true) 1955 , m_isActive(false)1956 1903 , m_isPainting(false) 1957 1904 , m_lifeSupportTimer(thisFrame, &Frame::lifeSupportTimerFired) … … 1960 1907 , m_paintRestriction(PaintRestrictionNone) 1961 1908 , m_highlightTextMatches(false) 1962 , m_windowHasFocus(false)1963 1909 , m_inViewSourceMode(false) 1964 1910 , frameCount(0) -
trunk/WebCore/page/Frame.h
r28626 r29581 190 190 static void clearTimers(FrameView*); 191 191 192 bool isActive() const;193 void setIsActive(bool flag);194 195 192 // Convenience, to avoid repeating the code to dig down to get this. 196 193 UChar backslashAsCurrencySymbol() const; … … 225 222 void sendResizeEvent(); 226 223 void sendScrollEvent(); 227 228 void setWindowHasFocus(bool flag);229 224 230 225 // === to be moved into FrameView … … 338 333 void setSelectionFromNone(); 339 334 335 void setUseSecureKeyboardEntry(bool); 336 340 337 private: 341 338 void caretBlinkTimerFired(Timer<Frame>*); 342 void setUseSecureKeyboardEntry(bool);343 339 344 340 public: -
trunk/WebCore/page/FramePrivate.h
r28411 r29581 95 95 bool m_caretVisible : 1; 96 96 bool m_caretPaint : 1; 97 bool m_isActive : 1;98 97 bool m_isPainting : 1; 99 98 … … 110 109 111 110 bool m_highlightTextMatches; 112 bool m_windowHasFocus;113 111 114 112 bool m_inViewSourceMode; -
trunk/WebCore/page/mac/WebCoreFrameBridge.h
r28717 r29581 172 172 - (void)setDrawsBackground:(BOOL)drawsBackround; 173 173 174 - (NSColor *)selectionColor;175 176 174 - (id)accessibilityTree; 177 175 -
trunk/WebCore/page/mac/WebCoreFrameBridge.mm
r29250 r29581 785 785 } 786 786 787 - (NSColor *)selectionColor788 {789 return m_frame->isActive() ? [NSColor selectedTextBackgroundColor] : [NSColor secondarySelectedControlColor];790 }791 792 787 - (id)accessibilityTree 793 788 { -
trunk/WebCore/rendering/RenderListBox.cpp
r28298 r29581 47 47 #include "RenderTheme.h" 48 48 #include "RenderView.h" 49 #include "SelectionController.h" 49 50 #include <math.h> 50 51 … … 317 318 Color textColor = element->renderStyle() ? element->renderStyle()->color() : style()->color(); 318 319 if (element->hasTagName(optionTag) && static_cast<HTMLOptionElement*>(element)->selected()) { 319 if (document()->frame()-> isActive() && document()->focusedNode() == node())320 if (document()->frame()->selectionController()->isFocusedAndActive() && document()->focusedNode() == node()) 320 321 textColor = theme()->activeListBoxSelectionForegroundColor(); 321 322 // Honor the foreground color for disabled items … … 352 353 Color backColor; 353 354 if (element->hasTagName(optionTag) && static_cast<HTMLOptionElement*>(element)->selected()) { 354 if (document()->frame()-> isActive() && document()->focusedNode() == node())355 if (document()->frame()->selectionController()->isFocusedAndActive() && document()->focusedNode() == node()) 355 356 backColor = theme()->activeListBoxSelectionBackgroundColor(); 356 357 else -
trunk/WebCore/rendering/RenderObject.cpp
r29553 r29581 60 60 #include "RenderTheme.h" 61 61 #include "RenderView.h" 62 #include "SelectionController.h" 62 63 #include "TextResourceDecoder.h" 63 64 #include "TextStream.h" … … 2039 2040 color = pseudoStyle->backgroundColor().blendWithWhite(); 2040 2041 else 2041 color = document()->frame()-> isActive() ?2042 color = document()->frame()->selectionController()->isFocusedAndActive() ? 2042 2043 theme()->activeSelectionBackgroundColor() : 2043 2044 theme()->inactiveSelectionBackgroundColor(); … … 2057 2058 color = pseudoStyle->color(); 2058 2059 } else 2059 color = document()->frame()-> isActive() ?2060 color = document()->frame()->selectionController()->isFocusedAndActive() ? 2060 2061 theme()->platformActiveSelectionForegroundColor() : 2061 2062 theme()->platformInactiveSelectionForegroundColor(); -
trunk/WebCore/rendering/RenderTextControl.cpp
r28447 r29581 1232 1232 if (Frame* f = d->frame()) 1233 1233 shouldDrawCapsLockIndicator = !m_multiLine && static_cast<HTMLInputElement*>(n)->inputType() == HTMLInputElement::PASSWORD && 1234 f-> isActive() && d->focusedNode() == n && PlatformKeyboardEvent::currentCapsLockState();1234 f->selectionController()->isFocusedAndActive() && d->focusedNode() == n && PlatformKeyboardEvent::currentCapsLockState(); 1235 1235 1236 1236 if (shouldDrawCapsLockIndicator != m_shouldDrawCapsLockIndicator) { -
trunk/WebCore/rendering/RenderTheme.cpp
r29492 r29581 30 30 #include "HTMLNames.h" 31 31 #include "RenderStyle.h" 32 #include "SelectionController.h" 32 33 33 34 // The methods in this file are shared by all themes on every platform. … … 378 379 Document* document = node->document(); 379 380 Frame* frame = document->frame(); 380 return node == document->focusedNode() && frame && frame-> isActive();381 return node == document->focusedNode() && frame && frame->selectionController()->isFocusedAndActive(); 381 382 } 382 383 -
trunk/WebKit/mac/ChangeLog
r29543 r29581 1 2008-01-16 Adam Roben <aroben@apple.com> 2 3 Updated for renames/removal of WebCore methods. 4 5 Reviewed by Darin. 6 7 * Plugins/WebPluginController.mm: 8 (-[WebPluginController webPlugInContainerSelectionColor]): Changed to 9 ask isFocusedAndActive directly, instead of going through the frame 10 bridge. 11 * WebView/WebHTMLView.mm: 12 (-[WebHTMLView _updateActiveState]): Updated for method renames. 13 1 14 2008-01-16 John Sullivan <sullivan@apple.com> 2 15 -
trunk/WebKit/mac/Plugins/WebPluginController.mm
r24915 r29581 364 364 - (NSColor *)webPlugInContainerSelectionColor 365 365 { 366 return [[_dataSource _bridge] selectionColor]; 366 bool primary = true; 367 if (Frame* frame = core([self webFrame])) 368 primary = frame->selectionController()->isFocusedAndActive(); 369 return primary ? [NSColor selectedTextBackgroundColor] : [NSColor secondarySelectedControlColor]; 367 370 } 368 371 -
trunk/WebKit/mac/WebView/WebHTMLView.mm
r29543 r29581 1728 1728 1729 1729 BOOL isActive = !_private->resigningFirstResponder && windowIsKey && [self _web_firstResponderCausesFocusDisplay]; 1730 frame->setIsActive(isActive);1730 page->focusController()->setActive(isActive); 1731 1731 1732 1732 Frame* focusedFrame = page->focusController()->focusedOrMainFrame(); 1733 frame->se tWindowHasFocus(frame == focusedFrame && windowOrSheetIsKey);1733 frame->selectionController()->setFocused(frame == focusedFrame && windowOrSheetIsKey); 1734 1734 } 1735 1735 -
trunk/WebKit/win/ChangeLog
r29551 r29581 1 2008-01-16 Adam Roben <aroben@apple.com> 2 3 Updated for changes to WebCore methods 4 5 Focus and active state are now handled (somewhat) separately. Future 6 patches will further separate these concepts. 7 8 Reviewed by Darin. 9 10 * WebView.cpp: 11 (WebViewWndProc): Updated for method renames. 12 (WebView::updateActiveState): Only change the active state here. Focus 13 is handled inside WM_SETFOCUS and WM_KILLFOCUS message handlers. 14 1 15 2008-01-16 Steve Falkenburg <sfalken@apple.com> 2 16 -
trunk/WebKit/win/WebView.cpp
r29551 r29581 1662 1662 // FIXME: Merge this logic with updateActiveState, and switch this over to use updateActiveState 1663 1663 1664 webView->page()->focusController()->setActive(true); 1665 1664 1666 // It's ok to just always do setWindowHasFocus, since we won't fire the focus event on the DOM 1665 1667 // window unless the value changes. It's also ok to do setIsActive inside focus, … … 1668 1670 FocusController* focusController = webView->page()->focusController(); 1669 1671 if (Frame* frame = focusController->focusedFrame()) { 1670 frame->setIsActive(true);1671 1672 1672 // If the previously focused window is a child of ours (for example a plugin), don't send any 1673 1673 // focus events. 1674 1674 if (!IsChild(hWnd, reinterpret_cast<HWND>(wParam))) 1675 frame->se tWindowHasFocus(true);1675 frame->selectionController()->setFocused(true); 1676 1676 } else 1677 1677 focusController->setFocusedFrame(webView->page()->mainFrame()); … … 1694 1694 webView->resetIME(focusController->focusedOrMainFrame()); 1695 1695 if (GetAncestor(hWnd, GA_ROOT) != newFocusWnd) { 1696 webView->page()->focusController()->setActive(false); 1696 1697 if (Frame* frame = focusController->focusedOrMainFrame()) { 1697 frame->setIsActive(false);1698 1699 1698 // If we're losing focus to a child of ours, don't send blur events. 1700 1699 if (!IsChild(hWnd, newFocusWnd)) 1701 frame->se tWindowHasFocus(false);1700 frame->selectionController()->setFocused(false); 1702 1701 } 1703 1702 } else … … 2665 2664 HRESULT STDMETHODCALLTYPE WebView::updateActiveState() 2666 2665 { 2667 Frame* frame = m_page->mainFrame();2668 2669 2666 HWND window = ::GetAncestor(m_viewWindow, GA_ROOT); 2670 2667 HWND activeWindow = ::GetActiveWindow(); … … 2674 2671 bool windowOrSheetIsKey = windowIsKey || (window == activeWindow); 2675 2672 2676 frame->setIsActive(windowIsKey); 2677 2678 Frame* focusedFrame = m_page->focusController()->focusedOrMainFrame(); 2679 frame->setWindowHasFocus(frame == focusedFrame && windowOrSheetIsKey); 2673 m_page->focusController()->setActive(windowOrSheetIsKey); 2680 2674 2681 2675 return S_OK; -
trunk/WebKit/wx/ChangeLog
r29453 r29581 1 2008-01-16 Adam Roben <aroben@apple.com> 2 3 Updated for WebCore method renames. 4 5 Reviewed by Darin. 6 7 * WebView.cpp: 8 (wxWebView::OnSetFocus): 9 (wxWebView::OnKillFocus): 10 (wxWebView::OnActivate): 11 1 12 2008-01-12 Kevin Ollivier <kevino@theolliviers.com> 2 13 -
trunk/WebKit/wx/WebView.cpp
r29453 r29581 30 30 #include "Editor.h" 31 31 #include "EventHandler.h" 32 #include "FocusController.h" 32 33 #include "Frame.h" 33 34 #include "FrameLoader.h" … … 44 45 #include "RenderObject.h" 45 46 #include "RenderTreeAsText.h" 47 #include "SelectionController.h" 46 48 #include "Settings.h" 47 49 … … 557 559 { 558 560 if (m_impl->frame) { 559 m_impl->frame->se tWindowHasFocus(true);561 m_impl->frame->selectionController()->setFocused(true); 560 562 } 561 563 event.Skip(); … … 565 567 { 566 568 if (m_impl->frame) { 567 m_impl->frame->se tWindowHasFocus(false);569 m_impl->frame->selectionController()->setFocused(false); 568 570 } 569 571 event.Skip(); … … 572 574 void wxWebView::OnActivate(wxActivateEvent& event) 573 575 { 574 if (m_impl-> frame) {575 m_impl-> frame->setIsActive(event.GetActive());576 if (m_impl->page) { 577 m_impl->page->focusController()->setActive(event.GetActive()); 576 578 } 577 579 event.Skip();
Note:
See TracChangeset
for help on using the changeset viewer.