⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 155419 in webkit


Ignore:
Timestamp:
Sep 9, 2013, 11:07:40 PM (13 years ago)
Author:
akling@apple.com
Message:

HTMLTextAreaElement no longer needs custom style resolve callbacks.
<https://webkit.org/b/121073>

Reviewed by Ryosuke Niwa.

After r155408 HTMLTextAreaElement doesn't override didAttachRenderer() anymore,
so we don't need to fire callbacks on textarea elements during style resolve.

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::HTMLTextAreaElement):

Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r155417 r155419  
     12013-09-09  Andreas Kling  <akling@apple.com>
     2
     3        HTMLTextAreaElement no longer needs custom style resolve callbacks.
     4        <https://webkit.org/b/121073>
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        After r155408 HTMLTextAreaElement doesn't override didAttachRenderer() anymore,
     9        so we don't need to fire callbacks on textarea elements during style resolve.
     10
     11        * html/HTMLTextAreaElement.cpp:
     12        (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
     13
    1142013-09-09  Andreas Kling  <akling@apple.com>
    215
  • trunk/Source/WebCore/html/HTMLTextAreaElement.cpp

    r155408 r155419  
    9999    ASSERT(hasTagName(textareaTag));
    100100    setFormControlValueMatchesRenderer(true);
    101     setHasCustomStyleResolveCallbacks();
    102101}
    103102
  • trunk/Source/WebCore/page/Frame.cpp

    r155417 r155419  
    162162    , m_selection(adoptPtr(new FrameSelection(this)))
    163163    , m_eventHandler(adoptPtr(new EventHandler(*this)))
    164     , m_animationController(adoptPtr(new AnimationController(this)))
     164    , m_animationController(createOwned<AnimationController>(*this)))
    165165    , m_pageZoomFactor(parentPageZoomFactor(this))
    166166    , m_textZoomFactor(parentTextZoomFactor(this))
  • trunk/Source/WebCore/page/animation/AnimationController.cpp

    r154877 r155419  
    5151static const double cBeginAnimationUpdateTimeNotSet = -1;
    5252
    53 AnimationControllerPrivate::AnimationControllerPrivate(Frame* frame)
     53AnimationControllerPrivate::AnimationControllerPrivate(Frame& frame)
    5454    : m_animationTimer(this, &AnimationControllerPrivate::animationTimerFired)
    5555    , m_updateStyleIfNeededDispatcher(this, &AnimationControllerPrivate::updateStyleIfNeededDispatcherFired)
     
    113113
    114114    if (calledSetChanged)
    115         m_frame->document()->updateStyleIfNeeded();
     115        m_frame.document()->updateStyleIfNeeded();
    116116
    117117    return timeToNextService;
     
    164164{
    165165    // Protect the frame from getting destroyed in the event handler
    166     RefPtr<Frame> protector = m_frame;
     166    Ref<Frame> protector(m_frame);
    167167
    168168    bool updateStyle = !m_eventsToDispatch.isEmpty() || !m_nodeChangesToDispatch.isEmpty();
     
    187187    m_nodeChangesToDispatch.clear();
    188188
    189     if (updateStyle && m_frame)
    190         m_frame->document()->updateStyleIfNeeded();
     189    if (updateStyle)
     190        m_frame.document()->updateStyleIfNeeded();
    191191}
    192192
     
    225225
    226226    if (timeToNextService >= 0)
    227         m_frame->document()->view()->scheduleAnimation();
     227        m_frame.document()->view()->scheduleAnimation();
    228228}
    229229#endif
     
    267267        return;
    268268
    269     suspendAnimationsForDocument(m_frame->document());
     269    suspendAnimationsForDocument(m_frame.document());
    270270
    271271    // Traverse subframes
    272     for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree().nextSibling())
     272    for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling())
    273273        child->animation().suspendAnimations();
    274274
     
    281281        return;
    282282
    283     resumeAnimationsForDocument(m_frame->document());
     283    resumeAnimationsForDocument(m_frame.document());
    284284
    285285    // Traverse subframes
    286     for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree().nextSibling())
     286    for (Frame* child = m_frame.tree().firstChild(); child; child = child->tree().nextSibling())
    287287        child->animation().resumeAnimations();
    288288
     
    491491}
    492492
    493 AnimationController::AnimationController(Frame* frame)
    494     : m_data(adoptPtr(new AnimationControllerPrivate(frame)))
     493AnimationController::AnimationController(Frame& frame)
     494    : m_data(createOwned<AnimationControllerPrivate>(frame)))
    495495    , m_beginAnimationUpdateCount(0)
    496496{
  • trunk/Source/WebCore/page/animation/AnimationController.h

    r153396 r155419  
    4747class AnimationController {
    4848public:
    49     AnimationController(Frame*);
     49    explicit AnimationController(Frame&);
    5050    ~AnimationController();
    5151
     
    8484
    8585private:
    86     OwnPtr<AnimationControllerPrivate> m_data;
     86    const OwnPtr<AnimationControllerPrivate> m_data;
    8787    int m_beginAnimationUpdateCount;
    8888};
  • trunk/Source/WebCore/page/animation/AnimationControllerPrivate.h

    r153926 r155419  
    5959    WTF_MAKE_NONCOPYABLE(AnimationControllerPrivate); WTF_MAKE_FAST_ALLOCATED;
    6060public:
    61     AnimationControllerPrivate(Frame*);
     61    explicit AnimationControllerPrivate(Frame&);
    6262    ~AnimationControllerPrivate();
    6363
     
    126126    Timer<AnimationControllerPrivate> m_animationTimer;
    127127    Timer<AnimationControllerPrivate> m_updateStyleIfNeededDispatcher;
    128     Frame* m_frame;
     128    Frame& m_frame;
    129129   
    130130    class EventToDispatch {
Note: See TracChangeset for help on using the changeset viewer.