Changeset 89002 in webkit
- Timestamp:
- Jun 15, 2011, 9:25:11 PM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r89001 r89002 1 2011-06-15 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Anders Carlsson. 4 5 Remove ScriptController::isJavaScriptAnchorNavigation 6 https://bugs.webkit.org/show_bug.cgi?id=62775 7 8 This function no longer plays a role in the user gesture code now that 9 we're not encoding the user gesture state into the ScriptSourceCode 10 URL. 11 12 * bindings/js/ScriptController.cpp: 13 (WebCore::ScriptController::processingUserGesture): 14 * bindings/js/ScriptController.h: 15 * bindings/v8/ScriptController.cpp: 16 (WebCore::ScriptController::processingUserGesture): 17 1 18 2011-06-15 Adam Barth <abarth@webkit.org> 2 19 -
trunk/Source/WebCore/bindings/js/ScriptController.cpp
r89001 r89002 252 252 return UserGestureIndicator::getUserGestureState() != DefinitelyNotProcessingUserGesture; 253 253 254 // FIXME: Remove the isJavaScriptAnchorNavigation check once https://bugs.webkit.org/show_bug.cgi?id=62702 is fixed.255 if (frame->script()->isJavaScriptAnchorNavigation())256 return true;257 258 254 // If a DOM event is being processed, check that it was initiated by the user 259 255 // and that it is in the whitelist of event types allowed to generate pop-ups. … … 263 259 264 260 return UserGestureIndicator::processingUserGesture(); 265 }266 267 // FIXME: This seems like an insufficient check to verify a click on a javascript: anchor.268 bool ScriptController::isJavaScriptAnchorNavigation() const269 {270 // This is the <a href="javascript:window.open('...')> case -> we let it through271 if (m_sourceURL && m_sourceURL->isNull() && !m_processingTimerCallback)272 return true;273 274 // This is the <script>window.open(...)</script> case or a timer callback -> block it275 return false;276 261 } 277 262 -
trunk/Source/WebCore/bindings/js/ScriptController.h
r89001 r89002 170 170 void disconnectPlatformScriptObjects(); 171 171 172 bool isJavaScriptAnchorNavigation() const;173 174 172 ShellMap m_windowShells; 175 173 Frame* m_frame; … … 178 176 bool m_inExecuteScript; 179 177 180 bool m_processingTimerCallback;181 178 bool m_paused; 182 179 -
trunk/Source/WebCore/bindings/v8/ScriptController.cpp
r89001 r89002 171 171 return event->fromUserGesture(); 172 172 173 // FIXME: Remove this check once https://bugs.webkit.org/show_bug.cgi?id=62702 is fixed.174 const String* sourceURL = firstFrame->script()->sourceURL();175 if (sourceURL && sourceURL->isNull() && !firstFrame->script()->proxy()->timerCallback())176 return true;177 178 173 return UserGestureIndicator::processingUserGesture(); 179 174 }
Note:
See TracChangeset
for help on using the changeset viewer.