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

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

Issue 22417002: Rename ASSERT_NO_EXCEPTION_STATE and IGNORE_EXCEPTION_STATE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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) 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 double left = position.x(); 155 double left = position.x();
156 double top = position.y(); 156 double top = position.y();
157 157
158 // Set the left and top to control the panel's position; this depends on it being absolute positioned. 158 // Set the left and top to control the panel's position; this depends on it being absolute positioned.
159 // Set the margin to zero since the position passed in will already include the effect of the margin. 159 // Set the margin to zero since the position passed in will already include the effect of the margin.
160 setInlineStyleProperty(CSSPropertyLeft, left, CSSPrimitiveValue::CSS_PX); 160 setInlineStyleProperty(CSSPropertyLeft, left, CSSPrimitiveValue::CSS_PX);
161 setInlineStyleProperty(CSSPropertyTop, top, CSSPrimitiveValue::CSS_PX); 161 setInlineStyleProperty(CSSPropertyTop, top, CSSPrimitiveValue::CSS_PX);
162 setInlineStyleProperty(CSSPropertyMarginLeft, 0.0, CSSPrimitiveValue::CSS_PX ); 162 setInlineStyleProperty(CSSPropertyMarginLeft, 0.0, CSSPrimitiveValue::CSS_PX );
163 setInlineStyleProperty(CSSPropertyMarginTop, 0.0, CSSPrimitiveValue::CSS_PX) ; 163 setInlineStyleProperty(CSSPropertyMarginTop, 0.0, CSSPrimitiveValue::CSS_PX) ;
164 164
165 classList()->add("dragged", IGNORE_EXCEPTION_STATE); 165 classList()->add("dragged", IGNORE_EXCEPTION);
166 } 166 }
167 167
168 void MediaControlPanelElement::resetPosition() 168 void MediaControlPanelElement::resetPosition()
169 { 169 {
170 removeInlineStyleProperty(CSSPropertyLeft); 170 removeInlineStyleProperty(CSSPropertyLeft);
171 removeInlineStyleProperty(CSSPropertyTop); 171 removeInlineStyleProperty(CSSPropertyTop);
172 removeInlineStyleProperty(CSSPropertyMarginLeft); 172 removeInlineStyleProperty(CSSPropertyMarginLeft);
173 removeInlineStyleProperty(CSSPropertyMarginTop); 173 removeInlineStyleProperty(CSSPropertyMarginTop);
174 174
175 classList()->remove("dragged", IGNORE_EXCEPTION_STATE); 175 classList()->remove("dragged", IGNORE_EXCEPTION);
176 176
177 m_cumulativeDragOffset.setX(0); 177 m_cumulativeDragOffset.setX(0);
178 m_cumulativeDragOffset.setY(0); 178 m_cumulativeDragOffset.setY(0);
179 } 179 }
180 180
181 void MediaControlPanelElement::makeOpaque() 181 void MediaControlPanelElement::makeOpaque()
182 { 182 {
183 if (m_opaque) 183 if (m_opaque)
184 return; 184 return;
185 185
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 if (event->type() == eventNames().mouseupEvent) 493 if (event->type() == eventNames().mouseupEvent)
494 mediaController()->endScrubbing(); 494 mediaController()->endScrubbing();
495 495
496 MediaControlInputElement::defaultEventHandler(event); 496 MediaControlInputElement::defaultEventHandler(event);
497 497
498 if (event->type() == eventNames().mouseoverEvent || event->type() == eventNa mes().mouseoutEvent || event->type() == eventNames().mousemoveEvent) 498 if (event->type() == eventNames().mouseoverEvent || event->type() == eventNa mes().mouseoutEvent || event->type() == eventNames().mousemoveEvent)
499 return; 499 return;
500 500
501 double time = value().toDouble(); 501 double time = value().toDouble();
502 if (event->type() == eventNames().inputEvent && time != mediaController()->c urrentTime()) 502 if (event->type() == eventNames().inputEvent && time != mediaController()->c urrentTime())
503 mediaController()->setCurrentTime(time, IGNORE_EXCEPTION_STATE); 503 mediaController()->setCurrentTime(time, IGNORE_EXCEPTION);
504 504
505 RenderSlider* slider = toRenderSlider(renderer()); 505 RenderSlider* slider = toRenderSlider(renderer());
506 if (slider && slider->inDragMode()) 506 if (slider && slider->inDragMode())
507 m_controls->updateCurrentTimeDisplay(); 507 m_controls->updateCurrentTimeDisplay();
508 } 508 }
509 509
510 bool MediaControlTimelineElement::willRespondToMouseClickEvents() 510 bool MediaControlTimelineElement::willRespondToMouseClickEvents()
511 { 511 {
512 if (!attached()) 512 if (!attached())
513 return false; 513 return false;
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 #if ENABLE(WEBVTT_REGIONS) 743 #if ENABLE(WEBVTT_REGIONS)
744 String regionId = cue->regionId(); 744 String regionId = cue->regionId();
745 TextTrackRegion* region = cue->track()->regions()->getRegionById(regionI d); 745 TextTrackRegion* region = cue->track()->regions()->getRegionById(regionI d);
746 if (!region) { 746 if (!region) {
747 // If cue has an empty text track cue region identifier or there is no 747 // If cue has an empty text track cue region identifier or there is no
748 // WebVTT region whose region identifier is identical to cue's text 748 // WebVTT region whose region identifier is identical to cue's text
749 // track cue region identifier, run the following substeps: 749 // track cue region identifier, run the following substeps:
750 #endif 750 #endif
751 if (displayBox->hasChildNodes() && !contains(displayBox.get())) { 751 if (displayBox->hasChildNodes() && !contains(displayBox.get())) {
752 // Note: the display tree of a cue is removed when the active fl ag of the cue is unset. 752 // Note: the display tree of a cue is removed when the active fl ag of the cue is unset.
753 appendChild(displayBox, ASSERT_NO_EXCEPTION_STATE, AttachNow); 753 appendChild(displayBox, ASSERT_NO_EXCEPTION, AttachNow);
754 } 754 }
755 #if ENABLE(WEBVTT_REGIONS) 755 #if ENABLE(WEBVTT_REGIONS)
756 } else { 756 } else {
757 // Let region be the WebVTT region whose region identifier 757 // Let region be the WebVTT region whose region identifier
758 // matches the text track cue region identifier of cue. 758 // matches the text track cue region identifier of cue.
759 RefPtr<HTMLDivElement> regionNode = region->getDisplayTree(); 759 RefPtr<HTMLDivElement> regionNode = region->getDisplayTree();
760 760
761 // Append the region to the viewport, if it was not already. 761 // Append the region to the viewport, if it was not already.
762 if (!contains(regionNode.get())) 762 if (!contains(regionNode.get()))
763 appendChild(region->getDisplayTree()); 763 appendChild(region->getDisplayTree());
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 CueList activeCues = mediaElement->currentlyActiveCues(); 804 CueList activeCues = mediaElement->currentlyActiveCues();
805 for (size_t i = 0; i < activeCues.size(); ++i) { 805 for (size_t i = 0; i < activeCues.size(); ++i) {
806 TextTrackCue* cue = activeCues[i].data(); 806 TextTrackCue* cue = activeCues[i].data();
807 cue->videoSizeDidChange(m_videoDisplaySize.size()); 807 cue->videoSizeDidChange(m_videoDisplaySize.size());
808 } 808 }
809 } 809 }
810 810
811 // ---------------------------- 811 // ----------------------------
812 812
813 } // namespace WebCore 813 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/shadow/MediaControlElementTypes.cpp ('k') | Source/core/html/shadow/MediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698