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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2368 | 2371 |
2369 StringBuilder markup; | 2372 StringBuilder markup; |
2370 Vector<Document::TransitionElementData>::iterator iter = elementData.begin()
; | 2373 Vector<Document::TransitionElementData>::iterator iter = elementData.begin()
; |
2371 for (; iter != elementData.end(); ++iter) | 2374 for (; iter != elementData.end(); ++iter) |
2372 markup.append(iter->markup); | 2375 markup.append(iter->markup); |
2373 | 2376 |
2374 return markup.toString(); | 2377 return markup.toString(); |
2375 } | 2378 } |
2376 | 2379 |
2377 } // namespace blink | 2380 } // namespace blink |
OLD | NEW |