Chromium Code Reviews

Side by Side Diff: Source/core/rendering/style/RenderStyleConstants.h

Issue 236203020: Separate repaint and layout requirements of StyleDifference (Step 1) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update layout test expectations Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | 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 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 26 matching lines...)
37 Reattach, 37 Reattach,
38 ReattachNoRenderer 38 ReattachNoRenderer
39 }; 39 };
40 40
41 static const size_t PrintColorAdjustBits = 1; 41 static const size_t PrintColorAdjustBits = 1;
42 enum PrintColorAdjust { 42 enum PrintColorAdjust {
43 PrintColorAdjustEconomy, 43 PrintColorAdjustEconomy,
44 PrintColorAdjustExact 44 PrintColorAdjustExact
45 }; 45 };
46 46
47 // The difference between two styles. The following values are used:
48 // - StyleDifferenceEqual - The two styles are identical.
49 // FIXME: When style difference is context sensitive, RenderStyle::visualInval idationDiff() may return
50 // StyleDifferenceEqual even there is difference. Will resolve the issue when fixing crbug.com/358460.
51 // - StyleDifferenceRecompositeLayer - The layer needs its position and transfor m updated, but no repaint.
52 // - StyleDifferenceRepaint - The object just needs to be repainted.
53 // - StyleDifferenceRepaintLayer - The layer and its descendant layers need to b e repainted.
54 // - StyleDifferenceLayoutPositionedMovementOnly - Only the position of this pos itioned object has been updated.
55 // - StyleDifferenceSimplifiedLayout - Only overflow needs to be recomputed.
56 // - StyleDifferenceSimplifiedLayoutAndPositionedMovement - Both positioned move ment and simplified layout updates are required.
57 // - StyleDifferenceLayout - A full layout is required.
58 enum StyleDifference {
59 StyleDifferenceEqual,
60 StyleDifferenceRecompositeLayer,
61 StyleDifferenceRepaint,
62 StyleDifferenceRepaintLayer,
63 StyleDifferenceLayoutPositionedMovementOnly,
64 StyleDifferenceSimplifiedLayout,
65 StyleDifferenceSimplifiedLayoutAndPositionedMovement,
66 StyleDifferenceLayout
67 };
68
69 // When some style properties change, different amounts of work have to be done depending on
70 // context (e.g. whether the property is changing on an element which has a comp ositing layer).
71 // A simple StyleDifference does not provide enough information so we return a b it mask of
72 // StyleDifferenceContextSensitiveProperties from RenderStyle::visualInvalidatio nDiff() too.
73 enum StyleDifferenceContextSensitiveProperty {
74 ContextSensitivePropertyNone = 0,
75 ContextSensitivePropertyTransform = (1 << 0),
76 ContextSensitivePropertyOpacity = (1 << 1),
77 ContextSensitivePropertyFilter = (1 << 2),
78 // The object needs to be repainted if it contains text or properties depend ent on color (e.g., border or outline).
79 ContextSensitivePropertyTextOrColor = (1 << 3)
80 };
81
82 // Static pseudo styles. Dynamic ones are produced on the fly. 47 // Static pseudo styles. Dynamic ones are produced on the fly.
83 enum PseudoId { 48 enum PseudoId {
84 // The order must be NOP ID, public IDs, and then internal IDs. 49 // The order must be NOP ID, public IDs, and then internal IDs.
85 // If you add or remove a public ID, you must update _pseudoBits in RenderSt yle. 50 // If you add or remove a public ID, you must update _pseudoBits in RenderSt yle.
86 NOPSEUDO, FIRST_LINE, FIRST_LETTER, BEFORE, AFTER, BACKDROP, SELECTION, FIRS T_LINE_INHERITED, SCROLLBAR, 51 NOPSEUDO, FIRST_LINE, FIRST_LETTER, BEFORE, AFTER, BACKDROP, SELECTION, FIRS T_LINE_INHERITED, SCROLLBAR,
87 // Internal IDs follow: 52 // Internal IDs follow:
88 SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, S CROLLBAR_CORNER, RESIZER, INPUT_LIST_BUTTON, 53 SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, S CROLLBAR_CORNER, RESIZER, INPUT_LIST_BUTTON,
89 // Special values follow: 54 // Special values follow:
90 AFTER_LAST_INTERNAL_PSEUDOID, 55 AFTER_LAST_INTERNAL_PSEUDOID,
91 FIRST_PUBLIC_PSEUDOID = FIRST_LINE, 56 FIRST_PUBLIC_PSEUDOID = FIRST_LINE,
(...skipping 459 matching lines...)
551 // Reasonable maximum to prevent insane font sizes from causing crashes on some platforms (such as Windows). 516 // Reasonable maximum to prevent insane font sizes from causing crashes on some platforms (such as Windows).
552 static const float maximumAllowedFontSize = 1000000.0f; 517 static const float maximumAllowedFontSize = 1000000.0f;
553 518
554 enum TextIndentLine { TextIndentFirstLine, TextIndentEachLine }; 519 enum TextIndentLine { TextIndentFirstLine, TextIndentEachLine };
555 520
556 enum CSSBoxType { BoxMissing = 0, MarginBox, BorderBox, PaddingBox, ContentBox } ; 521 enum CSSBoxType { BoxMissing = 0, MarginBox, BorderBox, PaddingBox, ContentBox } ;
557 522
558 } // namespace WebCore 523 } // namespace WebCore
559 524
560 #endif // RenderStyleConstants_h 525 #endif // RenderStyleConstants_h
OLDNEW

Powered by Google App Engine