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

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

Issue 20231002: Replace RenderArena with PartitionAlloc (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 7 years, 4 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
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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 { 214 {
215 // Since the code to calculate position is in the RenderSliderThumb layout 215 // Since the code to calculate position is in the RenderSliderThumb layout
216 // path, we don't actually update the value here. Instead, we poke at the 216 // path, we don't actually update the value here. Instead, we poke at the
217 // renderer directly to trigger layout. 217 // renderer directly to trigger layout.
218 if (renderer()) 218 if (renderer())
219 renderer()->setNeedsLayout(true); 219 renderer()->setNeedsLayout(true);
220 } 220 }
221 221
222 RenderObject* SliderThumbElement::createRenderer(RenderStyle*) 222 RenderObject* SliderThumbElement::createRenderer(RenderStyle*)
223 { 223 {
224 return new (document()->renderArena()) RenderSliderThumb(this); 224 return new RenderSliderThumb(this);
225 } 225 }
226 226
227 bool SliderThumbElement::isDisabledFormControl() const 227 bool SliderThumbElement::isDisabledFormControl() const
228 { 228 {
229 return hostInput() && hostInput()->isDisabledFormControl(); 229 return hostInput() && hostInput()->isDisabledFormControl();
230 } 230 }
231 231
232 bool SliderThumbElement::matchesReadOnlyPseudoClass() const 232 bool SliderThumbElement::matchesReadOnlyPseudoClass() const
233 { 233 {
234 return hostInput()->matchesReadOnlyPseudoClass(); 234 return hostInput()->matchesReadOnlyPseudoClass();
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 { 442 {
443 } 443 }
444 444
445 PassRefPtr<SliderContainerElement> SliderContainerElement::create(Document* docu ment) 445 PassRefPtr<SliderContainerElement> SliderContainerElement::create(Document* docu ment)
446 { 446 {
447 return adoptRef(new SliderContainerElement(document)); 447 return adoptRef(new SliderContainerElement(document));
448 } 448 }
449 449
450 RenderObject* SliderContainerElement::createRenderer(RenderStyle*) 450 RenderObject* SliderContainerElement::createRenderer(RenderStyle*)
451 { 451 {
452 return new (document()->renderArena()) RenderSliderContainer(this); 452 return new RenderSliderContainer(this);
453 } 453 }
454 454
455 const AtomicString& SliderContainerElement::shadowPseudoId() const 455 const AtomicString& SliderContainerElement::shadowPseudoId() const
456 { 456 {
457 DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-medi a-slider-container", AtomicString::ConstructFromLiteral)); 457 DEFINE_STATIC_LOCAL(const AtomicString, mediaSliderContainer, ("-webkit-medi a-slider-container", AtomicString::ConstructFromLiteral));
458 DEFINE_STATIC_LOCAL(const AtomicString, sliderContainer, ("-webkit-slider-co ntainer", AtomicString::ConstructFromLiteral)); 458 DEFINE_STATIC_LOCAL(const AtomicString, sliderContainer, ("-webkit-slider-co ntainer", AtomicString::ConstructFromLiteral));
459 459
460 if (!shadowHost()->hasTagName(inputTag)) 460 if (!shadowHost()->hasTagName(inputTag))
461 return sliderContainer; 461 return sliderContainer;
462 462
463 RenderStyle* sliderStyle = toHTMLInputElement(shadowHost())->renderer()->sty le(); 463 RenderStyle* sliderStyle = toHTMLInputElement(shadowHost())->renderer()->sty le();
464 switch (sliderStyle->appearance()) { 464 switch (sliderStyle->appearance()) {
465 case MediaSliderPart: 465 case MediaSliderPart:
466 case MediaSliderThumbPart: 466 case MediaSliderThumbPart:
467 case MediaVolumeSliderPart: 467 case MediaVolumeSliderPart:
468 case MediaVolumeSliderThumbPart: 468 case MediaVolumeSliderThumbPart:
469 case MediaFullScreenVolumeSliderPart: 469 case MediaFullScreenVolumeSliderPart:
470 case MediaFullScreenVolumeSliderThumbPart: 470 case MediaFullScreenVolumeSliderThumbPart:
471 return mediaSliderContainer; 471 return mediaSliderContainer;
472 default: 472 default:
473 return sliderContainer; 473 return sliderContainer;
474 } 474 }
475 } 475 }
476 476
477 } 477 }
OLDNEW
« no previous file with comments | « Source/core/html/shadow/ProgressShadowElement.cpp ('k') | Source/core/html/shadow/TextControlInnerElements.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698