OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 UseCounter::count(frame()->document(), UseCounter::CrossOriginWindowProm
pt); | 850 UseCounter::count(frame()->document(), UseCounter::CrossOriginWindowProm
pt); |
851 | 851 |
852 return String(); | 852 return String(); |
853 } | 853 } |
854 | 854 |
855 bool LocalDOMWindow::find(const String& string, bool caseSensitive, bool backwar
ds, bool wrap, bool wholeWord, bool /*searchInFrames*/, bool /*showDialog*/) con
st | 855 bool LocalDOMWindow::find(const String& string, bool caseSensitive, bool backwar
ds, bool wrap, bool wholeWord, bool /*searchInFrames*/, bool /*showDialog*/) con
st |
856 { | 856 { |
857 if (!isCurrentlyDisplayedInFrame()) | 857 if (!isCurrentlyDisplayedInFrame()) |
858 return false; | 858 return false; |
859 | 859 |
| 860 // Up-to-date, clean tree is required for finding text in page, since it rel
ies |
| 861 // on TextIterator to look over the text. |
| 862 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
| 863 |
860 // FIXME (13016): Support searchInFrames and showDialog | 864 // FIXME (13016): Support searchInFrames and showDialog |
861 FindOptions options = (backwards ? Backwards : 0) | (caseSensitive ? 0 : Cas
eInsensitive) | (wrap ? WrapAround : 0) | (wholeWord ? WholeWord | AtWordStarts
: 0); | 865 FindOptions options = (backwards ? Backwards : 0) | (caseSensitive ? 0 : Cas
eInsensitive) | (wrap ? WrapAround : 0) | (wholeWord ? WholeWord | AtWordStarts
: 0); |
862 return frame()->editor().findString(string, options); | 866 return frame()->editor().findString(string, options); |
863 } | 867 } |
864 | 868 |
865 bool LocalDOMWindow::offscreenBuffering() const | 869 bool LocalDOMWindow::offscreenBuffering() const |
866 { | 870 { |
867 return true; | 871 return true; |
868 } | 872 } |
869 | 873 |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1539 { | 1543 { |
1540 // If the LocalDOMWindow still has a frame reference, that frame must point | 1544 // If the LocalDOMWindow still has a frame reference, that frame must point |
1541 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation | 1545 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation |
1542 // where script execution leaks between different LocalDOMWindows. | 1546 // where script execution leaks between different LocalDOMWindows. |
1543 if (m_frameObserver->frame()) | 1547 if (m_frameObserver->frame()) |
1544 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); | 1548 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); |
1545 return m_frameObserver->frame(); | 1549 return m_frameObserver->frame(); |
1546 } | 1550 } |
1547 | 1551 |
1548 } // namespace blink | 1552 } // namespace blink |
OLD | NEW |