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

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2348893002: Prune createVisiblePositionDeprecated from HTMLTextFormControlElement (Closed)
Patch Set: Created 4 years, 3 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 1565
1566 return StaticNodeList::adopt(matches); 1566 return StaticNodeList::adopt(matches);
1567 } 1567 }
1568 1568
1569 bool Internals::hasSpellingMarker(Document* document, int from, int length) 1569 bool Internals::hasSpellingMarker(Document* document, int from, int length)
1570 { 1570 {
1571 ASSERT(document); 1571 ASSERT(document);
1572 if (!document->frame()) 1572 if (!document->frame())
1573 return false; 1573 return false;
1574 1574
1575 document->updateStyleAndLayoutIgnorePendingStylesheets();
1575 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document Marker::Spelling, from, length); 1576 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document Marker::Spelling, from, length);
1576 } 1577 }
1577 1578
1578 void Internals::setSpellCheckingEnabled(bool enabled) 1579 void Internals::setSpellCheckingEnabled(bool enabled)
1579 { 1580 {
1580 if (!contextDocument() || !contextDocument()->frame()) 1581 if (!contextDocument() || !contextDocument()->frame())
1581 return; 1582 return;
1582 1583
1583 if (enabled != contextDocument()->frame()->spellChecker().isSpellCheckingEna bled()) 1584 if (enabled != contextDocument()->frame()->spellChecker().isSpellCheckingEna bled())
1584 contextDocument()->frame()->spellChecker().toggleSpellCheckingEnabled(); 1585 contextDocument()->frame()->spellChecker().toggleSpellCheckingEnabled();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 memoryCache()->setCapacities(minDeadBytes, maxDeadBytes, totalBytes); 1638 memoryCache()->setCapacities(minDeadBytes, maxDeadBytes, totalBytes);
1638 return result; 1639 return result;
1639 } 1640 }
1640 1641
1641 bool Internals::hasGrammarMarker(Document* document, int from, int length) 1642 bool Internals::hasGrammarMarker(Document* document, int from, int length)
1642 { 1643 {
1643 ASSERT(document); 1644 ASSERT(document);
1644 if (!document->frame()) 1645 if (!document->frame())
1645 return false; 1646 return false;
1646 1647
1648 document->updateStyleAndLayoutIgnorePendingStylesheets();
1647 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document Marker::Grammar, from, length); 1649 return document->frame()->spellChecker().selectionStartHasMarkerFor(Document Marker::Grammar, from, length);
1648 } 1650 }
1649 1651
1650 unsigned Internals::numberOfScrollableAreas(Document* document) 1652 unsigned Internals::numberOfScrollableAreas(Document* document)
1651 { 1653 {
1652 ASSERT(document); 1654 ASSERT(document);
1653 if (!document->frame()) 1655 if (!document->frame())
1654 return 0; 1656 return 0;
1655 1657
1656 unsigned count = 0; 1658 unsigned count = 0;
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2653 2655
2654 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); 2656 return ClientRect::create(FloatRect(node->layoutObject()->visualRect()));
2655 } 2657 }
2656 2658
2657 void Internals::crash() 2659 void Internals::crash()
2658 { 2660 {
2659 CHECK(false) << "Intentional crash"; 2661 CHECK(false) << "Intentional crash";
2660 } 2662 }
2661 2663
2662 } // namespace blink 2664 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698