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 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 bool Internals::hasGrammarMarker(Document* document, int from, int length, Excep
tionState&) | 1610 bool Internals::hasGrammarMarker(Document* document, int from, int length, Excep
tionState&) |
1611 { | 1611 { |
1612 if (!document || !document->frame()) | 1612 if (!document || !document->frame()) |
1613 return 0; | 1613 return 0; |
1614 | 1614 |
1615 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document
Marker::Grammar, from, length); | 1615 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document
Marker::Grammar, from, length); |
1616 } | 1616 } |
1617 | 1617 |
1618 unsigned Internals::numberOfScrollableAreas(Document* document, ExceptionState&) | 1618 unsigned Internals::numberOfScrollableAreas(Document* document, ExceptionState&) |
1619 { | 1619 { |
| 1620 if (!document || !document->frame()) |
| 1621 return 0; |
| 1622 |
1620 unsigned count = 0; | 1623 unsigned count = 0; |
1621 LocalFrame* frame = document->frame(); | 1624 LocalFrame* frame = document->frame(); |
1622 if (frame->view()->scrollableAreas()) | 1625 if (frame->view()->scrollableAreas()) |
1623 count += frame->view()->scrollableAreas()->size(); | 1626 count += frame->view()->scrollableAreas()->size(); |
1624 | 1627 |
1625 for (Frame* child = frame->tree().firstChild(); child; child = child->tree()
.nextSibling()) { | 1628 for (Frame* child = frame->tree().firstChild(); child; child = child->tree()
.nextSibling()) { |
1626 if (child->isLocalFrame() && toLocalFrame(child)->view() && toLocalFrame
(child)->view()->scrollableAreas()) | 1629 if (child->isLocalFrame() && toLocalFrame(child)->view() && toLocalFrame
(child)->view()->scrollableAreas()) |
1627 count += toLocalFrame(child)->view()->scrollableAreas()->size(); | 1630 count += toLocalFrame(child)->view()->scrollableAreas()->size(); |
1628 } | 1631 } |
1629 | 1632 |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2352 | 2355 |
2353 StringBuilder markup; | 2356 StringBuilder markup; |
2354 Vector<Document::TransitionElementData>::iterator iter = elementData.begin()
; | 2357 Vector<Document::TransitionElementData>::iterator iter = elementData.begin()
; |
2355 for (; iter != elementData.end(); ++iter) | 2358 for (; iter != elementData.end(); ++iter) |
2356 markup.append(iter->markup); | 2359 markup.append(iter->markup); |
2357 | 2360 |
2358 return markup.toString(); | 2361 return markup.toString(); |
2359 } | 2362 } |
2360 | 2363 |
2361 } // namespace blink | 2364 } // namespace blink |
OLD | NEW |