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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1094 if (!host) | 1094 if (!host) |
1095 return String(); | 1095 return String(); |
1096 | 1096 |
1097 String returnValue; | 1097 String returnValue; |
1098 if (host->chrome().runJavaScriptPrompt(frame(), message, defaultValue, retur nValue)) | 1098 if (host->chrome().runJavaScriptPrompt(frame(), message, defaultValue, retur nValue)) |
1099 return returnValue; | 1099 return returnValue; |
1100 | 1100 |
1101 return String(); | 1101 return String(); |
1102 } | 1102 } |
1103 | 1103 |
1104 bool LocalDOMWindow::find(const String& string, bool caseSensitive, bool backwar ds, bool wrap, bool /*wholeWord*/, bool /*searchInFrames*/, bool /*showDialog*/) const | 1104 bool LocalDOMWindow::find(const String& string, bool caseSensitive, bool backwar ds, bool wrap, bool wholeWord, bool /*searchInFrames*/, bool /*showDialog*/) con st |
1105 { | 1105 { |
1106 if (!isCurrentlyDisplayedInFrame()) | 1106 if (!isCurrentlyDisplayedInFrame()) |
1107 return false; | 1107 return false; |
1108 | 1108 |
1109 // |frame()| can be destructed during |Editor::findString()| via | 1109 // |frame()| can be destructed during |Editor::findString()| via |
1110 // |Document::updateLayout()|, e.g. event handler removes a frame. | 1110 // |Document::updateLayout()|, e.g. event handler removes a frame. |
1111 RefPtrWillBeRawPtr<LocalFrame> protectFrame(frame()); | 1111 RefPtrWillBeRawPtr<LocalFrame> protectFrame(frame()); |
1112 | 1112 |
1113 // FIXME (13016): Support wholeWord, searchInFrames and showDialog | 1113 // FIXME (13016): Support searchInFrames and showDialog |
1114 return frame()->editor().findString(string, !backwards, caseSensitive, wrap, false); | 1114 FindOptions options = (backwards ? Backwards : 0) | (caseSensitive ? 0 : Cas eInsensitive) | (wrap ? WrapAround : 0) | (wholeWord ? WholeWord | AtWordStarts: 0); |
Yuta Kitamura
2015/04/30 07:51:51
nit: Space needed between "AtWordStarts" and ":"
| |
1115 return frame()->editor().findString(string, options); | |
1115 } | 1116 } |
1116 | 1117 |
1117 bool LocalDOMWindow::offscreenBuffering() const | 1118 bool LocalDOMWindow::offscreenBuffering() const |
1118 { | 1119 { |
1119 return true; | 1120 return true; |
1120 } | 1121 } |
1121 | 1122 |
1122 int LocalDOMWindow::outerHeight() const | 1123 int LocalDOMWindow::outerHeight() const |
1123 { | 1124 { |
1124 if (!frame()) | 1125 if (!frame()) |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1915 return m_frameObserver->frame(); | 1916 return m_frameObserver->frame(); |
1916 } | 1917 } |
1917 | 1918 |
1918 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate) | 1919 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate) |
1919 { | 1920 { |
1920 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. | 1921 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. |
1921 return v8::Handle<v8::Object>(); | 1922 return v8::Handle<v8::Object>(); |
1922 } | 1923 } |
1923 | 1924 |
1924 } // namespace blink | 1925 } // namespace blink |
OLD | NEW |