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

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

Issue 327633004: Apply DEFINE/DECLARE_NODE_FACTORY(T) macro to element factories with single Document& argument. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/shadow/SliderThumbElement.h ('k') | Source/core/svg/SVGAElement.h » ('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) 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 } 437 }
438 } 438 }
439 439
440 // -------------------------------- 440 // --------------------------------
441 441
442 inline SliderContainerElement::SliderContainerElement(Document& document) 442 inline SliderContainerElement::SliderContainerElement(Document& document)
443 : HTMLDivElement(document) 443 : HTMLDivElement(document)
444 { 444 {
445 } 445 }
446 446
447 PassRefPtrWillBeRawPtr<SliderContainerElement> SliderContainerElement::create(Do cument& document) 447 DEFINE_NODE_FACTORY(SliderContainerElement)
448 {
449 return adoptRefWillBeRefCountedGarbageCollected(new SliderContainerElement(d ocument));
450 }
451 448
452 RenderObject* SliderContainerElement::createRenderer(RenderStyle*) 449 RenderObject* SliderContainerElement::createRenderer(RenderStyle*)
453 { 450 {
454 return new RenderSliderContainer(this); 451 return new RenderSliderContainer(this);
455 } 452 }
456 453
457 const AtomicString& SliderContainerElement::shadowPseudoId() const 454 const AtomicString& SliderContainerElement::shadowPseudoId() const
458 { 455 {
459 DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-medi a-slider-container", AtomicString::ConstructFromLiteral)); 456 DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-medi a-slider-container", AtomicString::ConstructFromLiteral));
460 DEFINE_STATIC_LOCAL(const AtomicString, sliderContainer, ("-webkit-slider-co ntainer", AtomicString::ConstructFromLiteral)); 457 DEFINE_STATIC_LOCAL(const AtomicString, sliderContainer, ("-webkit-slider-co ntainer", AtomicString::ConstructFromLiteral));
461 458
462 if (!shadowHost() || !shadowHost()->renderer()) 459 if (!shadowHost() || !shadowHost()->renderer())
463 return sliderContainer; 460 return sliderContainer;
464 461
465 RenderStyle* sliderStyle = shadowHost()->renderer()->style(); 462 RenderStyle* sliderStyle = shadowHost()->renderer()->style();
466 switch (sliderStyle->appearance()) { 463 switch (sliderStyle->appearance()) {
467 case MediaSliderPart: 464 case MediaSliderPart:
468 case MediaSliderThumbPart: 465 case MediaSliderThumbPart:
469 case MediaVolumeSliderPart: 466 case MediaVolumeSliderPart:
470 case MediaVolumeSliderThumbPart: 467 case MediaVolumeSliderThumbPart:
471 case MediaFullScreenVolumeSliderPart: 468 case MediaFullScreenVolumeSliderPart:
472 case MediaFullScreenVolumeSliderThumbPart: 469 case MediaFullScreenVolumeSliderThumbPart:
473 return mediaSliderContainer; 470 return mediaSliderContainer;
474 default: 471 default:
475 return sliderContainer; 472 return sliderContainer;
476 } 473 }
477 } 474 }
478 475
479 } 476 }
OLDNEW
« no previous file with comments | « Source/core/html/shadow/SliderThumbElement.h ('k') | Source/core/svg/SVGAElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698