OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 array->pushArray(buildArrayForQuad(highlight.quads[i])); | 329 array->pushArray(buildArrayForQuad(highlight.quads[i])); |
330 object->setArray("quads", array.release()); | 330 object->setArray("quads", array.release()); |
331 object->setBoolean("showRulers", highlight.showRulers); | 331 object->setBoolean("showRulers", highlight.showRulers); |
332 object->setString("contentColor", highlight.contentColor.serialized()); | 332 object->setString("contentColor", highlight.contentColor.serialized()); |
333 object->setString("contentOutlineColor", highlight.contentOutlineColor.seria
lized()); | 333 object->setString("contentOutlineColor", highlight.contentOutlineColor.seria
lized()); |
334 object->setString("paddingColor", highlight.paddingColor.serialized()); | 334 object->setString("paddingColor", highlight.paddingColor.serialized()); |
335 object->setString("borderColor", highlight.borderColor.serialized()); | 335 object->setString("borderColor", highlight.borderColor.serialized()); |
336 object->setString("marginColor", highlight.marginColor.serialized()); | 336 object->setString("marginColor", highlight.marginColor.serialized()); |
337 | 337 |
338 FloatRect visibleRect = mainView->visibleContentRect(); | 338 FloatRect visibleRect = mainView->visibleContentRect(); |
339 if (!mainView->delegatesScrolling()) { | 339 object->setNumber("scrollX", visibleRect.x()); |
340 object->setNumber("scrollX", visibleRect.x()); | 340 object->setNumber("scrollY", visibleRect.y()); |
341 object->setNumber("scrollY", visibleRect.y()); | |
342 } else { | |
343 object->setNumber("scrollX", 0); | |
344 object->setNumber("scrollY", 0); | |
345 } | |
346 | 341 |
347 return object.release(); | 342 return object.release(); |
348 } | 343 } |
349 | 344 |
350 static PassRefPtr<InspectorObject> buildObjectForSize(const IntSize& size) | 345 static PassRefPtr<InspectorObject> buildObjectForSize(const IntSize& size) |
351 { | 346 { |
352 RefPtr<InspectorObject> result = InspectorObject::create(); | 347 RefPtr<InspectorObject> result = InspectorObject::create(); |
353 result->setNumber("width", size.width()); | 348 result->setNumber("width", size.width()); |
354 result->setNumber("height", size.height()); | 349 result->setNumber("height", size.height()); |
355 return result.release(); | 350 return result.release(); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 info.addMember(m_size, "size"); | 502 info.addMember(m_size, "size"); |
508 } | 503 } |
509 | 504 |
510 void InspectorOverlay::freePage() | 505 void InspectorOverlay::freePage() |
511 { | 506 { |
512 m_overlayPage.clear(); | 507 m_overlayPage.clear(); |
513 } | 508 } |
514 | 509 |
515 } // namespace WebCore | 510 } // namespace WebCore |
516 | 511 |
OLD | NEW |