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

Side by Side Diff: Source/core/layout/line/RootInlineBox.cpp

Issue 975933002: Return reference from styleEngine() accessor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 if (box->renderer().isText()) 696 if (box->renderer().isText())
697 return box->parent()->logicalTop(); 697 return box->parent()->logicalTop();
698 698
699 LayoutBoxModelObject* renderer = box->boxModelObject(); 699 LayoutBoxModelObject* renderer = box->boxModelObject();
700 ASSERT(renderer->isInline()); 700 ASSERT(renderer->isInline());
701 if (!renderer->isInline()) 701 if (!renderer->isInline())
702 return 0; 702 return 0;
703 703
704 // This method determines the vertical position for inline elements. 704 // This method determines the vertical position for inline elements.
705 bool firstLine = isFirstLineStyle(); 705 bool firstLine = isFirstLineStyle();
706 if (firstLine && !renderer->document().styleEngine()->usesFirstLineRules()) 706 if (firstLine && !renderer->document().styleEngine().usesFirstLineRules())
707 firstLine = false; 707 firstLine = false;
708 708
709 // Check the cache. 709 // Check the cache.
710 bool isLayoutInline = renderer->isLayoutInline(); 710 bool isLayoutInline = renderer->isLayoutInline();
711 if (isLayoutInline && !firstLine) { 711 if (isLayoutInline && !firstLine) {
712 LayoutUnit verticalPosition = verticalPositionCache.get(renderer, baseli neType()); 712 LayoutUnit verticalPosition = verticalPositionCache.get(renderer, baseli neType());
713 if (verticalPosition != PositionUndefined) 713 if (verticalPosition != PositionUndefined)
714 return verticalPosition; 714 return verticalPosition;
715 } 715 }
716 716
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 } 850 }
851 851
852 #ifndef NDEBUG 852 #ifndef NDEBUG
853 const char* RootInlineBox::boxName() const 853 const char* RootInlineBox::boxName() const
854 { 854 {
855 return "RootInlineBox"; 855 return "RootInlineBox";
856 } 856 }
857 #endif 857 #endif
858 858
859 } // namespace blink 859 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutObjectInlines.h ('k') | Source/core/layout/svg/LayoutSVGInlineText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698