OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 3355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3366 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver seNext()) { | 3366 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver seNext()) { |
3367 if (!frame->isLocalFrame()) | 3367 if (!frame->isLocalFrame()) |
3368 continue; | 3368 continue; |
3369 const DocumentMarkerVector& documentMarkers = toLocalFrame(frame)->docum ent()->markers().markers(); | 3369 const DocumentMarkerVector& documentMarkers = toLocalFrame(frame)->docum ent()->markers().markers(); |
3370 for (size_t i = 0; i < documentMarkers.size(); ++i) | 3370 for (size_t i = 0; i < documentMarkers.size(); ++i) |
3371 result.append(documentMarkers[i]->hash()); | 3371 result.append(documentMarkers[i]->hash()); |
3372 } | 3372 } |
3373 markers->assign(result); | 3373 markers->assign(result); |
3374 } | 3374 } |
3375 | 3375 |
3376 void WebViewImpl::removeSpellingMarkersUnderWords(const WebVector<WebString>& wo rds) | |
3377 { | |
3378 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver seNext()) { | |
3379 if (!frame->isLocalFrame()) | |
3380 continue; | |
3381 | |
3382 LocalFrame* localFrame = static_cast<LocalFrame*>(frame); | |
dcheng
2014/08/14 17:34:28
Please use toLocalFrame() instead of static_cast<L
| |
3383 WebLocalFrameImpl* webLocalFrame = | |
3384 WebLocalFrameImpl::fromFrame(localFrame); | |
tkent
2014/08/14 01:17:15
You don't need to wrap this code.
Klemen Forstnerič
2014/08/14 16:42:54
I don't understand this comment. Could you please
dcheng
2014/08/14 17:34:28
I think he means that you can just directly call t
tkent
2014/08/14 22:59:47
I meant
WebLocalFrameImpl* webLocalFrame =
| |
3385 webLocalFrame->removeSpellingMarkersUnderWords(words); | |
3386 } | |
3387 } | |
3388 | |
3376 WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPo int, const WebPoint& screenPoint, DragAction dragAction, int keyModifiers) | 3389 WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPo int, const WebPoint& screenPoint, DragAction dragAction, int keyModifiers) |
3377 { | 3390 { |
3378 ASSERT(m_currentDragData); | 3391 ASSERT(m_currentDragData); |
3379 | 3392 |
3380 m_currentDragData->setModifierKeyState(webInputEventKeyStateToPlatformEventK eyState(keyModifiers)); | 3393 m_currentDragData->setModifierKeyState(webInputEventKeyStateToPlatformEventK eyState(keyModifiers)); |
3381 DragData dragData( | 3394 DragData dragData( |
3382 m_currentDragData.get(), | 3395 m_currentDragData.get(), |
3383 clientPoint, | 3396 clientPoint, |
3384 screenPoint, | 3397 screenPoint, |
3385 static_cast<DragOperation>(m_operationsAllowed)); | 3398 static_cast<DragOperation>(m_operationsAllowed)); |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4232 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); | 4245 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); |
4233 | 4246 |
4234 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4247 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4235 return false; | 4248 return false; |
4236 | 4249 |
4237 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4250 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4238 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4251 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
4239 } | 4252 } |
4240 | 4253 |
4241 } // namespace blink | 4254 } // namespace blink |
OLD | NEW |