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

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.cc

Issue 2717403002: Add Style() to PhysicalFragment (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/ng/ng_physical_fragment.h" 5 #include "core/layout/ng/ng_physical_fragment.h"
6 6
7 #include "core/layout/ng/ng_break_token.h" 7 #include "core/layout/ng/ng_break_token.h"
8 #include "core/layout/ng/ng_physical_box_fragment.h" 8 #include "core/layout/ng/ng_physical_box_fragment.h"
9 #include "core/layout/ng/ng_physical_text_fragment.h" 9 #include "core/layout/ng/ng_physical_text_fragment.h"
10 10
(...skipping 11 matching lines...) Expand all
22 type_(type), 22 type_(type),
23 is_placed_(false) {} 23 is_placed_(false) {}
24 24
25 void NGPhysicalFragment::destroy() const { 25 void NGPhysicalFragment::destroy() const {
26 if (Type() == kFragmentText) 26 if (Type() == kFragmentText)
27 delete static_cast<const NGPhysicalTextFragment*>(this); 27 delete static_cast<const NGPhysicalTextFragment*>(this);
28 else 28 else
29 delete static_cast<const NGPhysicalBoxFragment*>(this); 29 delete static_cast<const NGPhysicalBoxFragment*>(this);
30 } 30 }
31 31
32 const ComputedStyle& NGPhysicalFragment::Style() const {
33 DCHECK(layout_object_);
34 return layout_object_->styleRef();
35 }
36
32 } // namespace blink 37 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_physical_fragment.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698