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

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaControlElementTypes.cpp

Issue 2341423002: Don't include LayoutBlock.h from MediaControlElementTypes.h (Closed)
Patch Set: Created 4 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
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 20 matching lines...) Expand all
31 31
32 #include "bindings/core/v8/ExceptionStatePlaceholder.h" 32 #include "bindings/core/v8/ExceptionStatePlaceholder.h"
33 #include "core/CSSValueKeywords.h" 33 #include "core/CSSValueKeywords.h"
34 #include "core/HTMLNames.h" 34 #include "core/HTMLNames.h"
35 #include "core/css/StylePropertySet.h" 35 #include "core/css/StylePropertySet.h"
36 #include "core/dom/Text.h" 36 #include "core/dom/Text.h"
37 #include "core/events/MouseEvent.h" 37 #include "core/events/MouseEvent.h"
38 #include "core/html/HTMLLabelElement.h" 38 #include "core/html/HTMLLabelElement.h"
39 #include "core/html/HTMLMediaElement.h" 39 #include "core/html/HTMLMediaElement.h"
40 #include "core/html/shadow/MediaControls.h" 40 #include "core/html/shadow/MediaControls.h"
41 #include "core/layout/LayoutObject.h"
41 #include "platform/text/PlatformLocale.h" 42 #include "platform/text/PlatformLocale.h"
42 43
43 namespace blink { 44 namespace blink {
44 45
45 using namespace HTMLNames; 46 using namespace HTMLNames;
46 47
47 class Event; 48 class Event;
48 49
49 const HTMLMediaElement* toParentMediaElement(const Node* node) 50 const HTMLMediaElement* toParentMediaElement(const Node* node)
50 { 51 {
51 if (!node) 52 if (!node)
52 return nullptr; 53 return nullptr;
53 const Node* mediaNode = node->ownerShadowHost(); 54 const Node* mediaNode = node->ownerShadowHost();
54 if (!mediaNode) 55 if (!mediaNode)
55 return nullptr; 56 return nullptr;
56 if (!isHTMLMediaElement(mediaNode)) 57 if (!isHTMLMediaElement(mediaNode))
57 return nullptr; 58 return nullptr;
58 59
59 return toHTMLMediaElement(mediaNode); 60 return toHTMLMediaElement(mediaNode);
60 } 61 }
61 62
63 const HTMLMediaElement* toParentMediaElement(const LayoutObject& layoutObject)
64 {
65 return toParentMediaElement(layoutObject.node());
66 }
67
62 MediaControlElementType mediaControlElementType(const Node* node) 68 MediaControlElementType mediaControlElementType(const Node* node)
63 { 69 {
64 SECURITY_DCHECK(node->isMediaControlElement()); 70 SECURITY_DCHECK(node->isMediaControlElement());
65 const HTMLElement* element = toHTMLElement(node); 71 const HTMLElement* element = toHTMLElement(node);
66 if (isHTMLInputElement(*element)) 72 if (isHTMLInputElement(*element))
67 return static_cast<const MediaControlInputElement*>(element)->displayTyp e(); 73 return static_cast<const MediaControlInputElement*>(element)->displayTyp e();
68 return static_cast<const MediaControlDivElement*>(element)->displayType(); 74 return static_cast<const MediaControlDivElement*>(element)->displayType();
69 } 75 }
70 76
71 MediaControlElement::MediaControlElement(MediaControls& mediaControls, MediaCont rolElementType displayType, HTMLElement* element) 77 MediaControlElement::MediaControlElement(MediaControls& mediaControls, MediaCont rolElementType displayType, HTMLElement* element)
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 , m_currentValue(0) 215 , m_currentValue(0)
210 { 216 {
211 } 217 }
212 218
213 void MediaControlTimeDisplayElement::setCurrentValue(double time) 219 void MediaControlTimeDisplayElement::setCurrentValue(double time)
214 { 220 {
215 m_currentValue = time; 221 m_currentValue = time;
216 } 222 }
217 223
218 } // namespace blink 224 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698