| Index: Source/core/testing/Internals.cpp
|
| diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
|
| index f766d9288357f3cbdcfefa51e272fdeb6e4e69c9..aa04f01e3bb48301a65cec1bceb7a49bc5026585 100644
|
| --- a/Source/core/testing/Internals.cpp
|
| +++ b/Source/core/testing/Internals.cpp
|
| @@ -264,7 +264,7 @@ PassRefPtr<Element> Internals::createContentElement(ExceptionCode& ec)
|
| {
|
| Document* document = contextDocument();
|
| if (!document) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -274,7 +274,7 @@ PassRefPtr<Element> Internals::createContentElement(ExceptionCode& ec)
|
| bool Internals::isValidContentSelect(Element* insertionPoint, ExceptionCode& ec)
|
| {
|
| if (!insertionPoint || !insertionPoint->isInsertionPoint()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return false;
|
| }
|
|
|
| @@ -284,7 +284,7 @@ bool Internals::isValidContentSelect(Element* insertionPoint, ExceptionCode& ec)
|
| Node* Internals::treeScopeRootNode(Node* node, ExceptionCode& ec)
|
| {
|
| if (!node) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -294,7 +294,7 @@ Node* Internals::treeScopeRootNode(Node* node, ExceptionCode& ec)
|
| Node* Internals::parentTreeScope(Node* node, ExceptionCode& ec)
|
| {
|
| if (!node) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
| const TreeScope* parentTreeScope = node->treeScope()->parentTreeScope();
|
| @@ -304,7 +304,7 @@ Node* Internals::parentTreeScope(Node* node, ExceptionCode& ec)
|
| bool Internals::hasSelectorForIdInShadow(Element* host, const String& idValue, ExceptionCode& ec)
|
| {
|
| if (!host || !host->shadow()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -314,7 +314,7 @@ bool Internals::hasSelectorForIdInShadow(Element* host, const String& idValue, E
|
| bool Internals::hasSelectorForClassInShadow(Element* host, const String& className, ExceptionCode& ec)
|
| {
|
| if (!host || !host->shadow()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -324,7 +324,7 @@ bool Internals::hasSelectorForClassInShadow(Element* host, const String& classNa
|
| bool Internals::hasSelectorForAttributeInShadow(Element* host, const String& attributeName, ExceptionCode& ec)
|
| {
|
| if (!host || !host->shadow()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -334,7 +334,7 @@ bool Internals::hasSelectorForAttributeInShadow(Element* host, const String& att
|
| bool Internals::hasSelectorForPseudoClassInShadow(Element* host, const String& pseudoClass, ExceptionCode& ec)
|
| {
|
| if (!host || !host->shadow()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -361,7 +361,7 @@ bool Internals::hasSelectorForPseudoClassInShadow(Element* host, const String& p
|
| unsigned short Internals::compareTreeScopePosition(const Node* node1, const Node* node2, ExceptionCode& ec) const
|
| {
|
| if (!node1 || !node2) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
| const TreeScope* treeScope1 = node1->isDocumentNode() ? static_cast<const TreeScope*>(toDocument(node1)) :
|
| @@ -369,7 +369,7 @@ unsigned short Internals::compareTreeScopePosition(const Node* node1, const Node
|
| const TreeScope* treeScope2 = node2->isDocumentNode() ? static_cast<const TreeScope*>(toDocument(node2)) :
|
| node2->isShadowRoot() ? static_cast<const TreeScope*>(toShadowRoot(node2)) : 0;
|
| if (!treeScope1 || !treeScope2) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
| return treeScope1->comparePosition(treeScope2);
|
| @@ -386,7 +386,7 @@ unsigned Internals::numberOfActiveAnimations() const
|
| void Internals::suspendAnimations(Document* document, ExceptionCode& ec) const
|
| {
|
| if (!document || !document->frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| @@ -400,7 +400,7 @@ void Internals::suspendAnimations(Document* document, ExceptionCode& ec) const
|
| void Internals::resumeAnimations(Document* document, ExceptionCode& ec) const
|
| {
|
| if (!document || !document->frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| @@ -414,7 +414,7 @@ void Internals::resumeAnimations(Document* document, ExceptionCode& ec) const
|
| void Internals::pauseAnimations(double pauseTime, ExceptionCode& ec)
|
| {
|
| if (pauseTime < 0) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| @@ -426,7 +426,7 @@ bool Internals::hasShadowInsertionPoint(const Node* root, ExceptionCode& ec) con
|
| if (root && root->isShadowRoot())
|
| return ScopeContentDistribution::hasShadowElement(toShadowRoot(root));
|
|
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -435,14 +435,14 @@ bool Internals::hasContentElement(const Node* root, ExceptionCode& ec) const
|
| if (root && root->isShadowRoot())
|
| return ScopeContentDistribution::hasContentElement(toShadowRoot(root));
|
|
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| size_t Internals::countElementShadow(const Node* root, ExceptionCode& ec) const
|
| {
|
| if (!root || !root->isShadowRoot()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -452,7 +452,7 @@ size_t Internals::countElementShadow(const Node* root, ExceptionCode& ec) const
|
| bool Internals::attached(Node* node, ExceptionCode& ec)
|
| {
|
| if (!node) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return false;
|
| }
|
|
|
| @@ -462,7 +462,7 @@ bool Internals::attached(Node* node, ExceptionCode& ec)
|
| Node* Internals::nextSiblingByWalker(Node* node, ExceptionCode& ec)
|
| {
|
| if (!node) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
| ComposedShadowTreeWalker walker(node);
|
| @@ -473,7 +473,7 @@ Node* Internals::nextSiblingByWalker(Node* node, ExceptionCode& ec)
|
| Node* Internals::firstChildByWalker(Node* node, ExceptionCode& ec)
|
| {
|
| if (!node) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
| ComposedShadowTreeWalker walker(node);
|
| @@ -484,7 +484,7 @@ Node* Internals::firstChildByWalker(Node* node, ExceptionCode& ec)
|
| Node* Internals::lastChildByWalker(Node* node, ExceptionCode& ec)
|
| {
|
| if (!node) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
| ComposedShadowTreeWalker walker(node);
|
| @@ -495,7 +495,7 @@ Node* Internals::lastChildByWalker(Node* node, ExceptionCode& ec)
|
| Node* Internals::nextNodeByWalker(Node* node, ExceptionCode& ec)
|
| {
|
| if (!node) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
| ComposedShadowTreeWalker walker(node);
|
| @@ -506,7 +506,7 @@ Node* Internals::nextNodeByWalker(Node* node, ExceptionCode& ec)
|
| Node* Internals::previousNodeByWalker(Node* node, ExceptionCode& ec)
|
| {
|
| if (!node) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
| ComposedShadowTreeWalker walker(node);
|
| @@ -517,13 +517,13 @@ Node* Internals::previousNodeByWalker(Node* node, ExceptionCode& ec)
|
| String Internals::elementRenderTreeAsText(Element* element, ExceptionCode& ec)
|
| {
|
| if (!element) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| String representation = externalRepresentation(element);
|
| if (representation.isEmpty()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| @@ -535,14 +535,14 @@ size_t Internals::numberOfScopedHTMLStyleChildren(const Node* scope, ExceptionCo
|
| if (scope && (scope->isElementNode() || scope->isShadowRoot()))
|
| return scope->numberOfScopedHTMLStyleChildren();
|
|
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| PassRefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisitedInfo(Node* node, ExceptionCode& ec) const
|
| {
|
| if (!node) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -553,7 +553,7 @@ PassRefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisited
|
| ShadowRoot* Internals::ensureShadowRoot(Element* host, ExceptionCode& ec)
|
| {
|
| if (!host) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -573,7 +573,7 @@ ShadowRoot* Internals::shadowRoot(Element* host, ExceptionCode& ec)
|
| ShadowRoot* Internals::youngestShadowRoot(Element* host, ExceptionCode& ec)
|
| {
|
| if (!host) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -585,7 +585,7 @@ ShadowRoot* Internals::youngestShadowRoot(Element* host, ExceptionCode& ec)
|
| ShadowRoot* Internals::oldestShadowRoot(Element* host, ExceptionCode& ec)
|
| {
|
| if (!host) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -597,7 +597,7 @@ ShadowRoot* Internals::oldestShadowRoot(Element* host, ExceptionCode& ec)
|
| ShadowRoot* Internals::youngerShadowRoot(Node* shadow, ExceptionCode& ec)
|
| {
|
| if (!shadow || !shadow->isShadowRoot()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -607,7 +607,7 @@ ShadowRoot* Internals::youngerShadowRoot(Node* shadow, ExceptionCode& ec)
|
| ShadowRoot* Internals::olderShadowRoot(Node* shadow, ExceptionCode& ec)
|
| {
|
| if (!shadow || !shadow->isShadowRoot()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -617,7 +617,7 @@ ShadowRoot* Internals::olderShadowRoot(Node* shadow, ExceptionCode& ec)
|
| String Internals::shadowRootType(const Node* root, ExceptionCode& ec) const
|
| {
|
| if (!root || !root->isShadowRoot()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| @@ -635,7 +635,7 @@ String Internals::shadowRootType(const Node* root, ExceptionCode& ec) const
|
| Element* Internals::includerFor(Node* node, ExceptionCode& ec)
|
| {
|
| if (!node) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -645,7 +645,7 @@ Element* Internals::includerFor(Node* node, ExceptionCode& ec)
|
| String Internals::shadowPseudoId(Element* element, ExceptionCode& ec)
|
| {
|
| if (!element) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| @@ -655,7 +655,7 @@ String Internals::shadowPseudoId(Element* element, ExceptionCode& ec)
|
| void Internals::setShadowPseudoId(Element* element, const String& id, ExceptionCode& ec)
|
| {
|
| if (!element) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| @@ -683,12 +683,12 @@ Vector<String> Internals::formControlStateOfPreviousHistoryItem(ExceptionCode& e
|
| {
|
| HistoryItem* mainItem = frame()->loader()->history()->previousItem();
|
| if (!mainItem) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return Vector<String>();
|
| }
|
| String uniqueName = frame()->tree()->uniqueName();
|
| if (mainItem->target() != uniqueName && !mainItem->childItemWithTarget(uniqueName)) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return Vector<String>();
|
| }
|
| return mainItem->target() == uniqueName ? mainItem->documentState() : mainItem->childItemWithTarget(uniqueName)->documentState();
|
| @@ -698,7 +698,7 @@ void Internals::setFormControlStateOfPreviousHistoryItem(const Vector<String>& s
|
| {
|
| HistoryItem* mainItem = frame()->loader()->history()->previousItem();
|
| if (!mainItem) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
| String uniqueName = frame()->tree()->uniqueName();
|
| @@ -707,7 +707,7 @@ void Internals::setFormControlStateOfPreviousHistoryItem(const Vector<String>& s
|
| else if (HistoryItem* subItem = mainItem->childItemWithTarget(uniqueName))
|
| subItem->setDocumentState(state);
|
| else
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| }
|
|
|
| void Internals::enableMockSpeechSynthesizer()
|
| @@ -746,7 +746,7 @@ PassRefPtr<ClientRect> Internals::unscaledViewportRect(ExceptionCode& ec)
|
| {
|
| Document* document = contextDocument();
|
| if (!document || !document->view()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return ClientRect::create();
|
| }
|
|
|
| @@ -757,7 +757,7 @@ PassRefPtr<ClientRect> Internals::absoluteCaretBounds(ExceptionCode& ec)
|
| {
|
| Document* document = contextDocument();
|
| if (!document || !document->frame() || !document->frame()->selection()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return ClientRect::create();
|
| }
|
|
|
| @@ -767,7 +767,7 @@ PassRefPtr<ClientRect> Internals::absoluteCaretBounds(ExceptionCode& ec)
|
| PassRefPtr<ClientRect> Internals::boundingBox(Element* element, ExceptionCode& ec)
|
| {
|
| if (!element) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return ClientRect::create();
|
| }
|
|
|
| @@ -781,7 +781,7 @@ PassRefPtr<ClientRect> Internals::boundingBox(Element* element, ExceptionCode& e
|
| PassRefPtr<ClientRectList> Internals::inspectorHighlightRects(Document* document, ExceptionCode& ec)
|
| {
|
| if (!document || !document->page() || !document->page()->inspectorController()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return ClientRectList::create();
|
| }
|
|
|
| @@ -793,13 +793,13 @@ PassRefPtr<ClientRectList> Internals::inspectorHighlightRects(Document* document
|
| unsigned Internals::markerCountForNode(Node* node, const String& markerType, ExceptionCode& ec)
|
| {
|
| if (!node) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| DocumentMarker::MarkerTypes markerTypes = 0;
|
| if (!markerTypesFrom(markerType, markerTypes)) {
|
| - ec = SYNTAX_ERR;
|
| + ec = SyntaxError;
|
| return 0;
|
| }
|
|
|
| @@ -809,13 +809,13 @@ unsigned Internals::markerCountForNode(Node* node, const String& markerType, Exc
|
| DocumentMarker* Internals::markerAt(Node* node, const String& markerType, unsigned index, ExceptionCode& ec)
|
| {
|
| if (!node) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| DocumentMarker::MarkerTypes markerTypes = 0;
|
| if (!markerTypesFrom(markerType, markerTypes)) {
|
| - ec = SYNTAX_ERR;
|
| + ec = SyntaxError;
|
| return 0;
|
| }
|
|
|
| @@ -850,7 +850,7 @@ void Internals::addTextMatchMarker(const Range* range, bool isActive)
|
| void Internals::setScrollViewPosition(Document* document, long x, long y, ExceptionCode& ec)
|
| {
|
| if (!document || !document->view()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| @@ -868,7 +868,7 @@ void Internals::setScrollViewPosition(Document* document, long x, long y, Except
|
| void Internals::setPagination(Document* document, const String& mode, int gap, int pageLength, ExceptionCode& ec)
|
| {
|
| if (!document || !document->page()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
| Page* page = document->page();
|
| @@ -885,7 +885,7 @@ void Internals::setPagination(Document* document, const String& mode, int gap, i
|
| else if (mode == "BottomToTopPaginated")
|
| pagination.mode = Pagination::BottomToTopPaginated;
|
| else {
|
| - ec = SYNTAX_ERR;
|
| + ec = SyntaxError;
|
| return;
|
| }
|
|
|
| @@ -897,7 +897,7 @@ void Internals::setPagination(Document* document, const String& mode, int gap, i
|
| String Internals::configurationForViewport(Document* document, float devicePixelRatio, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight, ExceptionCode& ec)
|
| {
|
| if (!document || !document->page()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
| Page* page = document->page();
|
| @@ -917,7 +917,7 @@ String Internals::configurationForViewport(Document* document, float devicePixel
|
| bool Internals::wasLastChangeUserEdit(Element* textField, ExceptionCode& ec)
|
| {
|
| if (!textField) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return false;
|
| }
|
|
|
| @@ -935,7 +935,7 @@ bool Internals::wasLastChangeUserEdit(Element* textField, ExceptionCode& ec)
|
| bool Internals::elementShouldAutoComplete(Element* element, ExceptionCode& ec)
|
| {
|
| if (!element) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return false;
|
| }
|
|
|
| @@ -949,7 +949,7 @@ bool Internals::elementShouldAutoComplete(Element* element, ExceptionCode& ec)
|
| String Internals::suggestedValue(Element* element, ExceptionCode& ec)
|
| {
|
| if (!element) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| @@ -964,7 +964,7 @@ String Internals::suggestedValue(Element* element, ExceptionCode& ec)
|
| void Internals::setSuggestedValue(Element* element, const String& value, ExceptionCode& ec)
|
| {
|
| if (!element) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| @@ -979,7 +979,7 @@ void Internals::setSuggestedValue(Element* element, const String& value, Excepti
|
| void Internals::setEditingValue(Element* element, const String& value, ExceptionCode& ec)
|
| {
|
| if (!element) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| @@ -994,7 +994,7 @@ void Internals::setEditingValue(Element* element, const String& value, Exception
|
| void Internals::setAutofilled(Element* element, bool enabled, ExceptionCode& ec)
|
| {
|
| if (!element->hasTagName(inputTag)) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
| toHTMLInputElement(element)->setAutofilled(enabled);
|
| @@ -1003,7 +1003,7 @@ void Internals::setAutofilled(Element* element, bool enabled, ExceptionCode& ec)
|
| void Internals::scrollElementToRect(Element* element, long x, long y, long w, long h, ExceptionCode& ec)
|
| {
|
| if (!element || !element->document() || !element->document()->view()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
| FrameView* frameView = element->document()->view();
|
| @@ -1013,7 +1013,7 @@ void Internals::scrollElementToRect(Element* element, long x, long y, long w, lo
|
| void Internals::paintControlTints(Document* document, ExceptionCode& ec)
|
| {
|
| if (!document || !document->view()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| @@ -1024,7 +1024,7 @@ void Internals::paintControlTints(Document* document, ExceptionCode& ec)
|
| PassRefPtr<Range> Internals::rangeFromLocationAndLength(Element* scope, int rangeLocation, int rangeLength, ExceptionCode& ec)
|
| {
|
| if (!scope) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1034,7 +1034,7 @@ PassRefPtr<Range> Internals::rangeFromLocationAndLength(Element* scope, int rang
|
| unsigned Internals::locationFromRange(Element* scope, const Range* range, ExceptionCode& ec)
|
| {
|
| if (!scope || !range) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1047,7 +1047,7 @@ unsigned Internals::locationFromRange(Element* scope, const Range* range, Except
|
| unsigned Internals::lengthFromRange(Element* scope, const Range* range, ExceptionCode& ec)
|
| {
|
| if (!scope || !range) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1060,7 +1060,7 @@ unsigned Internals::lengthFromRange(Element* scope, const Range* range, Exceptio
|
| String Internals::rangeAsText(const Range* range, ExceptionCode& ec)
|
| {
|
| if (!range) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| @@ -1070,7 +1070,7 @@ String Internals::rangeAsText(const Range* range, ExceptionCode& ec)
|
| PassRefPtr<DOMPoint> Internals::touchPositionAdjustedToBestClickableNode(long x, long y, long width, long height, Document* document, ExceptionCode& ec)
|
| {
|
| if (!document || !document->frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1092,7 +1092,7 @@ PassRefPtr<DOMPoint> Internals::touchPositionAdjustedToBestClickableNode(long x,
|
| Node* Internals::touchNodeAdjustedToBestClickableNode(long x, long y, long width, long height, Document* document, ExceptionCode& ec)
|
| {
|
| if (!document || !document->frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1110,7 +1110,7 @@ Node* Internals::touchNodeAdjustedToBestClickableNode(long x, long y, long width
|
| PassRefPtr<DOMPoint> Internals::touchPositionAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document* document, ExceptionCode& ec)
|
| {
|
| if (!document || !document->frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1132,7 +1132,7 @@ PassRefPtr<DOMPoint> Internals::touchPositionAdjustedToBestContextMenuNode(long
|
| Node* Internals::touchNodeAdjustedToBestContextMenuNode(long x, long y, long width, long height, Document* document, ExceptionCode& ec)
|
| {
|
| if (!document || !document->frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1150,7 +1150,7 @@ Node* Internals::touchNodeAdjustedToBestContextMenuNode(long x, long y, long wid
|
| PassRefPtr<ClientRect> Internals::bestZoomableAreaForTouchPoint(long x, long y, long width, long height, Document* document, ExceptionCode& ec)
|
| {
|
| if (!document || !document->frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1174,7 +1174,7 @@ int Internals::lastSpellCheckRequestSequence(Document* document, ExceptionCode&
|
| SpellChecker* checker = spellchecker(document);
|
|
|
| if (!checker) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return -1;
|
| }
|
|
|
| @@ -1186,7 +1186,7 @@ int Internals::lastSpellCheckProcessedSequence(Document* document, ExceptionCode
|
| SpellChecker* checker = spellchecker(document);
|
|
|
| if (!checker) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return -1;
|
| }
|
|
|
| @@ -1206,7 +1206,7 @@ void Internals::setUserPreferredLanguages(const Vector<String>& languages)
|
| unsigned Internals::wheelEventHandlerCount(Document* document, ExceptionCode& ec)
|
| {
|
| if (!document) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1216,7 +1216,7 @@ unsigned Internals::wheelEventHandlerCount(Document* document, ExceptionCode& ec
|
| unsigned Internals::touchEventHandlerCount(Document* document, ExceptionCode& ec)
|
| {
|
| if (!document) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1233,7 +1233,7 @@ unsigned Internals::touchEventHandlerCount(Document* document, ExceptionCode& ec
|
| PassRefPtr<ClientRectList> Internals::touchEventTargetClientRects(Document* document, ExceptionCode& ec)
|
| {
|
| if (!document || !document->view() || !document->page()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
| if (!document->page()->scrollingCoordinator())
|
| @@ -1255,7 +1255,7 @@ PassRefPtr<NodeList> Internals::nodesFromRect(Document* document, int centerX, i
|
| unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent, ExceptionCode& ec) const
|
| {
|
| if (!document || !document->frame() || !document->frame()->view()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1414,7 +1414,7 @@ void Internals::setInspectorResourcesDataSizeLimits(int maximumResourcesContentS
|
| {
|
| Page* page = contextDocument()->frame()->page();
|
| if (!page || !page->inspectorController()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
| page->inspectorController()->setResourcesDataSizeLimitsFromInternals(maximumResourcesContentSize, maximumSingleResourceContentSize);
|
| @@ -1446,7 +1446,7 @@ unsigned Internals::numberOfScrollableAreas(Document* document, ExceptionCode&)
|
| bool Internals::isPageBoxVisible(Document* document, int pageNumber, ExceptionCode& ec)
|
| {
|
| if (!document) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return false;
|
| }
|
|
|
| @@ -1466,7 +1466,7 @@ String Internals::elementLayerTreeAsText(Element* element, ExceptionCode& ec) co
|
| static PassRefPtr<NodeList> paintOrderList(Element* element, ExceptionCode& ec, RenderLayer::PaintOrderListType type)
|
| {
|
| if (!element) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1474,13 +1474,13 @@ static PassRefPtr<NodeList> paintOrderList(Element* element, ExceptionCode& ec,
|
|
|
| RenderObject* renderer = element->renderer();
|
| if (!renderer || !renderer->isBox()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| RenderLayer* layer = toRenderBox(renderer)->layer();
|
| if (!layer) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1502,7 +1502,7 @@ PassRefPtr<NodeList> Internals::paintOrderListAfterPromote(Element* element, Exc
|
| String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionCode& ec) const
|
| {
|
| if (!document || !document->frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| @@ -1512,7 +1512,7 @@ String Internals::layerTreeAsText(Document* document, unsigned flags, ExceptionC
|
| String Internals::elementLayerTreeAsText(Element* element, unsigned flags, ExceptionCode& ec) const
|
| {
|
| if (!element) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| @@ -1520,13 +1520,13 @@ String Internals::elementLayerTreeAsText(Element* element, unsigned flags, Excep
|
|
|
| RenderObject* renderer = element->renderer();
|
| if (!renderer || !renderer->isBox()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| RenderLayer* layer = toRenderBox(renderer)->layer();
|
| if (!layer) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| @@ -1541,7 +1541,7 @@ String Internals::elementLayerTreeAsText(Element* element, unsigned flags, Excep
|
| void Internals::setNeedsCompositedScrolling(Element* element, unsigned needsCompositedScrolling, ExceptionCode& ec)
|
| {
|
| if (!element) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| @@ -1549,13 +1549,13 @@ void Internals::setNeedsCompositedScrolling(Element* element, unsigned needsComp
|
|
|
| RenderObject* renderer = element->renderer();
|
| if (!renderer || !renderer->isBox()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| RenderLayer* layer = toRenderBox(renderer)->layer();
|
| if (!layer) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| @@ -1565,7 +1565,7 @@ void Internals::setNeedsCompositedScrolling(Element* element, unsigned needsComp
|
| String Internals::repaintRectsAsText(Document* document, ExceptionCode& ec) const
|
| {
|
| if (!document || !document->frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| @@ -1580,7 +1580,7 @@ String Internals::scrollingStateTreeAsText(Document* document, ExceptionCode& ec
|
| String Internals::mainThreadScrollingReasons(Document* document, ExceptionCode& ec) const
|
| {
|
| if (!document || !document->frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| @@ -1594,7 +1594,7 @@ String Internals::mainThreadScrollingReasons(Document* document, ExceptionCode&
|
| PassRefPtr<ClientRectList> Internals::nonFastScrollableRects(Document* document, ExceptionCode& ec) const
|
| {
|
| if (!document || !document->frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1608,7 +1608,7 @@ PassRefPtr<ClientRectList> Internals::nonFastScrollableRects(Document* document,
|
| void Internals::garbageCollectDocumentResources(Document* document, ExceptionCode& ec) const
|
| {
|
| if (!document) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| @@ -1688,7 +1688,7 @@ int Internals::numberOfPages(float pageWidth, float pageHeight)
|
| String Internals::pageProperty(String propertyName, int pageNumber, ExceptionCode& ec) const
|
| {
|
| if (!frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| @@ -1698,7 +1698,7 @@ String Internals::pageProperty(String propertyName, int pageNumber, ExceptionCod
|
| String Internals::pageSizeAndMarginsInPixels(int pageNumber, int width, int height, int marginTop, int marginRight, int marginBottom, int marginLeft, ExceptionCode& ec) const
|
| {
|
| if (!frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| @@ -1709,7 +1709,7 @@ void Internals::setDeviceScaleFactor(float scaleFactor, ExceptionCode& ec)
|
| {
|
| Document* document = contextDocument();
|
| if (!document || !document->page()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
| Page* page = document->page();
|
| @@ -1720,7 +1720,7 @@ void Internals::setPageScaleFactor(float scaleFactor, int x, int y, ExceptionCod
|
| {
|
| Document* document = contextDocument();
|
| if (!document || !document->page()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
| Page* page = document->page();
|
| @@ -1730,7 +1730,7 @@ void Internals::setPageScaleFactor(float scaleFactor, int x, int y, ExceptionCod
|
| void Internals::setIsCursorVisible(Document* document, bool isVisible, ExceptionCode& ec)
|
| {
|
| if (!document || !document->page()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
| document->page()->setIsCursorVisible(isVisible);
|
| @@ -1793,7 +1793,7 @@ Vector<String> Internals::getReferencedFilePaths() const
|
| void Internals::startTrackingRepaints(Document* document, ExceptionCode& ec)
|
| {
|
| if (!document || !document->view()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| @@ -1804,7 +1804,7 @@ void Internals::startTrackingRepaints(Document* document, ExceptionCode& ec)
|
| void Internals::stopTrackingRepaints(Document* document, ExceptionCode& ec)
|
| {
|
| if (!document || !document->view()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return;
|
| }
|
|
|
| @@ -1868,7 +1868,7 @@ static const char* cursorTypeToString(Cursor::Type cursorType)
|
| String Internals::getCurrentCursorInfo(Document* document, ExceptionCode& ec)
|
| {
|
| if (!document || !document->frame()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
| @@ -1925,7 +1925,7 @@ PassRefPtr<ClientRect> Internals::selectionBounds(ExceptionCode& ec)
|
| {
|
| Document* document = contextDocument();
|
| if (!document || !document->frame() || !document->frame()->selection()) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return 0;
|
| }
|
|
|
| @@ -1935,7 +1935,7 @@ PassRefPtr<ClientRect> Internals::selectionBounds(ExceptionCode& ec)
|
| String Internals::markerTextForListItem(Element* element, ExceptionCode& ec)
|
| {
|
| if (!element) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
| return WebCore::markerTextForListItem(element);
|
| @@ -1944,7 +1944,7 @@ String Internals::markerTextForListItem(Element* element, ExceptionCode& ec)
|
| String Internals::getImageSourceURL(Element* element, ExceptionCode& ec)
|
| {
|
| if (!element) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
| return element->imageSourceURL();
|
| @@ -1953,7 +1953,7 @@ String Internals::getImageSourceURL(Element* element, ExceptionCode& ec)
|
| String Internals::baseURL(Document* document, ExceptionCode& ec)
|
| {
|
| if (!document) {
|
| - ec = INVALID_ACCESS_ERR;
|
| + ec = InvalidAccessError;
|
| return String();
|
| }
|
|
|
|
|