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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 2846783005: Delete deprecated properties zoom:reset and zoom:document. (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 8 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
9 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 9 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
10 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 10 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 545
546 void StyleBuilderFunctions::applyValueCSSPropertyZoom(StyleResolverState& state, 546 void StyleBuilderFunctions::applyValueCSSPropertyZoom(StyleResolverState& state,
547 const CSSValue& value) { 547 const CSSValue& value) {
548 SECURITY_DCHECK(value.IsPrimitiveValue() || value.IsIdentifierValue()); 548 SECURITY_DCHECK(value.IsPrimitiveValue() || value.IsIdentifierValue());
549 549
550 if (value.IsIdentifierValue()) { 550 if (value.IsIdentifierValue()) {
551 const CSSIdentifierValue& identifier_value = ToCSSIdentifierValue(value); 551 const CSSIdentifierValue& identifier_value = ToCSSIdentifierValue(value);
552 if (identifier_value.GetValueID() == CSSValueNormal) { 552 if (identifier_value.GetValueID() == CSSValueNormal) {
553 ResetEffectiveZoom(state); 553 ResetEffectiveZoom(state);
554 state.SetZoom(ComputedStyle::InitialZoom()); 554 state.SetZoom(ComputedStyle::InitialZoom());
555 } else if (identifier_value.GetValueID() == CSSValueReset) {
556 state.SetEffectiveZoom(ComputedStyle::InitialZoom());
557 state.SetZoom(ComputedStyle::InitialZoom());
558 } else if (identifier_value.GetValueID() == CSSValueDocument) {
559 float doc_zoom = state.RootElementStyle()
560 ? state.RootElementStyle()->Zoom()
561 : ComputedStyle::InitialZoom();
562 state.SetEffectiveZoom(doc_zoom);
563 state.SetZoom(doc_zoom);
564 } 555 }
565 } else if (value.IsPrimitiveValue()) { 556 } else if (value.IsPrimitiveValue()) {
566 const CSSPrimitiveValue& primitive_value = ToCSSPrimitiveValue(value); 557 const CSSPrimitiveValue& primitive_value = ToCSSPrimitiveValue(value);
567 if (primitive_value.IsPercentage()) { 558 if (primitive_value.IsPercentage()) {
568 ResetEffectiveZoom(state); 559 ResetEffectiveZoom(state);
569 if (float percent = primitive_value.GetFloatValue()) 560 if (float percent = primitive_value.GetFloatValue())
570 state.SetZoom(percent / 100.0f); 561 state.SetZoom(percent / 100.0f);
571 } else if (primitive_value.IsNumber()) { 562 } else if (primitive_value.IsNumber()) {
572 ResetEffectiveZoom(state); 563 ResetEffectiveZoom(state);
573 if (float number = primitive_value.GetFloatValue()) 564 if (float number = primitive_value.GetFloatValue())
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 state.Style()->SetCaretColor( 988 state.Style()->SetCaretColor(
998 StyleBuilderConverter::ConvertStyleAutoColor(state, value)); 989 StyleBuilderConverter::ConvertStyleAutoColor(state, value));
999 } 990 }
1000 if (state.ApplyPropertyToVisitedLinkStyle()) { 991 if (state.ApplyPropertyToVisitedLinkStyle()) {
1001 state.Style()->SetVisitedLinkCaretColor( 992 state.Style()->SetVisitedLinkCaretColor(
1002 StyleBuilderConverter::ConvertStyleAutoColor(state, value, true)); 993 StyleBuilderConverter::ConvertStyleAutoColor(state, value, true));
1003 } 994 }
1004 } 995 }
1005 996
1006 } // namespace blink 997 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698