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

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

Issue 1104243003: Oilpan: put ClientRect(List) on the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove transition types uses also Created 5 years, 8 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) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2011, 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 * 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 void MediaControls::refreshClosedCaptionsButtonVisibility() 349 void MediaControls::refreshClosedCaptionsButtonVisibility()
350 { 350 {
351 if (mediaElement().hasClosedCaptions()) 351 if (mediaElement().hasClosedCaptions())
352 m_toggleClosedCaptionsButton->show(); 352 m_toggleClosedCaptionsButton->show();
353 else 353 else
354 m_toggleClosedCaptionsButton->hide(); 354 m_toggleClosedCaptionsButton->hide();
355 } 355 }
356 356
357 static Element* elementFromCenter(Element& element) 357 static Element* elementFromCenter(Element& element)
358 { 358 {
359 RefPtrWillBeRawPtr<ClientRect> clientRect = element.getBoundingClientRect(); 359 ClientRect* clientRect = element.getBoundingClientRect();
360 int centerX = static_cast<int>((clientRect->left() + clientRect->right()) / 2); 360 int centerX = static_cast<int>((clientRect->left() + clientRect->right()) / 2);
361 int centerY = static_cast<int>((clientRect->top() + clientRect->bottom()) / 2); 361 int centerY = static_cast<int>((clientRect->top() + clientRect->bottom()) / 2);
362 362
363 return element.document().elementFromPoint(centerX , centerY); 363 return element.document().elementFromPoint(centerX , centerY);
364 } 364 }
365 365
366 void MediaControls::tryShowOverlayCastButton() 366 void MediaControls::tryShowOverlayCastButton()
367 { 367 {
368 // The element needs to be shown to have its dimensions and position. 368 // The element needs to be shown to have its dimensions and position.
369 m_overlayCastButton->show(); 369 m_overlayCastButton->show();
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 visitor->trace(m_toggleClosedCaptionsButton); 529 visitor->trace(m_toggleClosedCaptionsButton);
530 visitor->trace(m_fullScreenButton); 530 visitor->trace(m_fullScreenButton);
531 visitor->trace(m_durationDisplay); 531 visitor->trace(m_durationDisplay);
532 visitor->trace(m_enclosure); 532 visitor->trace(m_enclosure);
533 visitor->trace(m_castButton); 533 visitor->trace(m_castButton);
534 visitor->trace(m_overlayCastButton); 534 visitor->trace(m_overlayCastButton);
535 HTMLDivElement::trace(visitor); 535 HTMLDivElement::trace(visitor);
536 } 536 }
537 537
538 } 538 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698