Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: Source/core/editing/FrameSelection.cpp

Issue 369673008: [Cleanup] No need for extra boolean variable in FrameSelection::caretBlinkTimerFired (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1622 if (!focusedElement) 1622 if (!focusedElement)
1623 return false; 1623 return false;
1624 1624
1625 return focusedElement->containsIncludingShadowDOM(m_selection.start().anchor Node()); 1625 return focusedElement->containsIncludingShadowDOM(m_selection.start().anchor Node());
1626 } 1626 }
1627 1627
1628 void FrameSelection::caretBlinkTimerFired(Timer<FrameSelection>*) 1628 void FrameSelection::caretBlinkTimerFired(Timer<FrameSelection>*)
1629 { 1629 {
1630 ASSERT(caretIsVisible()); 1630 ASSERT(caretIsVisible());
1631 ASSERT(isCaret()); 1631 ASSERT(isCaret());
1632 bool caretPaint = m_caretPaint; 1632 if (isCaretBlinkingSuspended() && m_caretPaint)
1633 if (isCaretBlinkingSuspended() && caretPaint)
1634 return; 1633 return;
1635 m_caretPaint = !caretPaint; 1634 m_caretPaint = !m_caretPaint;
1636 invalidateCaretRect(); 1635 invalidateCaretRect();
1637 } 1636 }
1638 1637
1639 void FrameSelection::notifyRendererOfSelectionChange(EUserTriggered userTriggere d) 1638 void FrameSelection::notifyRendererOfSelectionChange(EUserTriggered userTriggere d)
1640 { 1639 {
1641 m_frame->document()->updateRenderTreeIfNeeded(); 1640 m_frame->document()->updateRenderTreeIfNeeded();
1642 1641
1643 if (HTMLTextFormControlElement* textControl = enclosingTextFormControl(start ())) 1642 if (HTMLTextFormControlElement* textControl = enclosingTextFormControl(start ()))
1644 textControl->selectionChanged(userTriggered == UserTriggered); 1643 textControl->selectionChanged(userTriggered == UserTriggered);
1645 } 1644 }
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 sel.showTreeForThis(); 1886 sel.showTreeForThis();
1888 } 1887 }
1889 1888
1890 void showTree(const WebCore::FrameSelection* sel) 1889 void showTree(const WebCore::FrameSelection* sel)
1891 { 1890 {
1892 if (sel) 1891 if (sel)
1893 sel->showTreeForThis(); 1892 sel->showTreeForThis();
1894 } 1893 }
1895 1894
1896 #endif 1895 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698