Changeset 167923 in webkit


Ignore:
Timestamp:
Apr 28, 2014 9:20:37 PM (10 years ago)
Author:
mitz@apple.com
Message:

<rdar://problem/16750708> REGRESSION (r159358): Crash in InjectedBundleHitTestResult::frame
https://bugs.webkit.org/show_bug.cgi?id=132318

Reviewed by Andy Estes.

  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction): Fixed a typo: set
the source frame, not the destination frame.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Changed to get the
frame for the action not from a hit test result, because some link activation actions are
not mouse events, but rather from the event’s target.

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r167916 r167923  
     12014-04-28  Dan Bernstein  <mitz@apple.com>
     2
     3        <rdar://problem/16750708> REGRESSION (r159358): Crash in InjectedBundleHitTestResult::frame
     4        https://bugs.webkit.org/show_bug.cgi?id=132318
     5
     6        Reviewed by Andy Estes.
     7
     8        * UIProcess/Cocoa/NavigationState.mm:
     9        (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction): Fixed a typo: set
     10        the source frame, not the destination frame.
     11
     12        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     13        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Changed to get the
     14        frame for the action not from a hit test result, because some link activation actions are
     15        not mouse events, but rather from the event’s target.
     16
    1172014-04-28  Benjamin Poulain  <bpoulain@apple.com>
    218
  • trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm

    r167901 r167923  
    257257            [navigationAction setSourceFrame:[navigationAction targetFrame]];
    258258        else
    259             [navigationAction setTargetFrame:adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*sourceFrame]).get()];
     259            [navigationAction setSourceFrame:adoptNS([[WKFrameInfo alloc] initWithWebFrameProxy:*sourceFrame]).get()];
    260260    }
    261261
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r167916 r167923  
    734734    switch (action->navigationType()) {
    735735    case NavigationTypeLinkClicked:
    736         originatingFrame = action->hitTestResult()->frame();
     736        if (EventTarget* target = navigationAction.event()->target()) {
     737            if (Node* node = target->toNode()) {
     738                if (Frame* frame = node->document().frame())
     739                    originatingFrame = WebFrame::fromCoreFrame(*frame);
     740            }
     741        }
    737742        break;
    738743    case NavigationTypeFormSubmitted:
Note: See TracChangeset for help on using the changeset viewer.