| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 int request_id); | 292 int request_id); |
| 293 | 293 |
| 294 // Resource fetcher for downloading an alternate DNS error page. | 294 // Resource fetcher for downloading an alternate DNS error page. |
| 295 scoped_ptr<AltErrorPageResourceFetcher> alt_error_page_fetcher_; | 295 scoped_ptr<AltErrorPageResourceFetcher> alt_error_page_fetcher_; |
| 296 | 296 |
| 297 // Used to check for leaks of this object. | 297 // Used to check for leaks of this object. |
| 298 static int live_object_count_; | 298 static int live_object_count_; |
| 299 | 299 |
| 300 WebFrameLoaderClient frame_loader_client_; | 300 WebFrameLoaderClient frame_loader_client_; |
| 301 | 301 |
| 302 // This is a factory for creating cancelable tasks for this frame that run |
| 303 // asynchronously in order to scope string matches during a find operation. |
| 304 ScopedRunnableMethodFactory<WebFrameImpl> scope_matches_factory_; |
| 305 |
| 302 // Holding a reference back to the WebViewImpl is necessary to ensure that | 306 // Holding a reference back to the WebViewImpl is necessary to ensure that |
| 303 // its HWND is not destroyed before all of the WebCore::Widgets, which refer | 307 // its HWND is not destroyed before all of the WebCore::Widgets, which refer |
| 304 // to the WebViewImpl's HWND as their containingWindow. However, this ref | 308 // to the WebViewImpl's HWND as their containingWindow. However, this ref |
| 305 // creates a cycle between the WebViewImpl and the top-most WebFrameImpl. We | 309 // creates a cycle between the WebViewImpl and the top-most WebFrameImpl. We |
| 306 // break this cycle in our Closing method. | 310 // break this cycle in our Closing method. |
| 307 scoped_refptr<WebViewImpl> webview_impl_; | 311 scoped_refptr<WebViewImpl> webview_impl_; |
| 308 | 312 |
| 309 // The WebCore frame associated with this frame. MAY BE NULL if the frame | 313 // The WebCore frame associated with this frame. MAY BE NULL if the frame |
| 310 // has been detached from the DOM. | 314 // has been detached from the DOM. |
| 311 WTF::RefPtr<WebCore::Frame> frame_; | 315 WTF::RefPtr<WebCore::Frame> frame_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 324 WebPluginDelegate* plugin_delegate_; | 328 WebPluginDelegate* plugin_delegate_; |
| 325 | 329 |
| 326 // Frame construction parameters | 330 // Frame construction parameters |
| 327 bool allows_scrolling_; | 331 bool allows_scrolling_; |
| 328 int margin_width_; | 332 int margin_width_; |
| 329 int margin_height_; | 333 int margin_height_; |
| 330 | 334 |
| 331 // Handling requests from TextInputController on this frame. | 335 // Handling requests from TextInputController on this frame. |
| 332 scoped_ptr<WebTextInputImpl> webtextinput_impl_; | 336 scoped_ptr<WebTextInputImpl> webtextinput_impl_; |
| 333 | 337 |
| 338 // The node selected in the web inspector. Used for highlighting it on the pag
e. |
| 339 WebCore::Node* inspected_node_; |
| 340 |
| 334 // This vector maintains a list of Ranges representing locations for search | 341 // This vector maintains a list of Ranges representing locations for search |
| 335 // string matches that were found in the frame during a FindInPage operation. | 342 // string matches that were found in the frame during a FindInPage operation. |
| 336 Vector<RefPtr<WebCore::Range> > tickmarks_; | 343 Vector<RefPtr<WebCore::Range> > tickmarks_; |
| 337 | 344 |
| 338 // The node selected in the web inspector. Used for highlighting it on the pag
e. | 345 // A way for the main frame to keep track of which frame has an active |
| 339 WebCore::Node* inspected_node_; | 346 // tickmark. Should be NULL for all other frames. |
| 347 WebFrameImpl* active_tickmark_frame_; |
| 340 | 348 |
| 341 // The index of the active tickmark for the current frame. | 349 // The index of the active tickmark for the current frame. |
| 342 size_t active_tickmark_; | 350 size_t active_tickmark_; |
| 343 | 351 |
| 344 // This flag is used by the scoping effort to determine if we need to figure | 352 // This flag is used by the scoping effort to determine if we need to figure |
| 345 // out which rectangle is the active tickmark. Once we find the active | 353 // out which rectangle is the active tickmark. Once we find the active |
| 346 // rectangle we clear this flag. | 354 // rectangle we clear this flag. |
| 347 bool locating_active_rect_; | 355 bool locating_active_rect_; |
| 348 | 356 |
| 349 // This rectangle is used during the scoping effort to figure out what rect | 357 // This rectangle is used during the scoping effort to figure out what rect |
| (...skipping 24 matching lines...) Expand all Loading... |
| 374 // don't loose count between scoping efforts, and is also used (in conjunction | 382 // don't loose count between scoping efforts, and is also used (in conjunction |
| 375 // with last_search_string_ and scoping_complete_) to figure out if we need to | 383 // with last_search_string_ and scoping_complete_) to figure out if we need to |
| 376 // search the frame again. | 384 // search the frame again. |
| 377 int last_match_count_; | 385 int last_match_count_; |
| 378 | 386 |
| 379 // This variable keeps a cumulative total of matches found so far for ALL the | 387 // This variable keeps a cumulative total of matches found so far for ALL the |
| 380 // frames on the page, and is only incremented by calling IncreaseMatchCount | 388 // frames on the page, and is only incremented by calling IncreaseMatchCount |
| 381 // (on the main frame only). It should be -1 for all other frames. | 389 // (on the main frame only). It should be -1 for all other frames. |
| 382 int total_matchcount_; | 390 int total_matchcount_; |
| 383 | 391 |
| 384 // A way for the main frame to keep track of which frame has an active | |
| 385 // tickmark. Should be NULL for all other frames. | |
| 386 WebFrameImpl* active_tickmark_frame_; | |
| 387 | |
| 388 // This variable keeps a cumulative total of how many frames are currently | 392 // This variable keeps a cumulative total of how many frames are currently |
| 389 // scoping, and is incremented/decremented on the main frame only. | 393 // scoping, and is incremented/decremented on the main frame only. |
| 390 // It should be -1 for all other frames. | 394 // It should be -1 for all other frames. |
| 391 int frames_scoping_count_; | 395 int frames_scoping_count_; |
| 392 | 396 |
| 393 // Keeps track of whether the scoping effort was completed (the user may | 397 // Keeps track of whether the scoping effort was completed (the user may |
| 394 // interrupt it before it completes by submitting a new search). | 398 // interrupt it before it completes by submitting a new search). |
| 395 bool scoping_complete_; | 399 bool scoping_complete_; |
| 396 | 400 |
| 397 // Keeps track of when the scoping effort should next invalidate the scrollbar | 401 // Keeps track of when the scoping effort should next invalidate the scrollbar |
| 398 // and the frame area. | 402 // and the frame area. |
| 399 int next_invalidate_after_; | 403 int next_invalidate_after_; |
| 400 | 404 |
| 401 // This is a factory for creating cancelable tasks for this frame that run | |
| 402 // asynchronously in order to scope string matches during a find operation. | |
| 403 ScopedRunnableMethodFactory<WebFrameImpl> scope_matches_factory_; | |
| 404 | |
| 405 private: | 405 private: |
| 406 // A bit mask specifying area of the frame to invalidate. | 406 // A bit mask specifying area of the frame to invalidate. |
| 407 enum AreaToInvalidate { | 407 enum AreaToInvalidate { |
| 408 INVALIDATE_NOTHING = 0, | 408 INVALIDATE_NOTHING = 0, |
| 409 INVALIDATE_CONTENT_AREA = 1, | 409 INVALIDATE_CONTENT_AREA = 1, |
| 410 INVALIDATE_SCROLLBAR = 2, // vertical scrollbar only. | 410 INVALIDATE_SCROLLBAR = 2, // vertical scrollbar only. |
| 411 INVALIDATE_ALL = 3 // both content area and the scrollbar. | 411 INVALIDATE_ALL = 3 // both content area and the scrollbar. |
| 412 }; | 412 }; |
| 413 | 413 |
| 414 // Invalidates a certain area within the frame. | 414 // Invalidates a certain area within the frame. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 442 // In "printing" mode. Used as a state check. | 442 // In "printing" mode. Used as a state check. |
| 443 bool printing_; | 443 bool printing_; |
| 444 | 444 |
| 445 // For each printed page, the view of the document in pixels. | 445 // For each printed page, the view of the document in pixels. |
| 446 Vector<WebCore::IntRect> pages_; | 446 Vector<WebCore::IntRect> pages_; |
| 447 | 447 |
| 448 DISALLOW_COPY_AND_ASSIGN(WebFrameImpl); | 448 DISALLOW_COPY_AND_ASSIGN(WebFrameImpl); |
| 449 }; | 449 }; |
| 450 | 450 |
| 451 #endif // WEBKIT_GLUE_WEBFRAME_IMPL_H_ | 451 #endif // WEBKIT_GLUE_WEBFRAME_IMPL_H_ |
| OLD | NEW |