Changeset 105245 in webkit


Ignore:
Timestamp:
Jan 17, 2012 10:55:01 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[Internals] Should be able to access corresponding Document object.
https://bugs.webkit.org/show_bug.cgi?id=76425

.:

Added exported symbols.

Patch by Hajime Morrita <morrita@chromium.org> on 2012-01-17
Reviewed by Adam Barth.

  • Source/autotools/symbols.filter:

Source/WebCore:

Patch by Hajime Morrita <morrita@chromium.org> on 2012-01-17
Reviewed by Adam Barth.

  • Allow FrameDestructionObserver to re-setting the Frame reference.
  • Make Internals a subclass of FrameDestructionObserver.

Since Internals::reset() is called for each test, we can access
the acive Frame object during the test. The frame reference will be
used by coming changes.

No new tests. Covered by existing tests.

  • WebCore.exp.in:
  • page/FrameDestructionObserver.cpp:

(WebCore::FrameDestructionObserver::FrameDestructionObserver):
(WebCore::FrameDestructionObserver::~FrameDestructionObserver):
(WebCore::FrameDestructionObserver::observe):

  • page/FrameDestructionObserver.h:
  • testing/Internals.cpp:

(WebCore::Internals::Internals):
(WebCore::Internals::reset):

  • testing/Internals.h:

Source/WebKit2:

