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

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

Issue 2414263002: Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in toNormalizedEphemeralRange (Closed)
Patch Set: fix nit Created 4 years, 2 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/WebSurroundingText.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 2801 matching lines...) Expand 10 before | Expand all | Expand 10 after
2812 WebTextDirection& end) const { 2812 WebTextDirection& end) const {
2813 const LocalFrame* frame = focusedLocalFrameInWidget(); 2813 const LocalFrame* frame = focusedLocalFrameInWidget();
2814 if (!frame) 2814 if (!frame)
2815 return false; 2815 return false;
2816 2816
2817 const FrameSelection& selection = frame->selection(); 2817 const FrameSelection& selection = frame->selection();
2818 if (!selection.isAvailable()) { 2818 if (!selection.isAvailable()) {
2819 // plugins/mouse-capture-inside-shadow.html reaches here. 2819 // plugins/mouse-capture-inside-shadow.html reaches here.
2820 return false; 2820 return false;
2821 } 2821 }
2822
2823 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
2824 // needs to be audited. See http://crbug.com/590369 for more details.
2825 frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
2826
2822 if (selection.selection().toNormalizedEphemeralRange().isNull()) 2827 if (selection.selection().toNormalizedEphemeralRange().isNull())
2823 return false; 2828 return false;
2824 start = 2829 start =
2825 toWebTextDirection(primaryDirectionOf(*selection.start().anchorNode())); 2830 toWebTextDirection(primaryDirectionOf(*selection.start().anchorNode()));
2826 end = toWebTextDirection(primaryDirectionOf(*selection.end().anchorNode())); 2831 end = toWebTextDirection(primaryDirectionOf(*selection.end().anchorNode()));
2827 return true; 2832 return true;
2828 } 2833 }
2829 2834
2830 // TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as 2835 // TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as
2831 // well. This code needs to be refactored (http://crbug.com/629721). 2836 // well. This code needs to be refactored (http://crbug.com/629721).
(...skipping 1910 matching lines...) Expand 10 before | Expand all | Expand 10 after
4742 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4747 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4743 return nullptr; 4748 return nullptr;
4744 return focusedFrame; 4749 return focusedFrame;
4745 } 4750 }
4746 4751
4747 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4752 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4748 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4753 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4749 } 4754 }
4750 4755
4751 } // namespace blink 4756 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebSurroundingText.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698