Chromium Code Reviews

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
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 1193 matching lines...)
1204 if (!frameView || paintInvalidationContainer.document().printing()) 1204 if (!frameView || paintInvalidationContainer.document().printing())
1205 return; 1205 return;
1206 1206
1207 ASSERT(!frameView->frame().ownerLayoutObject()); 1207 ASSERT(!frameView->frame().ownerLayoutObject());
1208 1208
1209 IntRect paintRect = dirtyRect; 1209 IntRect paintRect = dirtyRect;
1210 paintRect.intersect(frameView->visibleContentRect()); 1210 paintRect.intersect(frameView->visibleContentRect());
1211 if (paintRect.isEmpty()) 1211 if (paintRect.isEmpty())
1212 return; 1212 return;
1213 1213
1214 if (HostWindow* window = frameView->hostWindow()) 1214 if (HostWindow* window = frameView->getHostWindow())
1215 window->invalidateRect(frameView->contentsToRootFrame(paintRect)); 1215 window->invalidateRect(frameView->contentsToRootFrame(paintRect));
1216 } 1216 }
1217 1217
1218 void LayoutObject::invalidatePaintUsingContainer(const LayoutBoxModelObject& pai ntInvalidationContainer, const LayoutRect& dirtyRect, PaintInvalidationReason in validationReason) const 1218 void LayoutObject::invalidatePaintUsingContainer(const LayoutBoxModelObject& pai ntInvalidationContainer, const LayoutRect& dirtyRect, PaintInvalidationReason in validationReason) const
1219 { 1219 {
1220 // TODO(wangxianzhu): Enable the following assert after paint invalidation f or spv2 is ready. 1220 // TODO(wangxianzhu): Enable the following assert after paint invalidation f or spv2 is ready.
1221 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 1221 // ASSERT(!RuntimeEnabledFeatures::slimmingPaintV2Enabled());
1222 1222
1223 if (paintInvalidationContainer.frameView()->shouldThrottleRendering()) 1223 if (paintInvalidationContainer.frameView()->shouldThrottleRendering())
1224 return; 1224 return;
(...skipping 1537 matching lines...)
2762 2762
2763 static bool findReferencingScrollAnchors(LayoutObject* layoutObject, FindReferen cingScrollAnchorsBehavior behavior) 2763 static bool findReferencingScrollAnchors(LayoutObject* layoutObject, FindReferen cingScrollAnchorsBehavior behavior)
2764 { 2764 {
2765 PaintLayer* layer = nullptr; 2765 PaintLayer* layer = nullptr;
2766 if (LayoutObject* parent = layoutObject->parent()) 2766 if (LayoutObject* parent = layoutObject->parent())
2767 layer = parent->enclosingLayer(); 2767 layer = parent->enclosingLayer();
2768 bool found = false; 2768 bool found = false;
2769 2769
2770 // Walk up the layer tree to clear any scroll anchors that reference us. 2770 // Walk up the layer tree to clear any scroll anchors that reference us.
2771 while (layer) { 2771 while (layer) {
2772 if (PaintLayerScrollableArea* scrollableArea = layer->scrollableArea()) { 2772 if (PaintLayerScrollableArea* scrollableArea = layer->getScrollableArea( )) {
2773 ScrollAnchor& anchor = scrollableArea->scrollAnchor(); 2773 ScrollAnchor& anchor = scrollableArea->scrollAnchor();
2774 if (anchor.anchorObject() == layoutObject) { 2774 if (anchor.anchorObject() == layoutObject) {
2775 found = true; 2775 found = true;
2776 if (behavior == Clear) 2776 if (behavior == Clear)
2777 anchor.clear(); 2777 anchor.clear();
2778 else 2778 else
2779 return true; 2779 return true;
2780 } 2780 }
2781 } 2781 }
2782 layer = layer->parent(); 2782 layer = layer->parent();
(...skipping 945 matching lines...)
3728 const blink::LayoutObject* root = object1; 3728 const blink::LayoutObject* root = object1;
3729 while (root->parent()) 3729 while (root->parent())
3730 root = root->parent(); 3730 root = root->parent();
3731 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3731 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3732 } else { 3732 } else {
3733 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3733 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3734 } 3734 }
3735 } 3735 }
3736 3736
3737 #endif 3737 #endif
OLDNEW

Powered by Google App Engine