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

Side by Side Diff: Source/core/rendering/style/RenderStyle.cpp

Issue 43873004: Relayout RenderObjects with viewport-percentage CSS properties when viewport size changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 return StyleDifferenceRepaintIfTextOrColorChange; 700 return StyleDifferenceRepaintIfTextOrColorChange;
701 701
702 // Cursors are not checked, since they will be set appropriately in response to mouse events, 702 // Cursors are not checked, since they will be set appropriately in response to mouse events,
703 // so they don't need to cause any repaint or layout. 703 // so they don't need to cause any repaint or layout.
704 704
705 // Animations don't need to be checked either. We always set the new style on the RenderObject, so we will get a chance to fire off 705 // Animations don't need to be checked either. We always set the new style on the RenderObject, so we will get a chance to fire off
706 // the resulting transition properly. 706 // the resulting transition properly.
707 return StyleDifferenceEqual; 707 return StyleDifferenceEqual;
708 } 708 }
709 709
710 void RenderStyle::setClip(Length top, Length right, Length bottom, Length left)
711 {
712 StyleVisualData* data = visual.access();
713 data->clip.m_top = top;
714 data->clip.m_right = right;
715 data->clip.m_bottom = bottom;
716 data->clip.m_left = left;
717 }
718
719 void RenderStyle::addCursor(PassRefPtr<StyleImage> image, const IntPoint& hotSpo t) 710 void RenderStyle::addCursor(PassRefPtr<StyleImage> image, const IntPoint& hotSpo t)
720 { 711 {
721 if (!rareInheritedData.access()->cursorData) 712 if (!rareInheritedData.access()->cursorData)
722 rareInheritedData.access()->cursorData = CursorList::create(); 713 rareInheritedData.access()->cursorData = CursorList::create();
723 rareInheritedData.access()->cursorData->append(CursorData(image, hotSpot)); 714 rareInheritedData.access()->cursorData->append(CursorData(image, hotSpot));
724 } 715 }
725 716
726 void RenderStyle::setCursorList(PassRefPtr<CursorList> other) 717 void RenderStyle::setCursorList(PassRefPtr<CursorList> other)
727 { 718 {
728 rareInheritedData.access()->cursorData = other; 719 rareInheritedData.access()->cursorData = other;
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 if (surround->border.m_image.image() == image.get()) 1592 if (surround->border.m_image.image() == image.get())
1602 return; 1593 return;
1603 surround.access()->border.m_image.setImage(image); 1594 surround.access()->border.m_image.setImage(image);
1604 } 1595 }
1605 1596
1606 void RenderStyle::setBorderImageSlices(LengthBox slices) 1597 void RenderStyle::setBorderImageSlices(LengthBox slices)
1607 { 1598 {
1608 if (surround->border.m_image.imageSlices() == slices) 1599 if (surround->border.m_image.imageSlices() == slices)
1609 return; 1600 return;
1610 surround.access()->border.m_image.setImageSlices(slices); 1601 surround.access()->border.m_image.setImageSlices(slices);
1602 updateMayHaveViewportPercentage(slices);
1611 } 1603 }
1612 1604
1613 void RenderStyle::setBorderImageWidth(LengthBox slices) 1605 void RenderStyle::setBorderImageWidth(LengthBox slices)
1614 { 1606 {
1615 if (surround->border.m_image.borderSlices() == slices) 1607 if (surround->border.m_image.borderSlices() == slices)
1616 return; 1608 return;
1617 surround.access()->border.m_image.setBorderSlices(slices); 1609 surround.access()->border.m_image.setBorderSlices(slices);
1610 updateMayHaveViewportPercentage(slices);
1618 } 1611 }
1619 1612
1620 void RenderStyle::setBorderImageOutset(LengthBox outset) 1613 void RenderStyle::setBorderImageOutset(LengthBox outset)
1621 { 1614 {
1622 if (surround->border.m_image.outset() == outset) 1615 if (surround->border.m_image.outset() == outset)
1623 return; 1616 return;
1624 surround.access()->border.m_image.setOutset(outset); 1617 surround.access()->border.m_image.setOutset(outset);
1618 updateMayHaveViewportPercentage(outset);
1625 } 1619 }
1626 1620
1627 ShapeValue* RenderStyle::initialShapeInside() 1621 ShapeValue* RenderStyle::initialShapeInside()
1628 { 1622 {
1629 DEFINE_STATIC_LOCAL(RefPtr<ShapeValue>, sOutsideValue, (ShapeValue::createOu tsideValue())); 1623 DEFINE_STATIC_LOCAL(RefPtr<ShapeValue>, sOutsideValue, (ShapeValue::createOu tsideValue()));
1630 return sOutsideValue.get(); 1624 return sOutsideValue.get();
1631 } 1625 }
1632 1626
1633 } // namespace WebCore 1627 } // namespace WebCore
OLDNEW
« Source/core/rendering/style/RenderStyle.h ('K') | « Source/core/rendering/style/RenderStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698