Clean up Marquee-related enums
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Jan 2018 00:05:46 +0000 (00:05 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Jan 2018 00:05:46 +0000 (00:05 +0000)
commitea40679e1e1099162bbf48341ab342d27c9c427b
treef60c1d49ae4e2ad04142a2887c2f598fd9da56b1
parenta906bbecb4e9d1c6eb16a4afd3a34c81b442243b
Clean up Marquee-related enums
https://bugs.webkit.org/show_bug.cgi?id=181347

Reviewed by Anders Carlsson.

Modernize EMarqueeBehavior and EMarqueeDirection enums. Stop using the weird negative
values in the MarqueeDirection and do manual reverse direction mapping.

Make some member functions of RenderMarquee private.

Stop using bitfields in RenderMarquee because the memory saving is not worth it, and doing so
allows us to use modern initialization.

No behavior change.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator MarqueeBehavior const):
(WebCore::CSSPrimitiveValue::operator MarqueeDirection const):
(WebCore::CSSPrimitiveValue::operator EMarqueeBehavior const): Deleted.
(WebCore::CSSPrimitiveValue::operator EMarqueeDirection const): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::sizesLogicalWidthToFitContent const):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::RenderMarquee):
(WebCore::reverseDirection):
(WebCore::RenderMarquee::direction const):
(WebCore::RenderMarquee::isHorizontal const):
(WebCore::RenderMarquee::computePosition):
(WebCore::RenderMarquee::start):
(WebCore::RenderMarquee::updateMarqueePosition):
(WebCore::RenderMarquee::updateMarqueeStyle):
(WebCore::RenderMarquee::timerFired):
* rendering/RenderMarquee.h:
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::marqueeBehavior const):
(WebCore::RenderStyle::marqueeDirection const):
(WebCore::RenderStyle::setMarqueeDirection):
(WebCore::RenderStyle::setMarqueeBehavior):
(WebCore::RenderStyle::initialMarqueeBehavior):
(WebCore::RenderStyle::initialMarqueeDirection):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleMarqueeData.cpp:
(WebCore::StyleMarqueeData::StyleMarqueeData):
* rendering/style/StyleMarqueeData.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderMarquee.cpp
Source/WebCore/rendering/RenderMarquee.h
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/style/StyleMarqueeData.cpp
Source/WebCore/rendering/style/StyleMarqueeData.h