| 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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 | 778 |
| 779 // inlineChildrenBlock got reparented to blockChildrenBlock, so it i
s no longer a child | 779 // inlineChildrenBlock got reparented to blockChildrenBlock, so it i
s no longer a child |
| 780 // of "this". we null out prev or next so that is not used later in
the function. | 780 // of "this". we null out prev or next so that is not used later in
the function. |
| 781 if (inlineChildrenBlock == prevBlock) | 781 if (inlineChildrenBlock == prevBlock) |
| 782 prev = 0; | 782 prev = 0; |
| 783 else | 783 else |
| 784 next = 0; | 784 next = 0; |
| 785 } else { | 785 } else { |
| 786 // Take all the children out of the |next| block and put them in | 786 // Take all the children out of the |next| block and put them in |
| 787 // the |prev| block. | 787 // the |prev| block. |
| 788 nextBlock->moveAllChildrenIncludingFloatsTo(prevBlock, nextBlock->ha
sLayer() || prevBlock->hasLayer()); | 788 nextBlock->moveAllChildrenTo(prevBlock, nextBlock->hasLayer() || pre
vBlock->hasLayer()); |
| 789 | 789 |
| 790 // Delete the now-empty block's lines and nuke it. | 790 // Delete the now-empty block's lines and nuke it. |
| 791 nextBlock->deleteLineBoxTree(); | 791 nextBlock->deleteLineBoxTree(); |
| 792 nextBlock->destroy(); | 792 nextBlock->destroy(); |
| 793 next = 0; | 793 next = 0; |
| 794 } | 794 } |
| 795 } | 795 } |
| 796 | 796 |
| 797 RenderBox::removeChild(oldChild); | 797 RenderBox::removeChild(oldChild); |
| 798 | 798 |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1248 // stacking context. (See Appendix E.2, section 7.2.1.4 on | 1248 // stacking context. (See Appendix E.2, section 7.2.1.4 on |
| 1249 // inline block/table/replaced elements in the CSS2.1 specification.) | 1249 // inline block/table/replaced elements in the CSS2.1 specification.) |
| 1250 // This is also used by other elements (e.g. flex items). | 1250 // This is also used by other elements (e.g. flex items). |
| 1251 bool preservePhase = paintInfo.phase == PaintPhaseSelection || paintInfo.pha
se == PaintPhaseTextClip; | 1251 bool preservePhase = paintInfo.phase == PaintPhaseSelection || paintInfo.pha
se == PaintPhaseTextClip; |
| 1252 PaintInfo info(paintInfo); | 1252 PaintInfo info(paintInfo); |
| 1253 info.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground; | 1253 info.phase = preservePhase ? paintInfo.phase : PaintPhaseBlockBackground; |
| 1254 renderer->paint(info, childPoint); | 1254 renderer->paint(info, childPoint); |
| 1255 if (!preservePhase) { | 1255 if (!preservePhase) { |
| 1256 info.phase = PaintPhaseChildBlockBackgrounds; | 1256 info.phase = PaintPhaseChildBlockBackgrounds; |
| 1257 renderer->paint(info, childPoint); | 1257 renderer->paint(info, childPoint); |
| 1258 info.phase = PaintPhaseFloat; | |
| 1259 renderer->paint(info, childPoint); | |
| 1260 info.phase = PaintPhaseForeground; | 1258 info.phase = PaintPhaseForeground; |
| 1261 renderer->paint(info, childPoint); | 1259 renderer->paint(info, childPoint); |
| 1262 info.phase = PaintPhaseOutline; | 1260 info.phase = PaintPhaseOutline; |
| 1263 renderer->paint(info, childPoint); | 1261 renderer->paint(info, childPoint); |
| 1264 } | 1262 } |
| 1265 } | 1263 } |
| 1266 | 1264 |
| 1267 static inline bool hasCursorCaret(const FrameSelection& selection, const RenderB
lock* block) | 1265 static inline bool hasCursorCaret(const FrameSelection& selection, const RenderB
lock* block) |
| 1268 { | 1266 { |
| 1269 return selection.caretRenderer() == block && selection.hasEditableStyle(); | 1267 return selection.caretRenderer() == block && selection.hasEditableStyle(); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1323 return; | 1321 return; |
| 1324 | 1322 |
| 1325 // 2. paint contents | 1323 // 2. paint contents |
| 1326 if (paintPhase != PaintPhaseSelfOutline) | 1324 if (paintPhase != PaintPhaseSelfOutline) |
| 1327 paintContents(paintInfo, scrolledOffset); | 1325 paintContents(paintInfo, scrolledOffset); |
| 1328 | 1326 |
| 1329 // 3. paint selection | 1327 // 3. paint selection |
| 1330 // FIXME: Make this work with multi column layouts. For now don't fill gaps
. | 1328 // FIXME: Make this work with multi column layouts. For now don't fill gaps
. |
| 1331 paintSelection(paintInfo, scrolledOffset); // Fill in gaps in selection on l
ines and between blocks. | 1329 paintSelection(paintInfo, scrolledOffset); // Fill in gaps in selection on l
ines and between blocks. |
| 1332 | 1330 |
| 1333 // 4. paint floats. | |
| 1334 if (paintPhase == PaintPhaseFloat || paintPhase == PaintPhaseSelection || pa
intPhase == PaintPhaseTextClip) | |
| 1335 paintFloats(paintInfo, scrolledOffset, paintPhase == PaintPhaseSelection
|| paintPhase == PaintPhaseTextClip); | |
| 1336 | |
| 1337 // 5. paint outline. | 1331 // 5. paint outline. |
| 1338 if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline)
&& style()->hasOutline()) { | 1332 if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline)
&& style()->hasOutline()) { |
| 1339 // Don't paint focus ring for anonymous block continuation because the | 1333 // Don't paint focus ring for anonymous block continuation because the |
| 1340 // inline element having outline-style:auto paints the whole focus ring. | 1334 // inline element having outline-style:auto paints the whole focus ring. |
| 1341 if (!style()->outlineStyleIsAuto() || !isAnonymousBlockContinuation()) | 1335 if (!style()->outlineStyleIsAuto() || !isAnonymousBlockContinuation()) |
| 1342 paintOutline(paintInfo, LayoutRect(paintOffset, size())); | 1336 paintOutline(paintInfo, LayoutRect(paintOffset, size())); |
| 1343 } | 1337 } |
| 1344 | 1338 |
| 1345 // 6. paint continuation outlines. | 1339 // 6. paint continuation outlines. |
| 1346 if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseChildOutline
s)) | 1340 if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseChildOutline
s)) |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2071 if (checkChildren) { | 2065 if (checkChildren) { |
| 2072 // Hit test descendants first. | 2066 // Hit test descendants first. |
| 2073 LayoutSize scrolledOffset(localOffset); | 2067 LayoutSize scrolledOffset(localOffset); |
| 2074 if (hasOverflowClip()) | 2068 if (hasOverflowClip()) |
| 2075 scrolledOffset -= scrolledContentOffset(); | 2069 scrolledOffset -= scrolledContentOffset(); |
| 2076 | 2070 |
| 2077 if (hitTestContents(request, result, locationInContainer, toLayoutPoint(
scrolledOffset), hitTestAction)) { | 2071 if (hitTestContents(request, result, locationInContainer, toLayoutPoint(
scrolledOffset), hitTestAction)) { |
| 2078 updateHitTestResult(result, locationInContainer.point() - localOffse
t); | 2072 updateHitTestResult(result, locationInContainer.point() - localOffse
t); |
| 2079 return true; | 2073 return true; |
| 2080 } | 2074 } |
| 2081 if (hitTestAction == HitTestFloat && hitTestFloats(request, result, loca
tionInContainer, toLayoutPoint(scrolledOffset))) | |
| 2082 return true; | |
| 2083 } | 2075 } |
| 2084 | 2076 |
| 2085 // Check if the point is outside radii. | 2077 // Check if the point is outside radii. |
| 2086 if (style()->hasBorderRadius()) { | 2078 if (style()->hasBorderRadius()) { |
| 2087 LayoutRect borderRect = borderBoxRect(); | 2079 LayoutRect borderRect = borderBoxRect(); |
| 2088 borderRect.moveBy(adjustedLocation); | 2080 borderRect.moveBy(adjustedLocation); |
| 2089 RoundedRect border = style()->getRoundedBorderFor(borderRect); | 2081 RoundedRect border = style()->getRoundedBorderFor(borderRect); |
| 2090 if (!locationInContainer.intersects(border)) | 2082 if (!locationInContainer.intersects(border)) |
| 2091 return false; | 2083 return false; |
| 2092 } | 2084 } |
| (...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2968 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 2960 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
| 2969 { | 2961 { |
| 2970 showRenderObject(); | 2962 showRenderObject(); |
| 2971 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 2963 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 2972 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 2964 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 2973 } | 2965 } |
| 2974 | 2966 |
| 2975 #endif | 2967 #endif |
| 2976 | 2968 |
| 2977 } // namespace blink | 2969 } // namespace blink |
| OLD | NEW |