Changeset 294746 in webkit
- Timestamp:
- May 24, 2022, 8:01:15 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
html/shadow/SliderThumbElement.cpp (modified) (1 diff)
-
rendering/RenderTheme.cpp (modified) (1 diff)
-
rendering/RenderTheme.h (modified) (1 diff)
-
rendering/RenderThemeMac.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp
r294728 r294746 78 78 79 79 #if ENABLE(VIDEO) 80 if (sliderStyle.effectiveAppearance() == MediaVolumeSliderPart && input.renderer()->theme().usesVerticalVolumeSlider())80 if (sliderStyle.effectiveAppearance() == MediaVolumeSliderPart) 81 81 return true; 82 82 #endif -
trunk/Source/WebCore/rendering/RenderTheme.cpp
r294680 r294746 698 698 } 699 699 } 700 701 #if ENABLE(VIDEO)702 703 String RenderTheme::formatMediaControlsTime(float time) const704 {705 if (!std::isfinite(time))706 time = 0;707 // FIXME: Seems like it would be better to use std::lround here.708 int seconds = static_cast<int>(std::abs(time));709 int hours = seconds / (60 * 60);710 int minutes = (seconds / 60) % 60;711 seconds %= 60;712 if (hours)713 return makeString((time < 0 ? "-" : ""), hours, ':', pad('0', 2, minutes), ':', pad('0', 2, seconds));714 return makeString((time < 0 ? "-" : ""), pad('0', 2, minutes), ':', pad('0', 2, seconds));715 }716 717 String RenderTheme::formatMediaControlsCurrentTime(float currentTime, float /*duration*/) const718 {719 return formatMediaControlsTime(currentTime);720 }721 722 String RenderTheme::formatMediaControlsRemainingTime(float currentTime, float duration) const723 {724 return formatMediaControlsTime(currentTime - duration);725 }726 727 LayoutPoint RenderTheme::volumeSliderOffsetFromMuteButton(const RenderBox& muteButtonBox, const LayoutSize& size) const728 {729 LayoutUnit y = -size.height();730 FloatPoint absPoint = muteButtonBox.localToAbsolute(FloatPoint(muteButtonBox.offsetLeft(), y), { IsFixed, UseTransforms });731 if (absPoint.y() < 0)732 y = muteButtonBox.height();733 return LayoutPoint(0_lu, y);734 }735 736 #endif737 700 738 701 Color RenderTheme::activeSelectionBackgroundColor(OptionSet<StyleColorOptions> options) const -
trunk/Source/WebCore/rendering/RenderTheme.h
r294640 r294746 207 207 virtual IntRect progressBarRectForBounds(const RenderObject&, const IntRect&) const; 208 208 209 #if ENABLE(VIDEO)210 // Media controls211 virtual bool supportsClosedCaptioning() const { return false; }212 virtual bool hasOwnDisabledStateHandlingFor(ControlPart) const { return false; }213 virtual bool usesMediaControlStatusDisplay() { return false; }214 virtual bool usesMediaControlVolumeSlider() const { return true; }215 virtual bool usesVerticalVolumeSlider() const { return true; }216 virtual double mediaControlsFadeInDuration() { return 0.1; }217 virtual Seconds mediaControlsFadeOutDuration() { return 300_ms; }218 virtual String formatMediaControlsTime(float time) const;219 virtual String formatMediaControlsCurrentTime(float currentTime, float duration) const;220 virtual String formatMediaControlsRemainingTime(float currentTime, float duration) const;221 222 // Returns the media volume slider container's offset from the mute button.223 virtual LayoutPoint volumeSliderOffsetFromMuteButton(const RenderBox&, const LayoutSize&) const;224 #endif225 226 209 virtual IntSize meterSizeForBounds(const RenderMeter&, const IntRect&) const; 227 210 virtual bool supportsMeter(ControlPart, const HTMLMeterElement&) const; -
trunk/Source/WebCore/rendering/RenderThemeMac.h
r294680 r294746 151 151 #endif 152 152 153 #if ENABLE(VIDEO)154 bool supportsClosedCaptioning() const final { return true; }155 #endif156 157 153 #if ENABLE(ATTACHMENT_ELEMENT) 158 154 LayoutSize attachmentIntrinsicSize(const RenderAttachment&) const final;
Note:
See TracChangeset
for help on using the changeset viewer.