Chromium Code Reviews| 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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1255 selectionPaintInvalidationMap->set(this, selectionRect); | 1255 selectionPaintInvalidationMap->set(this, selectionRect); |
| 1256 } | 1256 } |
| 1257 | 1257 |
| 1258 void RenderObject::invalidateSelectionIfNeeded(const RenderLayerModelObject& pai ntInvalidationContainer, PaintInvalidationReason invalidationReason) | 1258 void RenderObject::invalidateSelectionIfNeeded(const RenderLayerModelObject& pai ntInvalidationContainer, PaintInvalidationReason invalidationReason) |
| 1259 { | 1259 { |
| 1260 if (!shouldInvalidateSelection()) | 1260 if (!shouldInvalidateSelection()) |
| 1261 return; | 1261 return; |
| 1262 | 1262 |
| 1263 LayoutRect oldSelectionRect = previousSelectionRectForPaintInvalidation(); | 1263 LayoutRect oldSelectionRect = previousSelectionRectForPaintInvalidation(); |
| 1264 LayoutRect previousSelectionRectForPaintInvalidation = selectionRectForPaint Invalidation(&paintInvalidationContainer); | 1264 LayoutRect previousSelectionRectForPaintInvalidation = selectionRectForPaint Invalidation(&paintInvalidationContainer); |
| 1265 // FIXME: groupedMapping() leaks the squashing abstraction. | |
| 1266 if (paintInvalidationContainer.layer()->groupedMapping()) | |
| 1267 RenderLayer::mapRectToPaintBackingCoordinates(&paintInvalidationContaine r, previousSelectionRectForPaintInvalidation); | |
| 1268 setPreviousSelectionRectForPaintInvalidation(previousSelectionRectForPaintIn validation); | 1265 setPreviousSelectionRectForPaintInvalidation(previousSelectionRectForPaintIn validation); |
| 1269 | 1266 |
| 1270 if (view()->doingFullPaintInvalidation() || isFullPaintInvalidationReason(in validationReason)) | 1267 if (view()->doingFullPaintInvalidation() || isFullPaintInvalidationReason(in validationReason)) |
| 1271 return; | 1268 return; |
| 1272 | 1269 |
| 1273 fullyInvalidatePaint(paintInvalidationContainer, PaintInvalidationSelection, oldSelectionRect, previousSelectionRectForPaintInvalidation); | 1270 fullyInvalidatePaint(paintInvalidationContainer, PaintInvalidationSelection, oldSelectionRect, previousSelectionRectForPaintInvalidation); |
| 1274 } | 1271 } |
| 1275 | 1272 |
| 1276 PaintInvalidationReason RenderObject::invalidatePaintIfNeeded(const PaintInvalid ationState& paintInvalidationState, const RenderLayerModelObject& paintInvalidat ionContainer) | 1273 PaintInvalidationReason RenderObject::invalidatePaintIfNeeded(const PaintInvalid ationState& paintInvalidationState, const RenderLayerModelObject& paintInvalidat ionContainer) |
| 1277 { | 1274 { |
| (...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2999 | 2996 |
| 3000 ASSERT(!node()); | 2997 ASSERT(!node()); |
| 3001 return createPositionWithAffinity(0, DOWNSTREAM); | 2998 return createPositionWithAffinity(0, DOWNSTREAM); |
| 3002 } | 2999 } |
| 3003 | 3000 |
| 3004 CursorDirective RenderObject::getCursor(const LayoutPoint&, Cursor&) const | 3001 CursorDirective RenderObject::getCursor(const LayoutPoint&, Cursor&) const |
| 3005 { | 3002 { |
| 3006 return SetCursorBasedOnStyle; | 3003 return SetCursorBasedOnStyle; |
| 3007 } | 3004 } |
| 3008 | 3005 |
| 3009 bool RenderObject::canUpdateSelectionOnRootLineBoxes() | 3006 bool RenderObject::canUpdateSelectionOnRootLineBoxes() const |
| 3010 { | 3007 { |
| 3011 if (needsLayout()) | 3008 if (needsLayout()) |
| 3012 return false; | 3009 return false; |
| 3013 | 3010 |
| 3014 RenderBlock* containingBlock = this->containingBlock(); | 3011 const RenderBlock* containingBlock = this->containingBlock(); |
|
leviw_travelin_and_unemployed
2014/11/12 23:41:42
Nit: Is this-> needed?
Julien - ping for review
2014/11/13 01:09:32
It should be: the variable has the same name as th
kouhei (in TOK)
2014/11/13 01:33:37
I think this code is a bit tricky.
Would you renam
Julien - ping for review
2014/11/13 17:03:42
I don't agree. The code is super straight-forward.
kouhei (in TOK)
2014/11/14 03:11:57
Got it. lgtm
| |
| 3015 return containingBlock ? !containingBlock->needsLayout() : false; | 3012 return containingBlock ? !containingBlock->needsLayout() : false; |
| 3016 } | 3013 } |
| 3017 | 3014 |
| 3018 // We only create "generated" child renderers like one for first-letter if: | 3015 // We only create "generated" child renderers like one for first-letter if: |
| 3019 // - the firstLetterBlock can have children in the DOM and | 3016 // - the firstLetterBlock can have children in the DOM and |
| 3020 // - the block doesn't have any special assumption on its text children. | 3017 // - the block doesn't have any special assumption on its text children. |
| 3021 // This correctly prevents form controls from having such renderers. | 3018 // This correctly prevents form controls from having such renderers. |
| 3022 bool RenderObject::canHaveGeneratedChildren() const | 3019 bool RenderObject::canHaveGeneratedChildren() const |
| 3023 { | 3020 { |
| 3024 return canHaveChildren(); | 3021 return canHaveChildren(); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3176 { | 3173 { |
| 3177 if (object1) { | 3174 if (object1) { |
| 3178 const blink::RenderObject* root = object1; | 3175 const blink::RenderObject* root = object1; |
| 3179 while (root->parent()) | 3176 while (root->parent()) |
| 3180 root = root->parent(); | 3177 root = root->parent(); |
| 3181 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3178 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3182 } | 3179 } |
| 3183 } | 3180 } |
| 3184 | 3181 |
| 3185 #endif | 3182 #endif |
| OLD | NEW |