OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "config.h" | 5 #include "config.h" |
6 #include "core/paint/BlockPainter.h" | 6 #include "core/paint/BlockPainter.h" |
7 | 7 |
8 #include "core/editing/FrameSelection.h" | 8 #include "core/editing/FrameSelection.h" |
9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
10 #include "core/layout/LayoutFlexibleBox.h" | 10 #include "core/layout/LayoutFlexibleBox.h" |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 302 |
303 bool BlockPainter::hasCaret() const | 303 bool BlockPainter::hasCaret() const |
304 { | 304 { |
305 bool caretBrowsing = caretBrowsingEnabled(m_layoutBlock.frame()); | 305 bool caretBrowsing = caretBrowsingEnabled(m_layoutBlock.frame()); |
306 return hasCursorCaret(m_layoutBlock.frame()->selection(), &m_layoutBlock, ca
retBrowsing) | 306 return hasCursorCaret(m_layoutBlock.frame()->selection(), &m_layoutBlock, ca
retBrowsing) |
307 || hasDragCaret(m_layoutBlock.frame()->page()->dragCaretController(), &m
_layoutBlock, caretBrowsing); | 307 || hasDragCaret(m_layoutBlock.frame()->page()->dragCaretController(), &m
_layoutBlock, caretBrowsing); |
308 } | 308 } |
309 | 309 |
310 void BlockPainter::paintColumnRules(const PaintInfo& paintInfo, const LayoutPoin
t& paintOffset) | 310 void BlockPainter::paintColumnRules(const PaintInfo& paintInfo, const LayoutPoin
t& paintOffset) |
311 { | 311 { |
312 const Color& ruleColor = m_layoutBlock.resolveColor(CSSPropertyWebkitColumnR
uleColor); | 312 const Color& ruleColor = m_layoutBlock.resolveColor(CSSPropertyColumnRuleCol
or); |
313 bool ruleTransparent = m_layoutBlock.style()->columnRuleIsTransparent(); | 313 bool ruleTransparent = m_layoutBlock.style()->columnRuleIsTransparent(); |
314 EBorderStyle ruleStyle = m_layoutBlock.style()->columnRuleStyle(); | 314 EBorderStyle ruleStyle = m_layoutBlock.style()->columnRuleStyle(); |
315 LayoutUnit ruleThickness = m_layoutBlock.style()->columnRuleWidth(); | 315 LayoutUnit ruleThickness = m_layoutBlock.style()->columnRuleWidth(); |
316 LayoutUnit colGap = m_layoutBlock.columnGap(); | 316 LayoutUnit colGap = m_layoutBlock.columnGap(); |
317 bool renderRule = ruleStyle > BHIDDEN && !ruleTransparent; | 317 bool renderRule = ruleStyle > BHIDDEN && !ruleTransparent; |
318 if (!renderRule) | 318 if (!renderRule) |
319 return; | 319 return; |
320 | 320 |
321 ColumnInfo* colInfo = m_layoutBlock.columnInfo(); | 321 ColumnInfo* colInfo = m_layoutBlock.columnInfo(); |
322 unsigned colCount = m_layoutBlock.columnCount(colInfo); | 322 unsigned colCount = m_layoutBlock.columnCount(colInfo); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 LayoutBlock* block = flow->containingBlock(); | 515 LayoutBlock* block = flow->containingBlock(); |
516 for ( ; block && block != &m_layoutBlock; block = block->containingBlock
()) | 516 for ( ; block && block != &m_layoutBlock; block = block->containingBlock
()) |
517 accumulatedPaintOffset.moveBy(block->location()); | 517 accumulatedPaintOffset.moveBy(block->location()); |
518 ASSERT(block); | 518 ASSERT(block); |
519 InlinePainter(*flow).paintOutline(info, accumulatedPaintOffset); | 519 InlinePainter(*flow).paintOutline(info, accumulatedPaintOffset); |
520 } | 520 } |
521 } | 521 } |
522 | 522 |
523 | 523 |
524 } // namespace blink | 524 } // namespace blink |
OLD | NEW |