Need a way to ignore text-zoom in a Web page.
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Jul 2015 18:43:46 +0000 (18:43 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Jul 2015 18:43:46 +0000 (18:43 +0000)
commit1623dabf23240b3d8bbcace78783df6119c4325e
treea6fbbe513b3e966e56b142046f627df49570abe4
parent72b78459c4f1890bd8520f27ebe45e4d04ada6f8
Need a way to ignore text-zoom in a Web page.
https://bugs.webkit.org/show_bug.cgi?id=27092
rdar://problem/7037987

Reviewed by Simon Fraser.

Source/WebCore:

This patch adds a new property, -webkit-text-zoom, with values of normal and reset. The reset
keyword, just as with the zoom property, can be used to ignore any inherited zoom from the
document.

Added new test in fast/text.

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel):
(video::-webkit-media-controls-panel):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator ContentDistributionType):
(WebCore::CSSPrimitiveValue::operator TextZoom):
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueWebkitTextSizeAdjust):
(WebCore::StyleBuilderCustom::applyValueWebkitTextZoom):
(WebCore::StyleBuilderCustom::applyTextOrBoxShadowValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::checkForZoomChange):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
* style/StyleFontSizeFunctions.cpp:
(WebCore::Style::computedFontSizeFromSpecifiedSize):
* testing/Internals.cpp:
(WebCore::Internals::setPageZoomFactor):
(WebCore::Internals::setTextZoomFactor):
(WebCore::Internals::setUseFixedLayout):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* fast/text/text-zoom-reset-expected.html: Added.
* fast/text/text-zoom-reset.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/text/text-zoom-reset-expected.html [new file with mode: 0644]
LayoutTests/fast/text/text-zoom-reset.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediacontrols/mediaControlsApple.css
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/StyleBuilderConverter.h
Source/WebCore/css/StyleBuilderCustom.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.h
Source/WebCore/style/StyleFontSizeFunctions.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl