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

Side by Side Diff: Source/core/rendering/RenderTextControlSingleLine.cpp

Issue 163513002: Have RenderBlockFlow sub-classes' methods call their super-class method properly. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « Source/core/rendering/RenderTextControl.cpp ('k') | Source/core/rendering/RenderView.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) 2006, 2007, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 if (innerTextRenderer) 194 if (innerTextRenderer)
195 textOffset = innerTextRenderer->location(); 195 textOffset = innerTextRenderer->location();
196 if (editingViewPortElement() && editingViewPortElement()->renderBox()) 196 if (editingViewPortElement() && editingViewPortElement()->renderBox())
197 textOffset += toLayoutSize(editingViewPortElement()->renderBox()->lo cation()); 197 textOffset += toLayoutSize(editingViewPortElement()->renderBox()->lo cation());
198 if (containerRenderer) 198 if (containerRenderer)
199 textOffset += toLayoutSize(containerRenderer->location()); 199 textOffset += toLayoutSize(containerRenderer->location());
200 placeholderBox->setLocation(textOffset); 200 placeholderBox->setLocation(textOffset);
201 201
202 if (!placeholderBoxHadLayout && placeholderBox->checkForRepaintDuringLay out()) { 202 if (!placeholderBoxHadLayout && placeholderBox->checkForRepaintDuringLay out()) {
203 // This assumes a shadow tree without floats. If floats are added, t he 203 // This assumes a shadow tree without floats. If floats are added, t he
204 // logic should be shared with RenderBlock::layoutBlockChild. 204 // logic should be shared with RenderBlockFlow::layoutBlockChild.
205 placeholderBox->repaint(); 205 placeholderBox->repaint();
206 } 206 }
207 // The placeholder gets layout last, after the parent text control and i ts other children, 207 // The placeholder gets layout last, after the parent text control and i ts other children,
208 // so in order to get the correct overflow from the placeholder we need to recompute it now. 208 // so in order to get the correct overflow from the placeholder we need to recompute it now.
209 if (neededLayout) 209 if (neededLayout)
210 computeOverflow(clientLogicalBottom()); 210 computeOverflow(clientLogicalBottom());
211 } 211 }
212 } 212 }
213 213
214 bool RenderTextControlSingleLine::nodeAtPoint(const HitTestRequest& request, Hit TestResult& result, const HitTestLocation& locationInContainer, const LayoutPoin t& accumulatedOffset, HitTestAction hitTestAction) 214 bool RenderTextControlSingleLine::nodeAtPoint(const HitTestRequest& request, Hit TestResult& result, const HitTestLocation& locationInContainer, const LayoutPoin t& accumulatedOffset, HitTestAction hitTestAction)
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 if (!renderer) 393 if (!renderer)
394 return; 394 return;
395 395
396 renderer->autoscroll(position); 396 renderer->autoscroll(position);
397 } 397 }
398 398
399 int RenderTextControlSingleLine::scrollWidth() const 399 int RenderTextControlSingleLine::scrollWidth() const
400 { 400 {
401 if (innerTextElement()) 401 if (innerTextElement())
402 return innerTextElement()->scrollWidth(); 402 return innerTextElement()->scrollWidth();
403 return RenderBlock::scrollWidth(); 403 return RenderBlockFlow::scrollWidth();
404 } 404 }
405 405
406 int RenderTextControlSingleLine::scrollHeight() const 406 int RenderTextControlSingleLine::scrollHeight() const
407 { 407 {
408 if (innerTextElement()) 408 if (innerTextElement())
409 return innerTextElement()->scrollHeight(); 409 return innerTextElement()->scrollHeight();
410 return RenderBlock::scrollHeight(); 410 return RenderBlockFlow::scrollHeight();
411 } 411 }
412 412
413 int RenderTextControlSingleLine::scrollLeft() const 413 int RenderTextControlSingleLine::scrollLeft() const
414 { 414 {
415 if (innerTextElement()) 415 if (innerTextElement())
416 return innerTextElement()->scrollLeft(); 416 return innerTextElement()->scrollLeft();
417 return RenderBlock::scrollLeft(); 417 return RenderBlockFlow::scrollLeft();
418 } 418 }
419 419
420 int RenderTextControlSingleLine::scrollTop() const 420 int RenderTextControlSingleLine::scrollTop() const
421 { 421 {
422 if (innerTextElement()) 422 if (innerTextElement())
423 return innerTextElement()->scrollTop(); 423 return innerTextElement()->scrollTop();
424 return RenderBlock::scrollTop(); 424 return RenderBlockFlow::scrollTop();
425 } 425 }
426 426
427 void RenderTextControlSingleLine::setScrollLeft(int newLeft) 427 void RenderTextControlSingleLine::setScrollLeft(int newLeft)
428 { 428 {
429 if (innerTextElement()) 429 if (innerTextElement())
430 innerTextElement()->setScrollLeft(newLeft); 430 innerTextElement()->setScrollLeft(newLeft);
431 } 431 }
432 432
433 void RenderTextControlSingleLine::setScrollTop(int newTop) 433 void RenderTextControlSingleLine::setScrollTop(int newTop)
434 { 434 {
435 if (innerTextElement()) 435 if (innerTextElement())
436 innerTextElement()->setScrollTop(newTop); 436 innerTextElement()->setScrollTop(newTop);
437 } 437 }
438 438
439 HTMLInputElement* RenderTextControlSingleLine::inputElement() const 439 HTMLInputElement* RenderTextControlSingleLine::inputElement() const
440 { 440 {
441 return toHTMLInputElement(node()); 441 return toHTMLInputElement(node());
442 } 442 }
443 443
444 } 444 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTextControl.cpp ('k') | Source/core/rendering/RenderView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698