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

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

Issue 1365853003: LayoutBox::scrollRectToVisible doesn't respect overflow:hidden property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typos Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 } 1160 }
1161 1161
1162 template <typename Strategy> 1162 template <typename Strategy>
1163 static PassRefPtrWillBeRawPtr<Range> findStringAndScrollToVisibleAlgorithm(Edito r& editor, const String& target, const EphemeralRangeTemplate<Strategy>& previou sMatch, FindOptions options) 1163 static PassRefPtrWillBeRawPtr<Range> findStringAndScrollToVisibleAlgorithm(Edito r& editor, const String& target, const EphemeralRangeTemplate<Strategy>& previou sMatch, FindOptions options)
1164 { 1164 {
1165 RefPtrWillBeRawPtr<Range> nextMatch = editor.findRangeOfString(target, previ ousMatch, options); 1165 RefPtrWillBeRawPtr<Range> nextMatch = editor.findRangeOfString(target, previ ousMatch, options);
1166 if (!nextMatch) 1166 if (!nextMatch)
1167 return nullptr; 1167 return nullptr;
1168 1168
1169 nextMatch->firstNode()->layoutObject()->scrollRectToVisible(LayoutRect(nextM atch->boundingBox()), 1169 nextMatch->firstNode()->layoutObject()->scrollRectToVisible(LayoutRect(nextM atch->boundingBox()),
1170 ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeed ed); 1170 ScrollAlignment::alignCenterIfNeeded, ScrollAlignment::alignCenterIfNeed ed, UserScroll);
1171 1171
1172 return nextMatch.release(); 1172 return nextMatch.release();
1173 } 1173 }
1174 1174
1175 PassRefPtrWillBeRawPtr<Range> Editor::findStringAndScrollToVisible(const String& target, Range* range, FindOptions options) 1175 PassRefPtrWillBeRawPtr<Range> Editor::findStringAndScrollToVisible(const String& target, Range* range, FindOptions options)
1176 { 1176 {
1177 if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled()) 1177 if (RuntimeEnabledFeatures::selectionForComposedTreeEnabled())
1178 return findStringAndScrollToVisibleAlgorithm<EditingInComposedTreeStrate gy>(*this, target, EphemeralRangeInComposedTree(range), options); 1178 return findStringAndScrollToVisibleAlgorithm<EditingInComposedTreeStrate gy>(*this, target, EphemeralRangeInComposedTree(range), options);
1179 return findStringAndScrollToVisibleAlgorithm<EditingStrategy>(*this, target, EphemeralRange(range), options); 1179 return findStringAndScrollToVisibleAlgorithm<EditingStrategy>(*this, target, EphemeralRange(range), options);
1180 } 1180 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 } 1301 }
1302 1302
1303 DEFINE_TRACE(Editor) 1303 DEFINE_TRACE(Editor)
1304 { 1304 {
1305 visitor->trace(m_frame); 1305 visitor->trace(m_frame);
1306 visitor->trace(m_lastEditCommand); 1306 visitor->trace(m_lastEditCommand);
1307 visitor->trace(m_mark); 1307 visitor->trace(m_mark);
1308 } 1308 }
1309 1309
1310 } // namespace blink 1310 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698