Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: Source/core/rendering/RenderObject.cpp

Issue 463123003: Cleanup namespace usage in Source/core/rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderMenuList.cpp ('k') | Source/core/rendering/RenderTheme.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2503 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 LayoutRect newContainerRect; 2514 LayoutRect newContainerRect;
2515 computeSelfHitTestRects(ownRects, layerOffset); 2515 computeSelfHitTestRects(ownRects, layerOffset);
2516 2516
2517 // When we get to have a lot of rects on a layer, the performance cost of tr acking those 2517 // When we get to have a lot of rects on a layer, the performance cost of tr acking those
2518 // rects outweighs the benefit of doing compositor thread hit testing. 2518 // rects outweighs the benefit of doing compositor thread hit testing.
2519 // FIXME: This limit needs to be low due to the O(n^2) algorithm in 2519 // FIXME: This limit needs to be low due to the O(n^2) algorithm in
2520 // WebLayer::setTouchEventHandlerRegion - crbug.com/300282. 2520 // WebLayer::setTouchEventHandlerRegion - crbug.com/300282.
2521 const size_t maxRectsPerLayer = 100; 2521 const size_t maxRectsPerLayer = 100;
2522 2522
2523 LayerHitTestRects::iterator iter = layerRects.find(currentLayer); 2523 LayerHitTestRects::iterator iter = layerRects.find(currentLayer);
2524 Vector<blink::LayoutRect>* iterValue; 2524 Vector<LayoutRect>* iterValue;
2525 if (iter == layerRects.end()) 2525 if (iter == layerRects.end())
2526 iterValue = &layerRects.add(currentLayer, Vector<LayoutRect>()).storedVa lue->value; 2526 iterValue = &layerRects.add(currentLayer, Vector<LayoutRect>()).storedVa lue->value;
2527 else 2527 else
2528 iterValue = &iter->value; 2528 iterValue = &iter->value;
2529 for (size_t i = 0; i < ownRects.size(); i++) { 2529 for (size_t i = 0; i < ownRects.size(); i++) {
2530 if (!containerRect.contains(ownRects[i])) { 2530 if (!containerRect.contains(ownRects[i])) {
2531 iterValue->append(ownRects[i]); 2531 iterValue->append(ownRects[i]);
2532 if (iterValue->size() > maxRectsPerLayer) { 2532 if (iterValue->size() > maxRectsPerLayer) {
2533 // Just mark the entire layer instead, and switch to walking the layer 2533 // Just mark the entire layer instead, and switch to walking the layer
2534 // tree instead of the render tree. 2534 // tree instead of the render tree.
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 { 3470 {
3471 if (object1) { 3471 if (object1) {
3472 const blink::RenderObject* root = object1; 3472 const blink::RenderObject* root = object1;
3473 while (root->parent()) 3473 while (root->parent())
3474 root = root->parent(); 3474 root = root->parent();
3475 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3475 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3476 } 3476 }
3477 } 3477 }
3478 3478
3479 #endif 3479 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMenuList.cpp ('k') | Source/core/rendering/RenderTheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698