| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 WebCore::Node* inspected_node_; | 329 WebCore::Node* inspected_node_; |
| 330 | 330 |
| 331 // A way for the main frame to keep track of which frame has an active | 331 // A way for the main frame to keep track of which frame has an active |
| 332 // match. Should be NULL for all other frames. | 332 // match. Should be NULL for all other frames. |
| 333 WebFrameImpl* active_match_frame_; | 333 WebFrameImpl* active_match_frame_; |
| 334 | 334 |
| 335 // The range of the active match for the current frame. | 335 // The range of the active match for the current frame. |
| 336 RefPtr<WebCore::Range> active_match_; | 336 RefPtr<WebCore::Range> active_match_; |
| 337 | 337 |
| 338 // The index of the active match. | 338 // The index of the active match. |
| 339 size_t active_match_index_; | 339 int active_match_index_; |
| 340 | 340 |
| 341 // This flag is used by the scoping effort to determine if we need to figure | 341 // This flag is used by the scoping effort to determine if we need to figure |
| 342 // out which rectangle is the active match. Once we find the active | 342 // out which rectangle is the active match. Once we find the active |
| 343 // rectangle we clear this flag. | 343 // rectangle we clear this flag. |
| 344 bool locating_active_rect_; | 344 bool locating_active_rect_; |
| 345 | 345 |
| 346 // The scoping effort can time out and we need to keep track of where we | 346 // The scoping effort can time out and we need to keep track of where we |
| 347 // ended our last search so we can continue from where we left of. | 347 // ended our last search so we can continue from where we left of. |
| 348 RefPtr<WebCore::Range> resume_scoping_from_range_; | 348 RefPtr<WebCore::Range> resume_scoping_from_range_; |
| 349 | 349 |
| 350 // Keeps track of the last string this frame searched for. This is used for | 350 // Keeps track of the last string this frame searched for. This is used for |
| 351 // short-circuiting searches in the following scenarios: When a frame has | 351 // short-circuiting searches in the following scenarios: When a frame has |
| 352 // been searched and returned 0 results, we don't need to search that frame | 352 // been searched and returned 0 results, we don't need to search that frame |
| 353 // again if the user is just adding to the search (making it more specific). | 353 // again if the user is just adding to the search (making it more specific). |
| 354 std::wstring last_search_string_; | 354 std::wstring last_search_string_; |
| 355 | 355 |
| 356 // Keeps track of how many matches this frame has found so far, so that we | 356 // Keeps track of how many matches this frame has found so far, so that we |
| 357 // don't loose count between scoping efforts, and is also used (in conjunction | 357 // don't loose count between scoping efforts, and is also used (in conjunction |
| 358 // with last_search_string_ and scoping_complete_) to figure out if we need to | 358 // with last_search_string_ and scoping_complete_) to figure out if we need to |
| 359 // search the frame again. | 359 // search the frame again. |
| 360 size_t last_match_count_; | 360 int last_match_count_; |
| 361 | 361 |
| 362 // This variable keeps a cumulative total of matches found so far for ALL the | 362 // This variable keeps a cumulative total of matches found so far for ALL the |
| 363 // frames on the page, and is only incremented by calling IncreaseMatchCount | 363 // frames on the page, and is only incremented by calling IncreaseMatchCount |
| 364 // (on the main frame only). It should be -1 for all other frames. | 364 // (on the main frame only). It should be -1 for all other frames. |
| 365 size_t total_matchcount_; | 365 size_t total_matchcount_; |
| 366 | 366 |
| 367 // This variable keeps a cumulative total of how many frames are currently | 367 // This variable keeps a cumulative total of how many frames are currently |
| 368 // scoping, and is incremented/decremented on the main frame only. | 368 // scoping, and is incremented/decremented on the main frame only. |
| 369 // It should be -1 for all other frames. | 369 // It should be -1 for all other frames. |
| 370 int frames_scoping_count_; | 370 int frames_scoping_count_; |
| 371 | 371 |
| 372 // Keeps track of whether the scoping effort was completed (the user may | 372 // Keeps track of whether the scoping effort was completed (the user may |
| 373 // interrupt it before it completes by submitting a new search). | 373 // interrupt it before it completes by submitting a new search). |
| 374 bool scoping_complete_; | 374 bool scoping_complete_; |
| 375 | 375 |
| 376 // Keeps track of when the scoping effort should next invalidate the scrollbar | 376 // Keeps track of when the scoping effort should next invalidate the scrollbar |
| 377 // and the frame area. | 377 // and the frame area. |
| 378 size_t next_invalidate_after_; | 378 int next_invalidate_after_; |
| 379 | 379 |
| 380 private: | 380 private: |
| 381 // A bit mask specifying area of the frame to invalidate. | 381 // A bit mask specifying area of the frame to invalidate. |
| 382 enum AreaToInvalidate { | 382 enum AreaToInvalidate { |
| 383 INVALIDATE_NOTHING = 0, | 383 INVALIDATE_NOTHING = 0, |
| 384 INVALIDATE_CONTENT_AREA = 1, | 384 INVALIDATE_CONTENT_AREA = 1, |
| 385 INVALIDATE_SCROLLBAR = 2, // vertical scrollbar only. | 385 INVALIDATE_SCROLLBAR = 2, // vertical scrollbar only. |
| 386 INVALIDATE_ALL = 3 // both content area and the scrollbar. | 386 INVALIDATE_ALL = 3 // both content area and the scrollbar. |
| 387 }; | 387 }; |
| 388 | 388 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 // The input fields that are interested in edit events and their associated | 426 // The input fields that are interested in edit events and their associated |
| 427 // listeners. | 427 // listeners. |
| 428 typedef HashMap<RefPtr<WebCore::HTMLInputElement>, | 428 typedef HashMap<RefPtr<WebCore::HTMLInputElement>, |
| 429 webkit_glue::PasswordAutocompleteListener*> PasswordListenerMap; | 429 webkit_glue::PasswordAutocompleteListener*> PasswordListenerMap; |
| 430 PasswordListenerMap password_listeners_; | 430 PasswordListenerMap password_listeners_; |
| 431 | 431 |
| 432 DISALLOW_COPY_AND_ASSIGN(WebFrameImpl); | 432 DISALLOW_COPY_AND_ASSIGN(WebFrameImpl); |
| 433 }; | 433 }; |
| 434 | 434 |
| 435 #endif // WEBKIT_GLUE_WEBFRAME_IMPL_H_ | 435 #endif // WEBKIT_GLUE_WEBFRAME_IMPL_H_ |
| OLD | NEW |