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 3403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3414 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver seNext()) { | 3414 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver seNext()) { |
3415 if (!frame->isLocalFrame()) | 3415 if (!frame->isLocalFrame()) |
3416 continue; | 3416 continue; |
3417 const DocumentMarkerVector& documentMarkers = toLocalFrame(frame)->docum ent()->markers().markers(); | 3417 const DocumentMarkerVector& documentMarkers = toLocalFrame(frame)->docum ent()->markers().markers(); |
3418 for (size_t i = 0; i < documentMarkers.size(); ++i) | 3418 for (size_t i = 0; i < documentMarkers.size(); ++i) |
3419 result.append(documentMarkers[i]->hash()); | 3419 result.append(documentMarkers[i]->hash()); |
3420 } | 3420 } |
3421 markers->assign(result); | 3421 markers->assign(result); |
3422 } | 3422 } |
3423 | 3423 |
3424 void WebViewImpl::removeSpellingMarkersUnderWords(const WebVector<WebString>& wo rds) | |
3425 { | |
3426 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traver seNext()) { | |
3427 if (!frame->isLocalFrame()) | |
3428 continue; | |
3429 | |
3430 Vector<String> convertedWords; | |
3431 convertedWords.append(words.data(), words.size()); | |
please use gerrit instead
2014/08/15 19:08:07
Although the number of frames may be slow, it's be
Klemen Forstnerič
2014/08/16 15:45:50
Done.
| |
3432 | |
3433 toLocalFrame(frame)->removeSpellingMarkersUnderWords(convertedWords); | |
3434 } | |
3435 } | |
3436 | |
3424 WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPo int, const WebPoint& screenPoint, DragAction dragAction, int keyModifiers) | 3437 WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPo int, const WebPoint& screenPoint, DragAction dragAction, int keyModifiers) |
3425 { | 3438 { |
3426 ASSERT(m_currentDragData); | 3439 ASSERT(m_currentDragData); |
3427 | 3440 |
3428 m_currentDragData->setModifierKeyState(webInputEventKeyStateToPlatformEventK eyState(keyModifiers)); | 3441 m_currentDragData->setModifierKeyState(webInputEventKeyStateToPlatformEventK eyState(keyModifiers)); |
3429 DragData dragData( | 3442 DragData dragData( |
3430 m_currentDragData.get(), | 3443 m_currentDragData.get(), |
3431 clientPoint, | 3444 clientPoint, |
3432 screenPoint, | 3445 screenPoint, |
3433 static_cast<DragOperation>(m_operationsAllowed)); | 3446 static_cast<DragOperation>(m_operationsAllowed)); |
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4258 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); | 4271 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); |
4259 | 4272 |
4260 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) | 4273 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) |
4261 return false; | 4274 return false; |
4262 | 4275 |
4263 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4276 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
4264 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); | 4277 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); |
4265 } | 4278 } |
4266 | 4279 |
4267 } // namespace blink | 4280 } // namespace blink |
OLD | NEW |