Patch by Hajime Morrita <morrita@chromium.org> on 2012-01-17
Reviewed by Adam Barth.

  • win/WebKit2.def: Added exporting symbols.
  • win/WebKit2CFLite.def: Added exporting symbols.
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r105224 r105245  
     12012-01-17  Hajime Morrita  <morrita@chromium.org>
     2
     3        [Internals] Should be able to access corresponding Document object.
     4        https://bugs.webkit.org/show_bug.cgi?id=76425
     5
     6        Added exported symbols.
     7
     8        Reviewed by Adam Barth.
     9
     10        * Source/autotools/symbols.filter:
     11
    1122012-01-17  Stephen Chenney  <schenney@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r105244 r105245  
     12012-01-17  Hajime Morrita  <morrita@chromium.org>
     2
     3        [Internals] Should be able to access corresponding Document object.
     4        https://bugs.webkit.org/show_bug.cgi?id=76425
     5
     6        Reviewed by Adam Barth.
     7
     8        - Allow FrameDestructionObserver to re-setting the Frame reference.
     9        - Make Internals a subclass of FrameDestructionObserver.
     10
     11        Since Internals::reset() is called for each test, we can access
     12        the acive Frame object during the test. The frame reference will be
     13        used by coming changes.
     14
     15        No new tests. Covered by existing tests.
     16
     17        * WebCore.exp.in:
     18        * page/FrameDestructionObserver.cpp:
     19        (WebCore::FrameDestructionObserver::FrameDestructionObserver):
     20        (WebCore::FrameDestructionObserver::~FrameDestructionObserver):
     21        (WebCore::FrameDestructionObserver::observe):
     22        * page/FrameDestructionObserver.h:
     23        * testing/Internals.cpp:
     24        (WebCore::Internals::Internals):
     25        (WebCore::Internals::reset):
     26        * testing/Internals.h:
     27
    1282012-01-17  Dominic Mazzoni  <dmazzoni@google.com>
    229
  • trunk/Source/WebCore/WebCore.exp.in

    r105243 r105245  
    658658__ZN7WebCore24deleteCookiesForHostnameERKN3WTF6StringE
    659659__ZN7WebCore24fileSystemRepresentationERKN3WTF6StringE
     660__ZN7WebCore24FrameDestructionObserverD2Ev
     661__ZN7WebCore24FrameDestructionObserverC2EPNS_5FrameE
     662__ZN7WebCore24FrameDestructionObserver12observeFrameEPNS_5FrameE
     663__ZN7WebCore24FrameDestructionObserver14frameDestroyedEv
    660664__ZN7WebCore24notifyHistoryItemChangedE
    661665__ZN7WebCore25HistoryPropertyListWriter11releaseDataEv
  • trunk/Source/WebCore/page/FrameDestructionObserver.cpp

    r104344 r105245  
    3232
    3333FrameDestructionObserver::FrameDestructionObserver(Frame* frame)
    34     : m_frame(frame)
     34    : m_frame(0)
    3535{
    36     if (m_frame)
    37         m_frame->addDestructionObserver(this);
     36    observeFrame(frame);
    3837}
    3938
    4039FrameDestructionObserver::~FrameDestructionObserver()
    4140{
     41    observeFrame(0);
     42
     43}
     44
     45void FrameDestructionObserver::observeFrame(Frame* frame)
     46{
    4247    if (m_frame)
    4348        m_frame->removeDestructionObserver(this);
     49
     50    m_frame = frame;
     51
     52    if (m_frame)
     53        m_frame->addDestructionObserver(this);
    4454}
    4555
  • trunk/Source/WebCore/page/FrameDestructionObserver.h

    r104344 r105245  
    3939protected:
    4040    virtual ~FrameDestructionObserver();
     41    void observeFrame(Frame*);
    4142
    4243    Frame* m_frame;
  • trunk/Source/WebCore/testing/Internals.cpp

    r105126 r105245  
    114114
    115115Internals::Internals()
    116     : m_passwordEchoDurationInSecondsBackup(0)
     116    : FrameDestructionObserver(0)
     117    , m_passwordEchoDurationInSecondsBackup(0)
    117118    , m_passwordEchoDurationInSecondsBackedUp(false)
    118119    , m_passwordEchoEnabledBackedUp(false)
     
    467468        return;
    468469
     470    observeFrame(document->frame());
     471
    469472    if (m_passwordEchoDurationInSecondsBackedUp) {
    470473        document->settings()->setPasswordEchoDurationInSeconds(m_passwordEchoDurationInSecondsBackup);
  • trunk/Source/WebCore/testing/Internals.h

    r105126 r105245  
    2727#define Internals_h
    2828
     29#include "FrameDestructionObserver.h"
    2930#include "PlatformString.h"
    3031#include <wtf/PassRefPtr.h>
     
    4243typedef int ExceptionCode;
    4344
    44 class Internals : public RefCounted<Internals> {
     45class Internals : public RefCounted<Internals>,
     46                  public FrameDestructionObserver {
    4547public:
    4648    static PassRefPtr<Internals> create();
  • trunk/Source/WebKit2/ChangeLog

    r105234 r105245  
     12012-01-17  Hajime Morrita  <morrita@chromium.org>
     2
     3        [Internals] Should be able to access corresponding Document object.
     4        https://bugs.webkit.org/show_bug.cgi?id=76425
     5
     6        Reviewed by Adam Barth.
     7
     8        * win/WebKit2.def: Added exporting symbols.
     9        * win/WebKit2CFLite.def: Added exporting symbols.
     10
    1112012-01-17  Matthew Delaney  <mdelaney@apple.com>
    212
  • trunk/Source/WebKit2/win/WebKit2.def

    r104174 r105245  
    134134        ?waitForThreadCompletion@WTF@@YAHIPAPAX@Z
    135135        ?createThread@WTF@@YAIP6APAXPAX@Z0@Z
    136 
    137136        ; Re-exports from WebCore for test harnesses
    138137        ??0NodeRenderingContext@WebCore@@QAE@PAVNode@1@@Z
     
    144143        ??0String@WTF@@QAE@PBD@Z
    145144        ??0String@WTF@@QAE@PB_W@Z
     145        ??1FrameDestructionObserver@WebCore@@MAE@XZ
     146        ??0FrameDestructionObserver@WebCore@@QAE@PAVFrame@1@@Z
    146147        ?absoluteBoundingBoxRect@RenderObject@WebCore@@QBE?AVIntRect@2@_N@Z
    147148        ?absoluteBoundingBoxRectIgnoringTransforms@RenderObject@WebCore@@QBE?AVIntRect@2@XZ
     
    157158        ?equalIgnoringCase@WTF@@YA_NPAVStringImpl@1@PBE@Z
    158159        ?externalRepresentation@WebCore@@YA?AVString@WTF@@PAVElement@1@I@Z
     160        ?frameDestroyed@FrameDestructionObserver@WebCore@@UAEXXZ
    159161        ?getCachedDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PBUClassInfo@3@@Z
    160162        ?getData16SlowCase@StringImpl@WTF@@ABEPB_WXZ
     
    165167        ?lastChangeWasUserEdit@HTMLTextFormControlElement@WebCore@@QBE_NXZ
    166168        ?markersFor@DocumentMarkerController@WebCore@@QAE?AV?$Vector@PAVDocumentMarker@WebCore@@$0A@@WTF@@PAVNode@2@VMarkerTypes@DocumentMarker@2@@Z
     169        ?observeFrame@FrameDestructionObserver@WebCore@@IAEXPAVFrame@2@@Z
    167170        ?page@Document@WebCore@@QBEPAVPage@2@XZ
    168171        ?paintControlTints@FrameView@WebCore@@AAEXXZ
  • trunk/Source/WebKit2/win/WebKit2CFLite.def

    r104174 r105245  
    137137        ??0String@WTF@@QAE@PBD@Z
    138138        ??0String@WTF@@QAE@PB_W@Z
     139        ??1FrameDestructionObserver@WebCore@@MAE@XZ
     140        ??0FrameDestructionObserver@WebCore@@QAE@PAVFrame@1@@Z
    139141        ?absoluteBoundingBoxRect@RenderObject@WebCore@@QBE?AVIntRect@2@_N@Z
    140142        ?absoluteBoundingBoxRectIgnoringTransforms@RenderObject@WebCore@@QBE?AVIntRect@2@XZ
     
    150152        ?equalIgnoringCase@WTF@@YA_NPAVStringImpl@1@PBE@Z
    151153        ?externalRepresentation@WebCore@@YA?AVString@WTF@@PAVElement@1@I@Z
     154        ?frameDestroyed@FrameDestructionObserver@WebCore@@UAEXXZ
    152155        ?getCachedDOMStructure@WebCore@@YAPAVStructure@JSC@@PAVJSDOMGlobalObject@1@PBUClassInfo@3@@Z
    153156        ?getData16SlowCase@StringImpl@WTF@@ABEPB_WXZ
     
    158161        ?lastChangeWasUserEdit@HTMLTextFormControlElement@WebCore@@QBE_NXZ
    159162        ?markersFor@DocumentMarkerController@WebCore@@QAE?AV?$Vector@PAVDocumentMarker@WebCore@@$0A@@WTF@@PAVNode@2@VMarkerTypes@DocumentMarker@2@@Z
     163        ?observeFrame@FrameDestructionObserver@WebCore@@IAEXPAVFrame@2@@Z
    160164        ?page@Document@WebCore@@QBEPAVPage@2@XZ
    161165        ?paintControlTints@FrameView@WebCore@@AAEXXZ
  • trunk/Source/autotools/symbols.filter

    r104827 r105245  
    8686_ZN7WebCore9FrameView19scrollElementToRectEPNS_7ElementERKNS_7IntRectE;
    8787_ZN7WebCore9FrameView43setShouldLayoutFixedElementsRelativeToFrameEb;
     88_ZN7WebCore24FrameDestructionObserverD2Ev;
     89_ZN7WebCore24FrameDestructionObserverC2EPNS_5FrameE;
     90_ZN7WebCore24FrameDestructionObserver7observeEPNS_5FrameE;
     91_ZN7WebCore24FrameDestructionObserver14frameDestroyedEv;
    8892local:
    8993_Z*;
Note: See TracChangeset for help on using the changeset viewer.