| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 HTMLFormElement* form = selectedFrame->selection().currentForm(); | 340 HTMLFormElement* form = selectedFrame->selection().currentForm(); |
| 341 if (form && isHTMLInputElement(*r.innerNode())) { | 341 if (form && isHTMLInputElement(*r.innerNode())) { |
| 342 HTMLInputElement& selectedElement = toHTMLInputElement(*r.innerNode()); | 342 HTMLInputElement& selectedElement = toHTMLInputElement(*r.innerNode()); |
| 343 WebSearchableFormData ws = WebSearchableFormData( | 343 WebSearchableFormData ws = WebSearchableFormData( |
| 344 WebFormElement(form), WebInputElement(&selectedElement)); | 344 WebFormElement(form), WebInputElement(&selectedElement)); |
| 345 if (ws.url().isValid()) | 345 if (ws.url().isValid()) |
| 346 data.keywordURL = ws.url(); | 346 data.keywordURL = ws.url(); |
| 347 } | 347 } |
| 348 } | 348 } |
| 349 | 349 |
| 350 // TODO(editing-dev): The use of updateStyleAndLayoutIgnorePendingStylesheets |
| 351 // needs to be audited. See http://crbug.com/590369 for more details. |
| 352 // Plain text extraction requires clean layout. |
| 353 selectedFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 354 |
| 350 if (selectedFrame->editor().selectionHasStyle(CSSPropertyDirection, "ltr") != | 355 if (selectedFrame->editor().selectionHasStyle(CSSPropertyDirection, "ltr") != |
| 351 FalseTriState) | 356 FalseTriState) |
| 352 data.writingDirectionLeftToRight |= | 357 data.writingDirectionLeftToRight |= |
| 353 WebContextMenuData::CheckableMenuItemChecked; | 358 WebContextMenuData::CheckableMenuItemChecked; |
| 354 if (selectedFrame->editor().selectionHasStyle(CSSPropertyDirection, "rtl") != | 359 if (selectedFrame->editor().selectionHasStyle(CSSPropertyDirection, "rtl") != |
| 355 FalseTriState) | 360 FalseTriState) |
| 356 data.writingDirectionRightToLeft |= | 361 data.writingDirectionRightToLeft |= |
| 357 WebContextMenuData::CheckableMenuItemChecked; | 362 WebContextMenuData::CheckableMenuItemChecked; |
| 358 | 363 |
| 359 data.referrerPolicy = static_cast<WebReferrerPolicy>( | 364 data.referrerPolicy = static_cast<WebReferrerPolicy>( |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 subMenuItems.swap(outputItems); | 459 subMenuItems.swap(outputItems); |
| 455 } | 460 } |
| 456 | 461 |
| 457 void ContextMenuClientImpl::populateCustomMenuItems( | 462 void ContextMenuClientImpl::populateCustomMenuItems( |
| 458 const ContextMenu* defaultMenu, | 463 const ContextMenu* defaultMenu, |
| 459 WebContextMenuData* data) { | 464 WebContextMenuData* data) { |
| 460 populateSubMenuItems(defaultMenu->items(), data->customItems); | 465 populateSubMenuItems(defaultMenu->items(), data->customItems); |
| 461 } | 466 } |
| 462 | 467 |
| 463 } // namespace blink | 468 } // namespace blink |
| OLD | NEW |