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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 | 1157 |
1158 template <typename T> | 1158 template <typename T> |
1159 void addJsonObjectForPoint(TracedValue* value, const char* name, const T& point) | 1159 void addJsonObjectForPoint(TracedValue* value, const char* name, const T& point) |
1160 { | 1160 { |
1161 value->beginDictionary(name); | 1161 value->beginDictionary(name); |
1162 value->setDouble("x", point.x()); | 1162 value->setDouble("x", point.x()); |
1163 value->setDouble("y", point.y()); | 1163 value->setDouble("y", point.y()); |
1164 value->endDictionary(); | 1164 value->endDictionary(); |
1165 } | 1165 } |
1166 | 1166 |
1167 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForPaintInvali
dationInfo(const LayoutRect& rect, const String& invalidationReason) | 1167 static PassRefPtr<TracedValue> jsonObjectForPaintInvalidationInfo(const LayoutRe
ct& rect, const String& invalidationReason) |
1168 { | 1168 { |
1169 RefPtr<TracedValue> value = TracedValue::create(); | 1169 RefPtr<TracedValue> value = TracedValue::create(); |
1170 addJsonObjectForRect(value.get(), "rect", rect); | 1170 addJsonObjectForRect(value.get(), "rect", rect); |
1171 value->setString("invalidation_reason", invalidationReason); | 1171 value->setString("invalidation_reason", invalidationReason); |
1172 return value; | 1172 return value; |
1173 } | 1173 } |
1174 | 1174 |
1175 LayoutRect LayoutObject::computePaintInvalidationRect(const LayoutBoxModelObject
& paintInvalidationContainer, const PaintInvalidationState* paintInvalidationSta
te) const | 1175 LayoutRect LayoutObject::computePaintInvalidationRect(const LayoutBoxModelObject
& paintInvalidationContainer, const PaintInvalidationState* paintInvalidationSta
te) const |
1176 { | 1176 { |
1177 return clippedOverflowRectForPaintInvalidation(&paintInvalidationContainer,
paintInvalidationState); | 1177 return clippedOverflowRectForPaintInvalidation(&paintInvalidationContainer,
paintInvalidationState); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 } | 1330 } |
1331 | 1331 |
1332 void LayoutObject::invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& chi
ldPaintInvalidationState) | 1332 void LayoutObject::invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState& chi
ldPaintInvalidationState) |
1333 { | 1333 { |
1334 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { | 1334 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { |
1335 if (!child->isOutOfFlowPositioned()) | 1335 if (!child->isOutOfFlowPositioned()) |
1336 child->invalidateTreeIfNeeded(childPaintInvalidationState); | 1336 child->invalidateTreeIfNeeded(childPaintInvalidationState); |
1337 } | 1337 } |
1338 } | 1338 } |
1339 | 1339 |
1340 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> jsonObjectForOldAndNewRe
cts(const LayoutRect& oldRect, const LayoutPoint& oldLocation, const LayoutRect&
newRect, const LayoutPoint& newLocation) | 1340 static PassRefPtr<TracedValue> jsonObjectForOldAndNewRects(const LayoutRect& old
Rect, const LayoutPoint& oldLocation, const LayoutRect& newRect, const LayoutPoi
nt& newLocation) |
1341 { | 1341 { |
1342 RefPtr<TracedValue> value = TracedValue::create(); | 1342 RefPtr<TracedValue> value = TracedValue::create(); |
1343 addJsonObjectForRect(value.get(), "oldRect", oldRect); | 1343 addJsonObjectForRect(value.get(), "oldRect", oldRect); |
1344 addJsonObjectForPoint(value.get(), "oldLocation", oldLocation); | 1344 addJsonObjectForPoint(value.get(), "oldLocation", oldLocation); |
1345 addJsonObjectForRect(value.get(), "newRect", newRect); | 1345 addJsonObjectForRect(value.get(), "newRect", newRect); |
1346 addJsonObjectForPoint(value.get(), "newLocation", newLocation); | 1346 addJsonObjectForPoint(value.get(), "newLocation", newLocation); |
1347 return value; | 1347 return value; |
1348 } | 1348 } |
1349 | 1349 |
1350 LayoutRect LayoutObject::selectionRectInViewCoordinates() const | 1350 LayoutRect LayoutObject::selectionRectInViewCoordinates() const |
(...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3564 const blink::LayoutObject* root = object1; | 3564 const blink::LayoutObject* root = object1; |
3565 while (root->parent()) | 3565 while (root->parent()) |
3566 root = root->parent(); | 3566 root = root->parent(); |
3567 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3567 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3568 } else { | 3568 } else { |
3569 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3569 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3570 } | 3570 } |
3571 } | 3571 } |
3572 | 3572 |
3573 #endif | 3573 #endif |
OLD | NEW |