Changeset 138632 in webkit
- Timestamp:
- Jan 2, 2013 12:31:44 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r138605 r138632 1 2013-01-02 Elliott Sprehn <esprehn@chromium.org> 2 3 Transitions and animations do not apply to CSS ::before and ::after pseudo-elements 4 https://bugs.webkit.org/show_bug.cgi?id=92591 5 6 Reviewed by Eric Seidel. 7 8 Expose Element::pseudoElement for Internals. 9 10 * Source/autotools/symbols.filter: 11 1 12 2013-01-01 KwangYong Choi <ky0.choi@samsung.com> 2 13 -
trunk/LayoutTests/ChangeLog
r138631 r138632 1 2013-01-02 Elliott Sprehn <esprehn@chromium.org> 2 3 Transitions and animations do not apply to CSS ::before and ::after pseudo-elements 4 https://bugs.webkit.org/show_bug.cgi?id=92591 5 6 Reviewed by Eric Seidel. 7 8 Add tests that check if animations and transitions play for pseudo 9 :before and :after pseudo elements. 10 11 * fast/css-generated-content/pseudo-animation-expected.txt: Added. 12 * fast/css-generated-content/pseudo-animation.html: Added. 13 * fast/css-generated-content/pseudo-transition-expected.txt: Added. 14 * fast/css-generated-content/pseudo-transition.html: Added. 15 1 16 2013-01-02 Chris Rogers <crogers@google.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r138631 r138632 1 2013-01-02 Elliott Sprehn <esprehn@chromium.org> 2 3 Transitions and animations do not apply to CSS ::before and ::after pseudo-elements 4 https://bugs.webkit.org/show_bug.cgi?id=92591 5 6 Reviewed by Eric Seidel. 7 8 The new DOM based :before and :after pseudo elements support animations 9 and transitions already, but I had disabled support so we could turn them 10 on in a separate step. This patch just removes the checks and adds tests. 11 12 This also adds two methods to internals to allow pausing animations and 13 transitions on pseudo elements at predictable locations so the tests 14 are not flaky. 15 16 Tests: fast/css-generated-content/pseudo-animation.html 17 fast/css-generated-content/pseudo-transition.html 18 19 * WebCore.exp.in: 20 * page/animation/AnimationController.cpp: 21 (WebCore::AnimationController::updateAnimations): 22 * testing/Internals.cpp: 23 (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): 24 (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): 25 * testing/Internals.h: 26 (Internals): 27 * testing/Internals.idl: 28 1 29 2013-01-02 Chris Rogers <crogers@google.com> 2 30 -
trunk/Source/WebCore/WebCore.exp.in
r138553 r138632 893 893 __ZN7WebCore7Element9innerTextEv 894 894 __ZN7WebCore7Element9setPseudoERKN3WTF12AtomicStringE 895 __ZNK7WebCore7Element13pseudoElementENS_8PseudoIdE 895 896 __ZN7WebCore7IntRect5scaleEf 896 897 __ZN7WebCore7IntRect5uniteERKS0_ -
trunk/Source/WebCore/page/animation/AnimationController.cpp
r137243 r138632 511 511 return newStyle; 512 512 513 // FIXME: We do not animate generated content yet.514 if (renderer->isPseudoElement())515 return newStyle;516 517 513 RenderStyle* oldStyle = renderer->style(); 518 514 … … 528 524 // have changed, we reset the animation. We then do a blend to get new values and we return 529 525 // a new style. 530 ASSERT(renderer->node() && !renderer->isPseudoElement()); // FIXME: We do not animate generated content yet. 526 527 // We don't support anonymous pseudo elements like :first-line or :first-letter. 528 ASSERT(renderer->node()); 531 529 532 530 RefPtr<CompositeAnimation> rendererAnimations = m_data->accessCompositeAnimation(renderer); -
trunk/Source/WebCore/testing/Internals.cpp
r137939 r138632 69 69 #include "Page.h" 70 70 #include "PrintContext.h" 71 #include "PseudoElement.h" 71 72 #include "Range.h" 72 73 #include "RenderObject.h" … … 386 387 ASSERT_NOT_REACHED(); 387 388 return false; 389 } 390 391 bool Internals::pauseAnimationAtTimeOnPseudoElement(const String& animationName, double pauseTime, Element* element, const String& pseudoId, ExceptionCode& ec) 392 { 393 if (!element || pauseTime < 0) { 394 ec = INVALID_ACCESS_ERR; 395 return false; 396 } 397 398 if (pseudoId != "before" && pseudoId != "after") { 399 ec = INVALID_ACCESS_ERR; 400 return false; 401 } 402 403 PseudoElement* pseudoElement = element->pseudoElement(pseudoId == "before" ? BEFORE : AFTER); 404 if (!pseudoElement) { 405 ec = INVALID_ACCESS_ERR; 406 return false; 407 } 408 409 return frame()->animation()->pauseAnimationAtTime(pseudoElement->renderer(), animationName, pauseTime); 410 } 411 412 bool Internals::pauseTransitionAtTimeOnPseudoElement(const String& property, double pauseTime, Element* element, const String& pseudoId, ExceptionCode& ec) 413 { 414 if (!element || pauseTime < 0) { 415 ec = INVALID_ACCESS_ERR; 416 return false; 417 } 418 419 if (pseudoId != "before" && pseudoId != "after") { 420 ec = INVALID_ACCESS_ERR; 421 return false; 422 } 423 424 PseudoElement* pseudoElement = element->pseudoElement(pseudoId == "before" ? BEFORE : AFTER); 425 if (!pseudoElement) { 426 ec = INVALID_ACCESS_ERR; 427 return false; 428 } 429 430 return frame()->animation()->pauseTransitionAtTime(pseudoElement->renderer(), property, pauseTime); 388 431 } 389 432 -
trunk/Source/WebCore/testing/Internals.h
r137939 r138632 95 95 void setShadowPseudoId(Element*, const String&, ExceptionCode&); 96 96 97 bool pauseAnimationAtTimeOnPseudoElement(const String& animationName, double pauseTime, Element*, const String& pseudoId, ExceptionCode&); 98 bool pauseTransitionAtTimeOnPseudoElement(const String& property, double pauseTime, Element*, const String& pseudoId, ExceptionCode&); 99 97 100 PassRefPtr<Element> createContentElement(Document*, ExceptionCode&); 98 101 bool isValidContentSelect(Element* insertionPoint, ExceptionCode&); -
trunk/Source/WebCore/testing/Internals.idl
r137939 r138632 66 66 boolean hasSelectorForPseudoClassInShadow(in Element host, in DOMString pseudoClass) raises (DOMException); 67 67 68 boolean pauseAnimationAtTimeOnPseudoElement(in DOMString animationName, in double pauseTime, in Element element, in DOMString pseudoId) raises (DOMException); 69 boolean pauseTransitionAtTimeOnPseudoElement(in DOMString property, in double pauseTime, in Element element, in DOMString pseudoId) raises (DOMException); 70 68 71 Node nextSiblingByWalker(in Node node) raises(DOMException); 69 72 Node firstChildByWalker(in Node node) raises(DOMException); -
trunk/Source/autotools/symbols.filter
r138404 r138632 125 125 _ZN7WebCore7Element20removeShadowRootListEv; 126 126 _ZN7WebCore7Element9setPseudoERKN3WTF12AtomicStringE; 127 _ZNK7WebCore7Element13pseudoElementENS_8PseudoIdE; 127 128 _ZN7WebCore7jsArrayEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEN3WTF10PassRefPtrINS_13DOMStringListEEE; 128 129 _ZN7WebCore7toRangeEN3JSC7JSValueE; … … 158 159 _ZN7WebCore19AnimationController17suspendAnimationsEv; 159 160 _ZN7WebCore19AnimationController16resumeAnimationsEv; 161 _ZN7WebCore19AnimationController20pauseAnimationAtTimeEPNS_12RenderObjectERKN3WTF6StringEd; 162 _ZN7WebCore19AnimationController21pauseTransitionAtTimeEPNS_12RenderObjectERKN3WTF6StringEd; 160 163 _ZN7WebCore19InspectorController18setProfilerEnabledEb; 161 164 _ZN7WebCore19InspectorController15profilerEnabledEv;
Note: See TracChangeset
for help on using the changeset viewer.