| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 } | 496 } |
| 497 | 497 |
| 498 void RenderBlock::paintChildAsInlineBlock(RenderBox* child, PaintInfo& paintInfo
, const LayoutPoint& paintOffset) | 498 void RenderBlock::paintChildAsInlineBlock(RenderBox* child, PaintInfo& paintInfo
, const LayoutPoint& paintOffset) |
| 499 { | 499 { |
| 500 if (!child->hasSelfPaintingLayer()) | 500 if (!child->hasSelfPaintingLayer()) |
| 501 paintAsInlineBlock(child, paintInfo, paintOffset); | 501 paintAsInlineBlock(child, paintInfo, paintOffset); |
| 502 } | 502 } |
| 503 | 503 |
| 504 void RenderBlock::paintAsInlineBlock(RenderObject* renderer, PaintInfo& paintInf
o, const LayoutPoint& childPoint) | 504 void RenderBlock::paintAsInlineBlock(RenderObject* renderer, PaintInfo& paintInf
o, const LayoutPoint& childPoint) |
| 505 { | 505 { |
| 506 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase
Selection) | 506 // FIXME(sky): Why don't masks go down this path? |
| 507 if (paintInfo.phase == PaintPhaseMask) |
| 507 return; | 508 return; |
| 508 | 509 renderer->paint(paintInfo, childPoint); |
| 509 // Paint all phases atomically, as though the element established its own | |
| 510 // stacking context. (See Appendix E.2, section 7.2.1.4 on | |
| 511 // inline block/table/replaced elements in the CSS2.1 specification.) | |
| 512 // This is also used by other elements (e.g. flex items). | |
| 513 PaintInfo info(paintInfo); | |
| 514 | |
| 515 if (paintInfo.phase == PaintPhaseSelection) { | |
| 516 renderer->paint(info, childPoint); | |
| 517 } else { | |
| 518 info.phase = PaintPhaseForeground; | |
| 519 renderer->paint(info, childPoint); | |
| 520 } | |
| 521 } | 510 } |
| 522 | 511 |
| 523 static inline bool hasCursorCaret(const FrameSelection& selection, const RenderB
lock* block) | 512 static inline bool hasCursorCaret(const FrameSelection& selection, const RenderB
lock* block) |
| 524 { | 513 { |
| 525 return selection.caretRenderer() == block && selection.hasEditableStyle(); | 514 return selection.caretRenderer() == block && selection.hasEditableStyle(); |
| 526 } | 515 } |
| 527 | 516 |
| 528 static inline bool hasDragCaret(const DragCaretController& dragCaretController,
const RenderBlock* block) | 517 static inline bool hasDragCaret(const DragCaretController& dragCaretController,
const RenderBlock* block) |
| 529 { | 518 { |
| 530 return dragCaretController.caretRenderer() == block && dragCaretController.i
sContentEditable(); | 519 return dragCaretController.caretRenderer() == block && dragCaretController.i
sContentEditable(); |
| (...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1821 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 1810 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
| 1822 { | 1811 { |
| 1823 showRenderObject(); | 1812 showRenderObject(); |
| 1824 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 1813 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 1825 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 1814 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 1826 } | 1815 } |
| 1827 | 1816 |
| 1828 #endif | 1817 #endif |
| 1829 | 1818 |
| 1830 } // namespace blink | 1819 } // namespace blink |
| OLD | NEW |