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

Side by Side Diff: trunk/Source/core/layout/style/LayoutStyle.h

Issue 948053002: Revert 190605 "Make RenderObject::style() return a const object" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 mutable unsigned hasViewportUnits : 1; 251 mutable unsigned hasViewportUnits : 1;
252 252
253 // 32 bits 253 // 32 bits
254 254
255 unsigned pageBreakBefore : 2; // EPageBreak 255 unsigned pageBreakBefore : 2; // EPageBreak
256 unsigned pageBreakAfter : 2; // EPageBreak 256 unsigned pageBreakAfter : 2; // EPageBreak
257 unsigned pageBreakInside : 2; // EPageBreak 257 unsigned pageBreakInside : 2; // EPageBreak
258 258
259 unsigned styleType : 6; // PseudoId 259 unsigned styleType : 6; // PseudoId
260 unsigned pseudoBits : 8; 260 unsigned pseudoBits : 8;
261 // FIXME: |explicitInheritance| should be moved to ElementRareData. 261 unsigned explicitInheritance : 1; // Explicitly inherits a non-inherited property
262 mutable unsigned explicitInheritance : 1; // Explicitly inherits a non-i nherited property 262 unsigned unique : 1; // Style can not be shared.
263 mutable unsigned unique : 1; // Style can not be shared.
264 263
265 unsigned emptyState : 1; 264 unsigned emptyState : 1;
266 265
267 unsigned affectedByFocus : 1; 266 unsigned affectedByFocus : 1;
268 unsigned affectedByHover : 1; 267 unsigned affectedByHover : 1;
269 unsigned affectedByActive : 1; 268 unsigned affectedByActive : 1;
270 unsigned affectedByDrag : 1; 269 unsigned affectedByDrag : 1;
271 270
272 unsigned isLink : 1; 271 unsigned isLink : 1;
273 // If you add more style bits here, you will also need to update LayoutS tyle::copyNonInheritedFrom() 272 // If you add more style bits here, you will also need to update LayoutS tyle::copyNonInheritedFrom()
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 { 1453 {
1455 if (v == writingMode()) 1454 if (v == writingMode())
1456 return false; 1455 return false;
1457 1456
1458 inherited_flags.m_writingMode = v; 1457 inherited_flags.m_writingMode = v;
1459 return true; 1458 return true;
1460 } 1459 }
1461 1460
1462 // A unique style is one that has matches something that makes it impossible to share. 1461 // A unique style is one that has matches something that makes it impossible to share.
1463 bool unique() const { return noninherited_flags.unique; } 1462 bool unique() const { return noninherited_flags.unique; }
1464 void setUnique() const { noninherited_flags.unique = true; } 1463 void setUnique() { noninherited_flags.unique = true; }
1465 1464
1466 bool isSharable() const; 1465 bool isSharable() const;
1467 1466
1468 bool emptyState() const { return noninherited_flags.emptyState; } 1467 bool emptyState() const { return noninherited_flags.emptyState; }
1469 void setEmptyState(bool b) { setUnique(); noninherited_flags.emptyState = b; } 1468 void setEmptyState(bool b) { setUnique(); noninherited_flags.emptyState = b; }
1470 1469
1471 Color visitedDependentColor(int colorProperty) const; 1470 Color visitedDependentColor(int colorProperty) const;
1472 1471
1473 void setHasExplicitlyInheritedProperties() const { noninherited_flags.explic itInheritance = true; } 1472 void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInhe ritance = true; }
1474 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex plicitInheritance; } 1473 bool hasExplicitlyInheritedProperties() const { return noninherited_flags.ex plicitInheritance; }
1475 1474
1476 bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() || hasOutline() || hasAppearance() || boxShadow() || hasFilter() || resize() != RES IZE_NONE; } 1475 bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() || hasOutline() || hasAppearance() || boxShadow() || hasFilter() || resize() != RES IZE_NONE; }
1477 1476
1478 bool borderObscuresBackground() const; 1477 bool borderObscuresBackground() const;
1479 void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = tru e, bool includeLogicalRightEdge = true) const; 1478 void getBorderEdgeInfo(BorderEdge edges[], bool includeLogicalLeftEdge = tru e, bool includeLogicalRightEdge = true) const;
1480 1479
1481 // Initial values for all the properties 1480 // Initial values for all the properties
1482 static EBorderCollapse initialBorderCollapse() { return BSEPARATE; } 1481 static EBorderCollapse initialBorderCollapse() { return BSEPARATE; }
1483 static EBorderStyle initialBorderStyle() { return BNONE; } 1482 static EBorderStyle initialBorderStyle() { return BNONE; }
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 } 1854 }
1856 1855
1857 inline bool LayoutStyle::hasPseudoElementStyle() const 1856 inline bool LayoutStyle::hasPseudoElementStyle() const
1858 { 1857 {
1859 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; 1858 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK;
1860 } 1859 }
1861 1860
1862 } // namespace blink 1861 } // namespace blink
1863 1862
1864 #endif // LayoutStyle_h 1863 #endif // LayoutStyle_h
OLDNEW
« no previous file with comments | « trunk/Source/core/layout/line/BreakingContextInlineHeaders.h ('k') | trunk/Source/core/layout/style/LayoutStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698