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

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

Issue 2327743002: Rename Node::shadowHost() to Node::ownerShadowHost() (Closed)
Patch Set: fix 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) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 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 are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 if (m_inDragMode) { 254 if (m_inDragMode) {
255 if (LocalFrame* frame = document().frame()) 255 if (LocalFrame* frame = document().frame())
256 frame->eventHandler().setCapturingMouseEventsNode(nullptr); 256 frame->eventHandler().setCapturingMouseEventsNode(nullptr);
257 } 257 }
258 HTMLDivElement::detachLayoutTree(context); 258 HTMLDivElement::detachLayoutTree(context);
259 } 259 }
260 260
261 HTMLInputElement* SliderThumbElement::hostInput() const 261 HTMLInputElement* SliderThumbElement::hostInput() const
262 { 262 {
263 // Only HTMLInputElement creates SliderThumbElement instances as its shadow nodes. 263 // Only HTMLInputElement creates SliderThumbElement instances as its shadow nodes.
264 // So, shadowHost() must be an HTMLInputElement. 264 // So, ownerShadowHost() must be an HTMLInputElement.
265 return toHTMLInputElement(shadowHost()); 265 return toHTMLInputElement(ownerShadowHost());
266 } 266 }
267 267
268 static const AtomicString& sliderThumbShadowPartId() 268 static const AtomicString& sliderThumbShadowPartId()
269 { 269 {
270 DEFINE_STATIC_LOCAL(const AtomicString, sliderThumb, ("-webkit-slider-thumb" )); 270 DEFINE_STATIC_LOCAL(const AtomicString, sliderThumb, ("-webkit-slider-thumb" ));
271 return sliderThumb; 271 return sliderThumb;
272 } 272 }
273 273
274 static const AtomicString& mediaSliderThumbShadowPartId() 274 static const AtomicString& mediaSliderThumbShadowPartId()
275 { 275 {
(...skipping 29 matching lines...) Expand all
305 , m_touchStarted(false) 305 , m_touchStarted(false)
306 , m_slidingDirection(NoMove) 306 , m_slidingDirection(NoMove)
307 { 307 {
308 updateTouchEventHandlerRegistry(); 308 updateTouchEventHandlerRegistry();
309 } 309 }
310 310
311 DEFINE_NODE_FACTORY(SliderContainerElement) 311 DEFINE_NODE_FACTORY(SliderContainerElement)
312 312
313 HTMLInputElement* SliderContainerElement::hostInput() const 313 HTMLInputElement* SliderContainerElement::hostInput() const
314 { 314 {
315 return toHTMLInputElement(shadowHost()); 315 return toHTMLInputElement(ownerShadowHost());
316 } 316 }
317 317
318 LayoutObject* SliderContainerElement::createLayoutObject(const ComputedStyle&) 318 LayoutObject* SliderContainerElement::createLayoutObject(const ComputedStyle&)
319 { 319 {
320 return new LayoutSliderContainer(this); 320 return new LayoutSliderContainer(this);
321 } 321 }
322 322
323 void SliderContainerElement::defaultEventHandler(Event* event) 323 void SliderContainerElement::defaultEventHandler(Event* event)
324 { 324 {
325 if (event->isTouchEvent()) { 325 if (event->isTouchEvent()) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 return false; 401 return false;
402 } 402 }
403 return true; 403 return true;
404 } 404 }
405 405
406 const AtomicString& SliderContainerElement::shadowPseudoId() const 406 const AtomicString& SliderContainerElement::shadowPseudoId() const
407 { 407 {
408 DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-medi a-slider-container")); 408 DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-medi a-slider-container"));
409 DEFINE_STATIC_LOCAL(const AtomicString, sliderContainer, ("-webkit-slider-co ntainer")); 409 DEFINE_STATIC_LOCAL(const AtomicString, sliderContainer, ("-webkit-slider-co ntainer"));
410 410
411 if (!shadowHost() || !shadowHost()->layoutObject()) 411 if (!ownerShadowHost() || !ownerShadowHost()->layoutObject())
412 return sliderContainer; 412 return sliderContainer;
413 413
414 const ComputedStyle& sliderStyle = shadowHost()->layoutObject()->styleRef(); 414 const ComputedStyle& sliderStyle = ownerShadowHost()->layoutObject()->styleR ef();
415 switch (sliderStyle.appearance()) { 415 switch (sliderStyle.appearance()) {
416 case MediaSliderPart: 416 case MediaSliderPart:
417 case MediaSliderThumbPart: 417 case MediaSliderThumbPart:
418 case MediaVolumeSliderPart: 418 case MediaVolumeSliderPart:
419 case MediaVolumeSliderThumbPart: 419 case MediaVolumeSliderThumbPart:
420 case MediaFullscreenVolumeSliderPart: 420 case MediaFullscreenVolumeSliderPart:
421 case MediaFullscreenVolumeSliderThumbPart: 421 case MediaFullscreenVolumeSliderThumbPart:
422 return mediaSliderContainer; 422 return mediaSliderContainer;
423 default: 423 default:
424 return sliderContainer; 424 return sliderContainer;
(...skipping 18 matching lines...) Expand all
443 HTMLElement::didMoveToNewDocument(oldDocument); 443 HTMLElement::didMoveToNewDocument(oldDocument);
444 } 444 }
445 445
446 void SliderContainerElement::removeAllEventListeners() 446 void SliderContainerElement::removeAllEventListeners()
447 { 447 {
448 Node::removeAllEventListeners(); 448 Node::removeAllEventListeners();
449 m_hasTouchEventHandler = false; 449 m_hasTouchEventHandler = false;
450 } 450 }
451 451
452 } // namespace blink 452 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698