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

Side by Side Diff: Source/core/rendering/RenderVTTCue.cpp

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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
« no previous file with comments | « Source/core/rendering/RenderTextFragment.cpp ('k') | Source/core/rendering/RenderVideo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Victor Carbune (victor@rosedu.org) 2 * Copyright (C) 2012 Victor Carbune (victor@rosedu.org)
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 return position; 109 return position;
110 } 110 }
111 111
112 bool SnapToLinesLayouter::isOutside() const 112 bool SnapToLinesLayouter::isOutside() const
113 { 113 {
114 return !m_cueBox.containingBlock()->absoluteBoundingBoxRect().contains(m_cue Box.absoluteContentBox()); 114 return !m_cueBox.containingBlock()->absoluteBoundingBoxRect().contains(m_cue Box.absoluteContentBox());
115 } 115 }
116 116
117 bool SnapToLinesLayouter::isOverlapping() const 117 bool SnapToLinesLayouter::isOverlapping() const
118 { 118 {
119 for (RenderObject* box = m_cueBox.previousSibling(); box; box = box->previou sSibling()) { 119 for (LayoutObject* box = m_cueBox.previousSibling(); box; box = box->previou sSibling()) {
120 IntRect boxRect = box->absoluteBoundingBoxRect(); 120 IntRect boxRect = box->absoluteBoundingBoxRect();
121 121
122 if (m_cueBox.absoluteBoundingBoxRect().intersects(boxRect)) 122 if (m_cueBox.absoluteBoundingBoxRect().intersects(boxRect))
123 return true; 123 return true;
124 } 124 }
125 125
126 return false; 126 return false;
127 } 127 }
128 128
129 bool SnapToLinesLayouter::shouldSwitchDirection(InlineFlowBox* firstLineBox, Lay outUnit step) const 129 bool SnapToLinesLayouter::shouldSwitchDirection(InlineFlowBox* firstLineBox, Lay outUnit step) const
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 SnapToLinesLayouter(*this, m_cue->calculateComputedLinePosition()).layou t(); 322 SnapToLinesLayouter(*this, m_cue->calculateComputedLinePosition()).layou t();
323 323
324 adjustForTopAndBottomMarginBorderAndPadding(); 324 adjustForTopAndBottomMarginBorderAndPadding();
325 } else { 325 } else {
326 repositionCueSnapToLinesNotSet(); 326 repositionCueSnapToLinesNotSet();
327 } 327 }
328 } 328 }
329 329
330 } // namespace blink 330 } // namespace blink
331 331
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTextFragment.cpp ('k') | Source/core/rendering/RenderVideo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698