| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1997 return ClientRectList::create(); | 1997 return ClientRectList::create(); |
| 1998 } | 1998 } |
| 1999 | 1999 |
| 2000 document->updateLayout(); | 2000 document->updateLayout(); |
| 2001 document->view()->updateAnnotatedRegions(); | 2001 document->view()->updateAnnotatedRegions(); |
| 2002 Vector<AnnotatedRegionValue> regions = document->annotatedRegions(); | 2002 Vector<AnnotatedRegionValue> regions = document->annotatedRegions(); |
| 2003 | 2003 |
| 2004 Vector<FloatQuad> quads; | 2004 Vector<FloatQuad> quads; |
| 2005 for (size_t i = 0; i < regions.size(); ++i) { | 2005 for (size_t i = 0; i < regions.size(); ++i) { |
| 2006 if (regions[i].draggable == draggable) | 2006 if (regions[i].draggable == draggable) |
| 2007 quads.append(FloatQuad(regions[i].bounds)); | 2007 quads.append(FloatQuad(FloatRect(regions[i].bounds))); |
| 2008 } | 2008 } |
| 2009 return ClientRectList::create(quads); | 2009 return ClientRectList::create(quads); |
| 2010 } | 2010 } |
| 2011 | 2011 |
| 2012 static const char* cursorTypeToString(Cursor::Type cursorType) | 2012 static const char* cursorTypeToString(Cursor::Type cursorType) |
| 2013 { | 2013 { |
| 2014 switch (cursorType) { | 2014 switch (cursorType) { |
| 2015 case Cursor::Pointer: return "Pointer"; | 2015 case Cursor::Pointer: return "Pointer"; |
| 2016 case Cursor::Cross: return "Cross"; | 2016 case Cursor::Cross: return "Cross"; |
| 2017 case Cursor::Hand: return "Hand"; | 2017 case Cursor::Hand: return "Hand"; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2114 } | 2114 } |
| 2115 | 2115 |
| 2116 ClientRect* Internals::selectionBounds(ExceptionState& exceptionState) | 2116 ClientRect* Internals::selectionBounds(ExceptionState& exceptionState) |
| 2117 { | 2117 { |
| 2118 Document* document = contextDocument(); | 2118 Document* document = contextDocument(); |
| 2119 if (!document || !document->frame()) { | 2119 if (!document || !document->frame()) { |
| 2120 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc
ument's frame cannot be retrieved." : "No context document can be obtained."); | 2120 exceptionState.throwDOMException(InvalidAccessError, document ? "The doc
ument's frame cannot be retrieved." : "No context document can be obtained."); |
| 2121 return nullptr; | 2121 return nullptr; |
| 2122 } | 2122 } |
| 2123 | 2123 |
| 2124 return ClientRect::create(document->frame()->selection().bounds()); | 2124 return ClientRect::create(FloatRect(document->frame()->selection().bounds())
); |
| 2125 } | 2125 } |
| 2126 | 2126 |
| 2127 String Internals::markerTextForListItem(Element* element) | 2127 String Internals::markerTextForListItem(Element* element) |
| 2128 { | 2128 { |
| 2129 ASSERT(element); | 2129 ASSERT(element); |
| 2130 return blink::markerTextForListItem(element); | 2130 return blink::markerTextForListItem(element); |
| 2131 } | 2131 } |
| 2132 | 2132 |
| 2133 String Internals::getImageSourceURL(Element* element) | 2133 String Internals::getImageSourceURL(Element* element) |
| 2134 { | 2134 { |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2479 | 2479 |
| 2480 return animator->setScrollbarsVisibleForTesting(visible); | 2480 return animator->setScrollbarsVisibleForTesting(visible); |
| 2481 } | 2481 } |
| 2482 | 2482 |
| 2483 void Internals::forceRestrictIFramePermissions() | 2483 void Internals::forceRestrictIFramePermissions() |
| 2484 { | 2484 { |
| 2485 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); | 2485 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); |
| 2486 } | 2486 } |
| 2487 | 2487 |
| 2488 } // namespace blink | 2488 } // namespace blink |
| OLD | NEW |