| 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 Node* Internals::parentTreeScope(Node* node, ExceptionState& exceptionState) | 373 Node* Internals::parentTreeScope(Node* node, ExceptionState& exceptionState) |
| 374 { | 374 { |
| 375 if (!node) { | 375 if (!node) { |
| 376 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); | 376 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); |
| 377 return 0; | 377 return 0; |
| 378 } | 378 } |
| 379 const TreeScope* parentTreeScope = node->treeScope().parentTreeScope(); | 379 const TreeScope* parentTreeScope = node->treeScope().parentTreeScope(); |
| 380 return parentTreeScope ? parentTreeScope->rootNode() : 0; | 380 return parentTreeScope ? parentTreeScope->rootNode() : 0; |
| 381 } | 381 } |
| 382 | 382 |
| 383 bool Internals::hasSelectorForIdInShadow(Element* host, const String& idValue, E
xceptionState& exceptionState) | 383 bool Internals::hasSelectorForIdInShadow(Element* host, const AtomicString& idVa
lue, ExceptionState& exceptionState) |
| 384 { | 384 { |
| 385 if (!host || !host->shadow()) { | 385 if (!host || !host->shadow()) { |
| 386 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); | 386 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); |
| 387 return 0; | 387 return 0; |
| 388 } | 388 } |
| 389 | 389 |
| 390 return host->shadow()->ensureSelectFeatureSet().hasSelectorForId(idValue); | 390 return host->shadow()->ensureSelectFeatureSet().hasSelectorForId(idValue); |
| 391 } | 391 } |
| 392 | 392 |
| 393 bool Internals::hasSelectorForClassInShadow(Element* host, const String& classNa
me, ExceptionState& exceptionState) | 393 bool Internals::hasSelectorForClassInShadow(Element* host, const AtomicString& c
lassName, ExceptionState& exceptionState) |
| 394 { | 394 { |
| 395 if (!host || !host->shadow()) { | 395 if (!host || !host->shadow()) { |
| 396 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); | 396 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); |
| 397 return 0; | 397 return 0; |
| 398 } | 398 } |
| 399 | 399 |
| 400 return host->shadow()->ensureSelectFeatureSet().hasSelectorForClass(classNam
e); | 400 return host->shadow()->ensureSelectFeatureSet().hasSelectorForClass(classNam
e); |
| 401 } | 401 } |
| 402 | 402 |
| 403 bool Internals::hasSelectorForAttributeInShadow(Element* host, const String& att
ributeName, ExceptionState& exceptionState) | 403 bool Internals::hasSelectorForAttributeInShadow(Element* host, const AtomicStrin
g& attributeName, ExceptionState& exceptionState) |
| 404 { | 404 { |
| 405 if (!host || !host->shadow()) { | 405 if (!host || !host->shadow()) { |
| 406 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); | 406 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); |
| 407 return 0; | 407 return 0; |
| 408 } | 408 } |
| 409 | 409 |
| 410 return host->shadow()->ensureSelectFeatureSet().hasSelectorForAttribute(attr
ibuteName); | 410 return host->shadow()->ensureSelectFeatureSet().hasSelectorForAttribute(attr
ibuteName); |
| 411 } | 411 } |
| 412 | 412 |
| 413 bool Internals::hasSelectorForPseudoClassInShadow(Element* host, const String& p
seudoClass, ExceptionState& exceptionState) | 413 bool Internals::hasSelectorForPseudoClassInShadow(Element* host, const String& p
seudoClass, ExceptionState& exceptionState) |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 case ShadowRoot::UserAgentShadowRoot: | 671 case ShadowRoot::UserAgentShadowRoot: |
| 672 return String("UserAgentShadowRoot"); | 672 return String("UserAgentShadowRoot"); |
| 673 case ShadowRoot::AuthorShadowRoot: | 673 case ShadowRoot::AuthorShadowRoot: |
| 674 return String("AuthorShadowRoot"); | 674 return String("AuthorShadowRoot"); |
| 675 default: | 675 default: |
| 676 ASSERT_NOT_REACHED(); | 676 ASSERT_NOT_REACHED(); |
| 677 return String("Unknown"); | 677 return String("Unknown"); |
| 678 } | 678 } |
| 679 } | 679 } |
| 680 | 680 |
| 681 String Internals::shadowPseudoId(Element* element, ExceptionState& exceptionStat
e) | 681 const AtomicString& Internals::shadowPseudoId(Element* element, ExceptionState&
exceptionState) |
| 682 { | 682 { |
| 683 if (!element) { | 683 if (!element) { |
| 684 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); | 684 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); |
| 685 return String(); | 685 return nullAtom; |
| 686 } | 686 } |
| 687 | 687 |
| 688 return element->shadowPseudoId().string(); | 688 return element->shadowPseudoId(); |
| 689 } | 689 } |
| 690 | 690 |
| 691 void Internals::setShadowPseudoId(Element* element, const String& id, ExceptionS
tate& exceptionState) | 691 void Internals::setShadowPseudoId(Element* element, const AtomicString& id, Exce
ptionState& exceptionState) |
| 692 { | 692 { |
| 693 if (!element) { | 693 if (!element) { |
| 694 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); | 694 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessErr
or); |
| 695 return; | 695 return; |
| 696 } | 696 } |
| 697 | 697 |
| 698 return element->setShadowPseudoId(id); | 698 return element->setShadowPseudoId(id); |
| 699 } | 699 } |
| 700 | 700 |
| 701 String Internals::visiblePlaceholder(Element* element) | 701 String Internals::visiblePlaceholder(Element* element) |
| (...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2320 if (view->compositor()) | 2320 if (view->compositor()) |
| 2321 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe
ferredWork); | 2321 view->compositor()->updateCompositingLayers(CompositingUpdateFinishAllDe
ferredWork); |
| 2322 } | 2322 } |
| 2323 | 2323 |
| 2324 void Internals::setZoomFactor(float factor) | 2324 void Internals::setZoomFactor(float factor) |
| 2325 { | 2325 { |
| 2326 frame()->setPageZoomFactor(factor); | 2326 frame()->setPageZoomFactor(factor); |
| 2327 } | 2327 } |
| 2328 | 2328 |
| 2329 } | 2329 } |
| OLD | NEW |