Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/WebKit/Source/web/ContextMenuClientImpl.cpp

Issue 2414263002: Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in toNormalizedEphemeralRange (Closed)
Patch Set: fix nit Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 if (selectedFrame != m_webView->page()->mainFrame()) { 298 if (selectedFrame != m_webView->page()->mainFrame()) {
299 data.frameURL = urlFromFrame(selectedFrame); 299 data.frameURL = urlFromFrame(selectedFrame);
300 HistoryItem* historyItem = selectedFrame->loader().currentItem(); 300 HistoryItem* historyItem = selectedFrame->loader().currentItem();
301 if (historyItem) 301 if (historyItem)
302 data.frameHistoryItem = WebHistoryItem(historyItem); 302 data.frameHistoryItem = WebHistoryItem(historyItem);
303 } 303 }
304 304
305 if (r.isSelected()) { 305 if (r.isSelected()) {
306 if (!isHTMLInputElement(*r.innerNode()) || 306 if (!isHTMLInputElement(*r.innerNode()) ||
307 toHTMLInputElement(r.innerNode())->type() != InputTypeNames::password) 307 toHTMLInputElement(r.innerNode())->type() != InputTypeNames::password) {
308 // TODO(xiaochengh): Use of updateStyleAndLayoutIgnorePendingStylesheets
309 // needs to be audited. See http://crbug.com/590369 for more details.
310 // Plain text extraction requires clean layout.
311 selectedFrame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
312
308 data.selectedText = selectedFrame->selectedText().stripWhiteSpace(); 313 data.selectedText = selectedFrame->selectedText().stripWhiteSpace();
314 }
309 } 315 }
310 316
311 if (r.isContentEditable()) { 317 if (r.isContentEditable()) {
312 data.isEditable = true; 318 data.isEditable = true;
313 319
314 // Spellchecker adds spelling markers to misspelled words and attaches 320 // Spellchecker adds spelling markers to misspelled words and attaches
315 // suggestions to these markers in the background. Therefore, when a 321 // suggestions to these markers in the background. Therefore, when a
316 // user right-clicks a mouse on a word, Chrome just needs to find a 322 // user right-clicks a mouse on a word, Chrome just needs to find a
317 // spelling marker on the word instead of spellchecking it. 323 // spelling marker on the word instead of spellchecking it.
318 String description; 324 String description;
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 subMenuItems.swap(outputItems); 454 subMenuItems.swap(outputItems);
449 } 455 }
450 456
451 void ContextMenuClientImpl::populateCustomMenuItems( 457 void ContextMenuClientImpl::populateCustomMenuItems(
452 const ContextMenu* defaultMenu, 458 const ContextMenu* defaultMenu,
453 WebContextMenuData* data) { 459 WebContextMenuData* data) {
454 populateSubMenuItems(defaultMenu->items(), data->customItems); 460 populateSubMenuItems(defaultMenu->items(), data->customItems);
455 } 461 }
456 462
457 } // namespace blink 463 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/testing/Internals.cpp ('k') | third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698