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

Side by Side Diff: Source/web/WebFrameWidgetImpl.cpp

Issue 1213483003: Get rid of redundant parameter PositionIsOffsetInAnchor from PositionAlgorithm constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « Source/modules/accessibility/AXLayoutObject.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 // If the selection was cleared while the WebView was not 465 // If the selection was cleared while the WebView was not
466 // focused, then the focus element shows with a focus ring but 466 // focused, then the focus element shows with a focus ring but
467 // no caret and does respond to keyboard inputs. 467 // no caret and does respond to keyboard inputs.
468 if (element->isTextFormControl()) { 468 if (element->isTextFormControl()) {
469 element->updateFocusAppearance(true); 469 element->updateFocusAppearance(true);
470 } else if (element->isContentEditable()) { 470 } else if (element->isContentEditable()) {
471 // updateFocusAppearance() selects all the text of 471 // updateFocusAppearance() selects all the text of
472 // contentseditable DIVs. So we set the selection explicitly 472 // contentseditable DIVs. So we set the selection explicitly
473 // instead. Note that this has the side effect of moving the 473 // instead. Note that this has the side effect of moving the
474 // caret back to the beginning of the text. 474 // caret back to the beginning of the text.
475 Position position(element, 0, Position::PositionIsOffsetInAn chor); 475 Position position(element, 0);
476 localFrame->selection().setSelection(VisibleSelection(positi on, SEL_DEFAULT_AFFINITY)); 476 localFrame->selection().setSelection(VisibleSelection(positi on, SEL_DEFAULT_AFFINITY));
477 } 477 }
478 } 478 }
479 } 479 }
480 } 480 }
481 } 481 }
482 482
483 bool WebFrameWidgetImpl::setComposition( 483 bool WebFrameWidgetImpl::setComposition(
484 const WebString& text, 484 const WebString& text,
485 const WebVector<WebCompositionUnderline>& underlines, 485 const WebVector<WebCompositionUnderline>& underlines,
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 // correspond to Page visibility, but is necessary until we properly sort ou t OOPIF visibility. 1045 // correspond to Page visibility, but is necessary until we properly sort ou t OOPIF visibility.
1046 m_page->setVisibilityState(static_cast<PageVisibilityState>(visibilityState) , isInitialState); 1046 m_page->setVisibilityState(static_cast<PageVisibilityState>(visibilityState) , isInitialState);
1047 1047
1048 if (m_layerTreeView) { 1048 if (m_layerTreeView) {
1049 bool visible = visibilityState == WebPageVisibilityStateVisible; 1049 bool visible = visibilityState == WebPageVisibilityStateVisible;
1050 m_layerTreeView->setVisible(visible); 1050 m_layerTreeView->setVisible(visible);
1051 } 1051 }
1052 } 1052 }
1053 1053
1054 } // namespace blink 1054 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXLayoutObject.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698