| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 data.writingDirectionLeftToRight |= WebContextMenuData::CheckableMenuIte
mChecked; | 320 data.writingDirectionLeftToRight |= WebContextMenuData::CheckableMenuIte
mChecked; |
| 321 if (selectedFrame->editor().selectionHasStyle(CSSPropertyDirection, "rtl") !
= FalseTriState) | 321 if (selectedFrame->editor().selectionHasStyle(CSSPropertyDirection, "rtl") !
= FalseTriState) |
| 322 data.writingDirectionRightToLeft |= WebContextMenuData::CheckableMenuIte
mChecked; | 322 data.writingDirectionRightToLeft |= WebContextMenuData::CheckableMenuIte
mChecked; |
| 323 | 323 |
| 324 // Now retrieve the security info. | 324 // Now retrieve the security info. |
| 325 DocumentLoader* dl = selectedFrame->loader().documentLoader(); | 325 DocumentLoader* dl = selectedFrame->loader().documentLoader(); |
| 326 WebDataSource* ds = WebDataSourceImpl::fromDocumentLoader(dl); | 326 WebDataSource* ds = WebDataSourceImpl::fromDocumentLoader(dl); |
| 327 if (ds) | 327 if (ds) |
| 328 data.securityInfo = ds->response().securityInfo(); | 328 data.securityInfo = ds->response().securityInfo(); |
| 329 | 329 |
| 330 data.referrerPolicy = static_cast<WebReferrerPolicy>(selectedFrame->document
()->referrerPolicy()); | 330 data.referrerPolicy = static_cast<WebReferrerPolicy>(selectedFrame->document
()->getReferrerPolicy()); |
| 331 | 331 |
| 332 // Filter out custom menu elements and add them into the data. | 332 // Filter out custom menu elements and add them into the data. |
| 333 populateCustomMenuItems(defaultMenu, &data); | 333 populateCustomMenuItems(defaultMenu, &data); |
| 334 | 334 |
| 335 if (isHTMLAnchorElement(r.URLElement())) { | 335 if (isHTMLAnchorElement(r.URLElement())) { |
| 336 HTMLAnchorElement* anchor = toHTMLAnchorElement(r.URLElement()); | 336 HTMLAnchorElement* anchor = toHTMLAnchorElement(r.URLElement()); |
| 337 | 337 |
| 338 // Extract suggested filename for saving file. | 338 // Extract suggested filename for saving file. |
| 339 data.suggestedFilename = anchor->fastGetAttribute(HTMLNames::downloadAtt
r); | 339 data.suggestedFilename = anchor->fastGetAttribute(HTMLNames::downloadAtt
r); |
| 340 | 340 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 outputItems[i] = subItems[i]; | 414 outputItems[i] = subItems[i]; |
| 415 subMenuItems.swap(outputItems); | 415 subMenuItems.swap(outputItems); |
| 416 } | 416 } |
| 417 | 417 |
| 418 void ContextMenuClientImpl::populateCustomMenuItems(const ContextMenu* defaultMe
nu, WebContextMenuData* data) | 418 void ContextMenuClientImpl::populateCustomMenuItems(const ContextMenu* defaultMe
nu, WebContextMenuData* data) |
| 419 { | 419 { |
| 420 populateSubMenuItems(defaultMenu->items(), data->customItems); | 420 populateSubMenuItems(defaultMenu->items(), data->customItems); |
| 421 } | 421 } |
| 422 | 422 |
| 423 } // namespace blink | 423 } // namespace blink |
| OLD | NEW |