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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 toHTMLInputElement(element)->selectColorInColorChooser(Color(colorValue)); | 686 toHTMLInputElement(element)->selectColorInColorChooser(Color(colorValue)); |
687 } | 687 } |
688 | 688 |
689 Vector<String> Internals::formControlStateOfPreviousHistoryItem(ExceptionState&
es) | 689 Vector<String> Internals::formControlStateOfPreviousHistoryItem(ExceptionState&
es) |
690 { | 690 { |
691 HistoryItem* mainItem = frame()->loader()->history()->previousItem(); | 691 HistoryItem* mainItem = frame()->loader()->history()->previousItem(); |
692 if (!mainItem) { | 692 if (!mainItem) { |
693 es.throwUninformativeAndGenericDOMException(InvalidAccessError); | 693 es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
694 return Vector<String>(); | 694 return Vector<String>(); |
695 } | 695 } |
696 String uniqueName = frame()->tree()->uniqueName(); | 696 String uniqueName = frame()->tree().uniqueName(); |
697 if (mainItem->target() != uniqueName && !mainItem->childItemWithTarget(uniqu
eName)) { | 697 if (mainItem->target() != uniqueName && !mainItem->childItemWithTarget(uniqu
eName)) { |
698 es.throwUninformativeAndGenericDOMException(InvalidAccessError); | 698 es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
699 return Vector<String>(); | 699 return Vector<String>(); |
700 } | 700 } |
701 return mainItem->target() == uniqueName ? mainItem->documentState() : mainIt
em->childItemWithTarget(uniqueName)->documentState(); | 701 return mainItem->target() == uniqueName ? mainItem->documentState() : mainIt
em->childItemWithTarget(uniqueName)->documentState(); |
702 } | 702 } |
703 | 703 |
704 void Internals::setFormControlStateOfPreviousHistoryItem(const Vector<String>& s
tate, ExceptionState& es) | 704 void Internals::setFormControlStateOfPreviousHistoryItem(const Vector<String>& s
tate, ExceptionState& es) |
705 { | 705 { |
706 HistoryItem* mainItem = frame()->loader()->history()->previousItem(); | 706 HistoryItem* mainItem = frame()->loader()->history()->previousItem(); |
707 if (!mainItem) { | 707 if (!mainItem) { |
708 es.throwUninformativeAndGenericDOMException(InvalidAccessError); | 708 es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
709 return; | 709 return; |
710 } | 710 } |
711 String uniqueName = frame()->tree()->uniqueName(); | 711 String uniqueName = frame()->tree().uniqueName(); |
712 if (mainItem->target() == uniqueName) | 712 if (mainItem->target() == uniqueName) |
713 mainItem->setDocumentState(state); | 713 mainItem->setDocumentState(state); |
714 else if (HistoryItem* subItem = mainItem->childItemWithTarget(uniqueName)) | 714 else if (HistoryItem* subItem = mainItem->childItemWithTarget(uniqueName)) |
715 subItem->setDocumentState(state); | 715 subItem->setDocumentState(state); |
716 else | 716 else |
717 es.throwUninformativeAndGenericDOMException(InvalidAccessError); | 717 es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
718 } | 718 } |
719 | 719 |
720 void Internals::enableMockSpeechSynthesizer() | 720 void Internals::enableMockSpeechSynthesizer() |
721 { | 721 { |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document
Marker::Grammar, from, length); | 1610 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document
Marker::Grammar, from, length); |
1611 } | 1611 } |
1612 | 1612 |
1613 unsigned Internals::numberOfScrollableAreas(Document* document, ExceptionState&) | 1613 unsigned Internals::numberOfScrollableAreas(Document* document, ExceptionState&) |
1614 { | 1614 { |
1615 unsigned count = 0; | 1615 unsigned count = 0; |
1616 Frame* frame = document->frame(); | 1616 Frame* frame = document->frame(); |
1617 if (frame->view()->scrollableAreas()) | 1617 if (frame->view()->scrollableAreas()) |
1618 count += frame->view()->scrollableAreas()->size(); | 1618 count += frame->view()->scrollableAreas()->size(); |
1619 | 1619 |
1620 for (Frame* child = frame->tree()->firstChild(); child; child = child->tree(
)->nextSibling()) { | 1620 for (Frame* child = frame->tree().firstChild(); child; child = child->tree()
.nextSibling()) { |
1621 if (child->view() && child->view()->scrollableAreas()) | 1621 if (child->view() && child->view()->scrollableAreas()) |
1622 count += child->view()->scrollableAreas()->size(); | 1622 count += child->view()->scrollableAreas()->size(); |
1623 } | 1623 } |
1624 | 1624 |
1625 return count; | 1625 return count; |
1626 } | 1626 } |
1627 | 1627 |
1628 bool Internals::isPageBoxVisible(Document* document, int pageNumber, ExceptionSt
ate& es) | 1628 bool Internals::isPageBoxVisible(Document* document, int pageNumber, ExceptionSt
ate& es) |
1629 { | 1629 { |
1630 if (!document) { | 1630 if (!document) { |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2275 return false; | 2275 return false; |
2276 sharedContext->extensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CONTEX
T_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); | 2276 sharedContext->extensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CONTEX
T_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); |
2277 // To prevent tests that call loseSharedGraphicsContext3D from being | 2277 // To prevent tests that call loseSharedGraphicsContext3D from being |
2278 // flaky, we call finish so that the context is guaranteed to be lost | 2278 // flaky, we call finish so that the context is guaranteed to be lost |
2279 // synchronously (i.e. before returning). | 2279 // synchronously (i.e. before returning). |
2280 sharedContext->finish(); | 2280 sharedContext->finish(); |
2281 return true; | 2281 return true; |
2282 } | 2282 } |
2283 | 2283 |
2284 } | 2284 } |
OLD | NEW |