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

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

Issue 1405373004: OOPIF: Fix blinking caret in input fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@focus-keyboard-routing
Patch Set: Created 5 years, 1 month 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 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 m_caretRectDirty = true; 1328 m_caretRectDirty = true;
1329 1329
1330 scheduleVisualUpdate(); 1330 scheduleVisualUpdate();
1331 } 1331 }
1332 1332
1333 void FrameSelection::scheduleVisualUpdate() const 1333 void FrameSelection::scheduleVisualUpdate() const
1334 { 1334 {
1335 if (!m_frame) 1335 if (!m_frame)
1336 return; 1336 return;
1337 if (Page* page = m_frame->page()) 1337 if (Page* page = m_frame->page())
1338 page->animator().scheduleVisualUpdate(); 1338 page->animator().scheduleVisualUpdate(m_frame->localFrameRoot());
1339 } 1339 }
1340 1340
1341 bool FrameSelection::selectWordAroundPosition(const VisiblePosition& position) 1341 bool FrameSelection::selectWordAroundPosition(const VisiblePosition& position)
1342 { 1342 {
1343 static const EWordSide wordSideList[2] = { RightWordIfOnBoundary, LeftWordIf OnBoundary }; 1343 static const EWordSide wordSideList[2] = { RightWordIfOnBoundary, LeftWordIf OnBoundary };
1344 for (EWordSide wordSide : wordSideList) { 1344 for (EWordSide wordSide : wordSideList) {
1345 VisiblePosition start = startOfWord(position, wordSide); 1345 VisiblePosition start = startOfWord(position, wordSide);
1346 VisiblePosition end = endOfWord(position, wordSide); 1346 VisiblePosition end = endOfWord(position, wordSide);
1347 String text = plainText(EphemeralRange(start.deepEquivalent(), end.deepE quivalent())); 1347 String text = plainText(EphemeralRange(start.deepEquivalent(), end.deepE quivalent()));
1348 if (!text.isEmpty() && !isSeparator(text.characterStartingAt(0))) { 1348 if (!text.isEmpty() && !isSeparator(text.characterStartingAt(0))) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 1409
1410 void showTree(const blink::FrameSelection* sel) 1410 void showTree(const blink::FrameSelection* sel)
1411 { 1411 {
1412 if (sel) 1412 if (sel)
1413 sel->showTreeForThis(); 1413 sel->showTreeForThis();
1414 else 1414 else
1415 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); 1415 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n");
1416 } 1416 }
1417 1417
1418 #endif 1418 #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