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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2702403004: Expand FrameSeleciton::start() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-22T12:32:36 Created 3 years, 10 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 | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2414 } 2414 }
2415 2415
2416 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets 2416 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
2417 // needs to be audited. See http://crbug.com/590369 for more details. 2417 // needs to be audited. See http://crbug.com/590369 for more details.
2418 frame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); 2418 frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
2419 2419
2420 if (selection.computeVisibleSelectionInDOMTree() 2420 if (selection.computeVisibleSelectionInDOMTree()
2421 .toNormalizedEphemeralRange() 2421 .toNormalizedEphemeralRange()
2422 .isNull()) 2422 .isNull())
2423 return false; 2423 return false;
2424 start = 2424 start = toWebTextDirection(
2425 toWebTextDirection(primaryDirectionOf(*selection.start().anchorNode())); 2425 primaryDirectionOf(*selection.computeVisibleSelectionInDOMTreeDeprecated()
2426 .start()
2427 .anchorNode()));
2426 end = toWebTextDirection( 2428 end = toWebTextDirection(
2427 primaryDirectionOf(*selection.computeVisibleSelectionInDOMTreeDeprecated() 2429 primaryDirectionOf(*selection.computeVisibleSelectionInDOMTreeDeprecated()
2428 .end() 2430 .end()
2429 .anchorNode())); 2431 .anchorNode()));
2430 return true; 2432 return true;
2431 } 2433 }
2432 2434
2433 // TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as 2435 // TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as
2434 // well. This code needs to be refactored (http://crbug.com/629721). 2436 // well. This code needs to be refactored (http://crbug.com/629721).
2435 bool WebViewImpl::isSelectionAnchorFirst() const { 2437 bool WebViewImpl::isSelectionAnchorFirst() const {
(...skipping 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after
4145 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4147 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4146 return nullptr; 4148 return nullptr;
4147 return focusedFrame; 4149 return focusedFrame;
4148 } 4150 }
4149 4151
4150 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4152 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4151 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4153 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4152 } 4154 }
4153 4155
4154 } // namespace blink 4156 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698