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

Side by Side Diff: Source/core/html/shadow/MediaControlElements.cpp

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
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 * 8 *
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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 // FIXME: This will need to take the timeline offset into consideration 389 // FIXME: This will need to take the timeline offset into consideration
390 // once that concept is supported, see https://crbug.com/312699 390 // once that concept is supported, see https://crbug.com/312699
391 if (mediaElement().controller()) { 391 if (mediaElement().controller()) {
392 if (mediaElement().controller()->seekable()->contain(time)) 392 if (mediaElement().controller()->seekable()->contain(time))
393 mediaElement().controller()->setCurrentTime(time); 393 mediaElement().controller()->setCurrentTime(time);
394 } else if (mediaElement().seekable()->contain(time)) { 394 } else if (mediaElement().seekable()->contain(time)) {
395 mediaElement().setCurrentTime(time, IGNORE_EXCEPTION); 395 mediaElement().setCurrentTime(time, IGNORE_EXCEPTION);
396 } 396 }
397 } 397 }
398 398
399 LayoutSlider* slider = toLayoutSlider(renderer()); 399 LayoutSlider* slider = toLayoutSlider(layoutObject());
400 if (slider && slider->inDragMode()) 400 if (slider && slider->inDragMode())
401 mediaControls().updateCurrentTimeDisplay(); 401 mediaControls().updateCurrentTimeDisplay();
402 } 402 }
403 403
404 bool MediaControlTimelineElement::willRespondToMouseClickEvents() 404 bool MediaControlTimelineElement::willRespondToMouseClickEvents()
405 { 405 {
406 return inDocument() && document().isActive(); 406 return inDocument() && document().isActive();
407 } 407 }
408 408
409 void MediaControlTimelineElement::setPosition(double currentTime) 409 void MediaControlTimelineElement::setPosition(double currentTime)
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 hide(); 691 hide();
692 } 692 }
693 693
694 void MediaControlTextTrackContainerElement::updateSizes() 694 void MediaControlTextTrackContainerElement::updateSizes()
695 { 695 {
696 if (!document().isActive()) 696 if (!document().isActive())
697 return; 697 return;
698 698
699 IntRect videoBox; 699 IntRect videoBox;
700 700
701 if (!mediaElement().renderer() || !mediaElement().renderer()->isVideo()) 701 if (!mediaElement().layoutObject() || !mediaElement().layoutObject()->isVide o())
702 return; 702 return;
703 videoBox = toLayoutVideo(mediaElement().renderer())->videoBox(); 703 videoBox = toLayoutVideo(mediaElement().layoutObject())->videoBox();
704 704
705 if (m_videoDisplaySize == videoBox) 705 if (m_videoDisplaySize == videoBox)
706 return; 706 return;
707 m_videoDisplaySize = videoBox; 707 m_videoDisplaySize = videoBox;
708 708
709 float smallestDimension = std::min(m_videoDisplaySize.size().height(), m_vid eoDisplaySize.size().width()); 709 float smallestDimension = std::min(m_videoDisplaySize.size().height(), m_vid eoDisplaySize.size().width());
710 710
711 float fontSize = smallestDimension * 0.05f; 711 float fontSize = smallestDimension * 0.05f;
712 if (fontSize != m_fontSize) { 712 if (fontSize != m_fontSize) {
713 m_fontSize = fontSize; 713 m_fontSize = fontSize;
714 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue: :CSS_PX); 714 setInlineStyleProperty(CSSPropertyFontSize, fontSize, CSSPrimitiveValue: :CSS_PX);
715 } 715 }
716 } 716 }
717 717
718 // ---------------------------- 718 // ----------------------------
719 719
720 } // namespace blink 720 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/shadow/MediaControlElementTypes.cpp ('k') | Source/core/html/shadow/MediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698