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

Side by Side Diff: Source/core/editing/EditorCommand.cpp

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase to master Created 5 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 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 * Copyright (C) 2009 Igalia S.L. 4 * Copyright (C) 2009 Igalia S.L.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 frame.selection().typingStyle(), hasNestedOrMultipleEmbeddings); 260 frame.selection().typingStyle(), hasNestedOrMultipleEmbeddings);
261 // FXIME: We should be returning MixedTriState when selectionDirection == di rection && hasNestedOrMultipleEmbeddings 261 // FXIME: We should be returning MixedTriState when selectionDirection == di rection && hasNestedOrMultipleEmbeddings
262 return (selectionDirection == direction && !hasNestedOrMultipleEmbeddings) ? TrueTriState : FalseTriState; 262 return (selectionDirection == direction && !hasNestedOrMultipleEmbeddings) ? TrueTriState : FalseTriState;
263 } 263 }
264 264
265 static unsigned verticalScrollDistance(LocalFrame& frame) 265 static unsigned verticalScrollDistance(LocalFrame& frame)
266 { 266 {
267 Element* focusedElement = frame.document()->focusedElement(); 267 Element* focusedElement = frame.document()->focusedElement();
268 if (!focusedElement) 268 if (!focusedElement)
269 return 0; 269 return 0;
270 LayoutObject* renderer = focusedElement->renderer(); 270 LayoutObject* renderer = focusedElement->layoutObject();
271 if (!renderer || !renderer->isBox()) 271 if (!renderer || !renderer->isBox())
272 return 0; 272 return 0;
273 LayoutBox& layoutBox = toLayoutBox(*renderer); 273 LayoutBox& layoutBox = toLayoutBox(*renderer);
274 LayoutStyle* style = layoutBox.style(); 274 LayoutStyle* style = layoutBox.style();
275 if (!style) 275 if (!style)
276 return 0; 276 return 0;
277 if (!(style->overflowY() == OSCROLL || style->overflowY() == OAUTO || focuse dElement->hasEditableStyle())) 277 if (!(style->overflowY() == OSCROLL || style->overflowY() == OAUTO || focuse dElement->hasEditableStyle()))
278 return 0; 278 return 0;
279 int height = std::min<int>(layoutBox.clientHeight(), frame.view()->visibleHe ight()); 279 int height = std::min<int>(layoutBox.clientHeight(), frame.view()->visibleHe ight());
280 return static_cast<unsigned>(max(max<int>(height * ScrollableArea::minFracti onToStepWhenPaging(), height - ScrollableArea::maxOverlapBetweenPages()), 1)); 280 return static_cast<unsigned>(max(max<int>(height * ScrollableArea::minFracti onToStepWhenPaging(), height - ScrollableArea::maxOverlapBetweenPages()), 1));
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 { 1787 {
1788 return m_command && m_command->isTextInsertion; 1788 return m_command && m_command->isTextInsertion;
1789 } 1789 }
1790 1790
1791 int Editor::Command::idForHistogram() const 1791 int Editor::Command::idForHistogram() const
1792 { 1792 {
1793 return isSupported() ? m_command->idForUserMetrics : 0; 1793 return isSupported() ? m_command->idForUserMetrics : 0;
1794 } 1794 }
1795 1795
1796 } // namespace blink 1796 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698