| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |