|
Make RenderObject::style() return a const object
The current code was sloppy and allowed accidental mutation
of RenderStyle outside of style recalc. While this change
doesn't fix that class of bugs (as we introduce some
mutable accessors), it greatly reduces the risk of
them being introduced by mistake.
In order to make the change work, 2 fields on RenderStyle had
to be made mutable (unique and explicitInheritance) because
they are propagated up the tree during style recalc.
Also StyleSelectorState had to be changed to store the override
parent style independently of the regular parent style. That's
required as RefPtr modifies the style by increasing the refCount
and we have to hold onto the override as it can be a free style.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=190605
Total comments: 1
Total comments: 10
Total comments: 5
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+224 lines, -212 lines) |
Patch |
 |
M |
Source/core/animation/DocumentAnimations.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/animation/css/CSSAnimations.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/animation/css/CSSAnimations.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/css/CSSGradientValue.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/css/SelectorChecker.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/css/resolver/ElementResolveContext.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/css/resolver/ElementResolveContext.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/css/resolver/SharedStyleFinder.cpp
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/css/resolver/StyleResolver.h
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/core/css/resolver/StyleResolver.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
8 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
 |
M |
Source/core/css/resolver/StyleResolverState.h
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+12 lines, -7 lines |
0 comments
|
Download
|
 |
M |
Source/core/css/resolver/StyleResolverState.cpp
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/css/resolver/ViewportStyleResolver.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/dom/Document.h
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/dom/Document.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
6 chunks |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/Element.h
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/dom/Element.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/FirstLetterPseudoElement.cpp
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/Node.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/Node.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/NodeLayoutStyle.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/PseudoElement.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/dom/RenderTreeBuilder.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/Text.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/dom/Text.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/TreeScope.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/editing/ApplyBlockElementCommand.cpp
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/core/editing/EditorCommand.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/editing/SimplifyMarkupCommand.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/editing/VisibleUnits.cpp
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
Source/core/editing/iterators/TextIterator.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/frame/FrameView.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/html/HTMLFormControlElementTest.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/html/HTMLOptionElement.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/html/forms/InputType.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/html/shadow/SliderThumbElement.cpp
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutMedia.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutObject.h
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutObject.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutObjectInlines.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutQuote.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutSliderContainer.cpp
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutSliderThumb.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutTextControl.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutTextControlMultiLine.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/layout/LayoutTextControlSingleLine.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
5 chunks |
+13 lines, -13 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/MultiColumnFragmentainerGroup.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/line/BreakingContextInlineHeaders.h
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/style/LayoutStyle.h
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/core/layout/style/LayoutStyle.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/page/EventHandler.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/page/TouchAdjustment.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderBlock.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
6 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderCombineText.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderDeprecatedFlexibleBox.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderInline.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderListMarker.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/RenderMenuList.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
6 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
Source/core/svg/SVGElement.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/svg/SVGElementRareData.h
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/svg/SVGElementRareData.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/svg/SVGFEFloodElement.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/core/svg/SVGGraphicsElement.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/svg/SVGLengthContext.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
Source/core/svg/SVGStopElement.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/modules/accessibility/AXRenderObject.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/modules/accessibility/AXSlider.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/modules/accessibility/AXTable.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/web/WebFormControlElement.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/web/mac/WebSubstringUtil.mm
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+7 lines, -7 lines |
0 comments
|
Download
|
 |
M |
Source/web/tests/WebDocumentTest.cpp
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
Source/web/tests/WebFrameTest.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
Total messages: 28 (7 generated)
|