8000 2008-12-16 David Hyatt <hyatt@apple.com> · WebKit/WebKit@80334b6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 80334b6

Browse files
author
David Hyatt
committed
2008-12-16 David Hyatt <hyatt@apple.com>
Make Safari RSS behave nicely with full page zoom. Need to add a new value to enable resetting of zoom back to the document-level default. Reviewed by Darin Adler * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/CSSValueKeywords.in: Canonical link: https://commits.webkit.org/31882@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent c1aa642 commit 80334b6

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

WebCore/ChangeLog

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2008-12-16 David Hyatt <hyatt@apple.com>
2+
3+
Make Safari RSS behave nicely with full page zoom. Need to add a new value to enable resetting of zoom
4+
back to the document-level default.
5+
6+
Reviewed by Darin Adler
7+
8+
* css/CSSParser.cpp:
9+
(WebCore::CSSParser::parseValue):
10+
* css/CSSStyleSelector.cpp:
11+
(WebCore::CSSStyleSelector::applyProperty):
12+
* css/CSSValueKeywords.in:
13+
114
2009-01-07 Darin Adler <darin@apple.com>
215

316
Reviewed by Oliver Hunt.

WebCore/css/CSSParser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,8 +1079,8 @@ bool CSSParser::parseValue(int propId, bool important)
10791079
}
10801080
break;
10811081

1082-
case CSSPropertyZoom: // normal | reset | <number> | <percentage> | inherit
1083-
if (id == CSSValueNormal || id == CSSValueReset)
1082+
case CSSPropertyZoom: // normal | reset | document | <number> | <percentage> | inherit
1083+
if (id == CSSValueNormal || id == CSSValueReset || id == CSSValueDocument)
10841084
valid_primitive = true;
10851085
else
10861086
valid_primitive = (!id && validUnit(value, FNumber | FPercent | FNonNeg, true));

WebCore/css/CSSStyleSelector.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4117,6 +4117,10 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
41174117
else if (primitiveValue->getIdent() == CSSValueReset) {
41184118
m_style->setEffectiveZoom(RenderStyle::initialZoom());
41194119
m_style->setZoom(RenderStyle::initialZoom());
4120+
} else if (primitiveValue->getIdent() == CSSValueDocument) {
4121+
float docZoom = m_checker.m_document->renderer()->style()->zoom();
4122+
m_style->setEffectiveZoom(docZoom);
4123+
m_style->setZoom(docZoom);
41204124
} else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) {
41214125
if (primitiveValue->getFloatValue())
41224126
m_style->setZoom(primitiveValue->getFloatValue() / 100.0f);

WebCore/css/CSSValueKeywords.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ ease-in-out
584584
#
585585
# CSS_PROP_ZOOM
586586
#
587+
document
587588
reset
588589

589590
#

0 commit comments

Comments
 (0)
0