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 2324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2335 break; | 2335 break; |
| 2336 } | 2336 } |
| 2337 } | 2337 } |
| 2338 } | 2338 } |
| 2339 return multicolContainer; | 2339 return multicolContainer; |
| 2340 } | 2340 } |
| 2341 | 2341 |
| 2342 return o; | 2342 return o; |
| 2343 } | 2343 } |
| 2344 | 2344 |
| 2345 LayoutObject* LayoutObject::containerAcrossFrameBoundary() const | |
|
chrishtr
2015/06/29 23:32:22
containerCrossingFrameBoundaries to match enclosin
Xianzhu
2015/06/30 00:02:13
Done.
| |
| 2346 { | |
| 2347 return isLayoutView() ? frame()->ownerLayoutObject() : container(); | |
| 2348 } | |
| 2349 | |
| 2345 bool LayoutObject::isSelectionBorder() const | 2350 bool LayoutObject::isSelectionBorder() const |
| 2346 { | 2351 { |
| 2347 SelectionState st = selectionState(); | 2352 SelectionState st = selectionState(); |
| 2348 return st == SelectionStart || st == SelectionEnd || st == SelectionBoth; | 2353 return st == SelectionStart || st == SelectionEnd || st == SelectionBoth; |
| 2349 } | 2354 } |
| 2350 | 2355 |
| 2351 inline void LayoutObject::clearLayoutRootIfNeeded() const | 2356 inline void LayoutObject::clearLayoutRootIfNeeded() const |
| 2352 { | 2357 { |
| 2353 if (FrameView* view = frameView()) { | 2358 if (FrameView* view = frameView()) { |
| 2354 if (!documentBeingDestroyed()) | 2359 if (!documentBeingDestroyed()) |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3085 return PaintInvalidationForcedByLayout; | 3090 return PaintInvalidationForcedByLayout; |
| 3086 case DocumentLifecycle::InCompositingUpdate: | 3091 case DocumentLifecycle::InCompositingUpdate: |
| 3087 return PaintInvalidationCompositingUpdate; | 3092 return PaintInvalidationCompositingUpdate; |
| 3088 default: | 3093 default: |
| 3089 return PaintInvalidationFull; | 3094 return PaintInvalidationFull; |
| 3090 } | 3095 } |
| 3091 } | 3096 } |
| 3092 | 3097 |
| 3093 inline void LayoutObject::markContainerChainForPaintInvalidation() | 3098 inline void LayoutObject::markContainerChainForPaintInvalidation() |
| 3094 { | 3099 { |
| 3095 for (LayoutObject* container = this->container(); container && !container->s houldCheckForPaintInvalidationRegardlessOfPaintInvalidationState(); container = container->container()) | 3100 for (LayoutObject* container = this->containerAcrossFrameBoundary(); contain er && !container->shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationSt ate(); container = container->containerAcrossFrameBoundary()) |
| 3096 container->setSelfMayNeedPaintInvalidation(); | 3101 container->setSelfMayNeedPaintInvalidation(); |
| 3097 } | 3102 } |
| 3098 | 3103 |
| 3099 void LayoutObject::setLayoutDidGetCalledSinceLastFrame() | 3104 void LayoutObject::setLayoutDidGetCalledSinceLastFrame() |
| 3100 { | 3105 { |
| 3101 m_bitfields.setLayoutDidGetCalledSinceLastFrame(true); | 3106 m_bitfields.setLayoutDidGetCalledSinceLastFrame(true); |
| 3102 | 3107 |
| 3103 // Make sure our parent is marked as needing invalidation. | 3108 // Make sure our parent is marked as needing invalidation. |
| 3104 // This would be unneeded if we allowed sub-tree invalidation (akin to sub-t ree layouts). | 3109 // This would be unneeded if we allowed sub-tree invalidation (akin to sub-t ree layouts). |
| 3105 markContainerChainForPaintInvalidation(); | 3110 markContainerChainForPaintInvalidation(); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3254 const blink::LayoutObject* root = object1; | 3259 const blink::LayoutObject* root = object1; |
| 3255 while (root->parent()) | 3260 while (root->parent()) |
| 3256 root = root->parent(); | 3261 root = root->parent(); |
| 3257 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3262 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3258 } else { | 3263 } else { |
| 3259 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3264 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3260 } | 3265 } |
| 3261 } | 3266 } |
| 3262 | 3267 |
| 3263 #endif | 3268 #endif |
| OLD | NEW |