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

Changeset 102192 in webkit


Ignore:
Timestamp:
Dec 6, 2011, 4:45:49 PM (15 years ago)
Author:
Lucas Forschler
Message:

Merged r95244.

Location:
branches/safari-534.53-branch/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-534.53-branch/Source/WebCore/ChangeLog

    r102191 r102192  
     12011-12-06  Lucas Forschler  <lforschler@apple.com>
     2
     3    Merge 95244
     4
     5    2011-09-15  Beth Dakin  <bdakin@apple.com>
     6
     7            https://bugs.webkit.org/show_bug.cgi?id=67884
     8            Delete button icon does not properly update when the device resolution changes
     9            dynamically
     10            -and corresponding-
     11            <rdar://problem/10104632>
     12
     13            Reviewed by Darin Adler.
     14
     15            In DeleteButtonController::deviceScaleFactorChanged(), if the delete button is
     16            currently showing, hide it and re-show it, forcing it to re-create the deletion
     17            UI.
     18            * editing/DeleteButtonController.cpp:
     19            (WebCore::DeleteButtonController::deviceScaleFactorChanged):
     20            * editing/DeleteButtonController.h:
     21            * editing/Editor.cpp:
     22            (WebCore::Editor::deviceScaleFactorChanged):
     23            * editing/Editor.h:
     24
     25            Iterate through all of the frames and propagate the deviceScaleFactorChange()
     26            message to Editor.
     27            * page/Page.cpp:
     28            (WebCore::Page::setDeviceScaleFactor):
     29
    1302011-12-06  Lucas Forschler  <lforschler@apple.com>
    231
  • branches/safari-534.53-branch/Source/WebCore/editing/DeleteButtonController.cpp

    r102032 r102192  
    186186}
    187187
     188void DeleteButtonController::deviceScaleFactorChanged()
     189{
     190    if (!enabled())
     191        return;
     192   
     193    HTMLElement* currentTarget = m_target.get();
     194    hide();
     195
     196    // Setting m_containerElement to 0 will force the deletionUI to be re-created with
     197    // artwork of the appropriate resolution in show().
     198    m_containerElement = 0;
     199    show(currentTarget);
     200}
     201
    188202void DeleteButtonController::createDeletionUI()
    189203{
  • branches/safari-534.53-branch/Source/WebCore/editing/DeleteButtonController.h

    r76248 r102192  
    4949    void respondToChangedSelection(const VisibleSelection& oldSelection);
    5050
     51    void deviceScaleFactorChanged();
     52
    5153    void show(HTMLElement*);
    5254    void hide();
  • branches/safari-534.53-branch/Source/WebCore/editing/Editor.cpp

    r92931 r102192  
    32623262}
    32633263
     3264void Editor::deviceScaleFactorChanged()
     3265{
     3266    m_deleteButtonController->deviceScaleFactorChanged();
     3267}
     3268
    32643269} // namespace WebCore
  • branches/safari-534.53-branch/Source/WebCore/editing/Editor.h

    r86520 r102192  
    378378    void deletedAutocorrectionAtPosition(const Position&, const String& originalString);
    379379
     380    void deviceScaleFactorChanged();
     381
    380382private:
    381383    Frame* m_frame;
  • branches/safari-534.53-branch/Source/WebCore/page/Page.cpp

    r102032 r102192  
    608608#endif
    609609
     610    for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext())
     611        frame->editor()->deviceScaleFactorChanged();
     612
    610613    backForward()->markPagesForFullStyleRecalc();
    611614}
Note: See TracChangeset for help on using the changeset viewer.