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

Side by Side Diff: Source/core/html/HTMLMediaElement.cpp

Issue 23956012: Stop passing NodeRenderingContext except in textRendererIsNeeded (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/HTMLMeterElement.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) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 21 matching lines...) Expand all
32 #include "bindings/v8/ExceptionStatePlaceholder.h" 32 #include "bindings/v8/ExceptionStatePlaceholder.h"
33 #include "bindings/v8/ScriptController.h" 33 #include "bindings/v8/ScriptController.h"
34 #include "bindings/v8/ScriptEventListener.h" 34 #include "bindings/v8/ScriptEventListener.h"
35 #include "core/css/MediaList.h" 35 #include "core/css/MediaList.h"
36 #include "core/css/MediaQueryEvaluator.h" 36 #include "core/css/MediaQueryEvaluator.h"
37 #include "core/dom/Attribute.h" 37 #include "core/dom/Attribute.h"
38 #include "core/dom/Event.h" 38 #include "core/dom/Event.h"
39 #include "core/dom/EventNames.h" 39 #include "core/dom/EventNames.h"
40 #include "core/dom/ExceptionCode.h" 40 #include "core/dom/ExceptionCode.h"
41 #include "core/dom/FullscreenElementStack.h" 41 #include "core/dom/FullscreenElementStack.h"
42 #include "core/dom/NodeRenderingContext.h"
43 #include "core/dom/shadow/ShadowRoot.h" 42 #include "core/dom/shadow/ShadowRoot.h"
44 #include "core/html/HTMLMediaSource.h" 43 #include "core/html/HTMLMediaSource.h"
45 #include "core/html/HTMLSourceElement.h" 44 #include "core/html/HTMLSourceElement.h"
46 #include "core/html/HTMLTrackElement.h" 45 #include "core/html/HTMLTrackElement.h"
47 #include "core/html/MediaController.h" 46 #include "core/html/MediaController.h"
48 #include "core/html/MediaError.h" 47 #include "core/html/MediaError.h"
49 #include "core/html/MediaFragmentURIParser.h" 48 #include "core/html/MediaFragmentURIParser.h"
50 #include "core/html/MediaKeyError.h" 49 #include "core/html/MediaKeyError.h"
51 #include "core/html/MediaKeyEvent.h" 50 #include "core/html/MediaKeyEvent.h"
52 #include "core/html/TimeRanges.h" 51 #include "core/html/TimeRanges.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 return; 478 return;
480 479
481 for (Node* node = firstChild(); node; node = node->nextSibling()) { 480 for (Node* node = firstChild(); node; node = node->nextSibling()) {
482 if (node->hasTagName(trackTag)) { 481 if (node->hasTagName(trackTag)) {
483 scheduleDelayedAction(LoadTextTrackResource); 482 scheduleDelayedAction(LoadTextTrackResource);
484 break; 483 break;
485 } 484 }
486 } 485 }
487 } 486 }
488 487
489 bool HTMLMediaElement::rendererIsNeeded(const NodeRenderingContext& context) 488 bool HTMLMediaElement::rendererIsNeeded(const RenderStyle& style)
490 { 489 {
491 return controls() ? HTMLElement::rendererIsNeeded(context) : false; 490 return controls() ? HTMLElement::rendererIsNeeded(style) : false;
492 } 491 }
493 492
494 RenderObject* HTMLMediaElement::createRenderer(RenderStyle*) 493 RenderObject* HTMLMediaElement::createRenderer(RenderStyle*)
495 { 494 {
496 return new RenderMedia(this); 495 return new RenderMedia(this);
497 } 496 }
498 497
499 bool HTMLMediaElement::childShouldCreateRenderer(const NodeRenderingContext& chi ldContext) const 498 bool HTMLMediaElement::childShouldCreateRenderer(const Node& child) const
500 { 499 {
501 return hasMediaControls() && HTMLElement::childShouldCreateRenderer(childCon text); 500 return hasMediaControls() && HTMLElement::childShouldCreateRenderer(child);
502 } 501 }
503 502
504 Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode* insertionPoint) 503 Node::InsertionNotificationRequest HTMLMediaElement::insertedInto(ContainerNode* insertionPoint)
505 { 504 {
506 LOG(Media, "HTMLMediaElement::insertedInto"); 505 LOG(Media, "HTMLMediaElement::insertedInto");
507 506
508 HTMLElement::insertedInto(insertionPoint); 507 HTMLElement::insertedInto(insertionPoint);
509 if (insertionPoint->inDocument()) { 508 if (insertionPoint->inDocument()) {
510 m_inActiveDocument = true; 509 m_inActiveDocument = true;
511 510
(...skipping 3471 matching lines...) Expand 10 before | Expand all | Expand 10 after
3983 { 3982 {
3984 m_restrictions = NoRestrictions; 3983 m_restrictions = NoRestrictions;
3985 } 3984 }
3986 3985
3987 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() 3986 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate()
3988 { 3987 {
3989 scheduleLayerUpdate(); 3988 scheduleLayerUpdate();
3990 } 3989 }
3991 3990
3992 } 3991 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/HTMLMeterElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698