mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #13957 - mrobinson:scroll_root, r=glennw
Track overflow:scroll stacking contexts with ScrollRootId instead of StackingContextId <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because this PR should not change behavior. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13957) <!-- Reviewable:end -->
This commit is contained in:
commit
3a3f3192a8
31 changed files with 540 additions and 301 deletions
|
@ -57,7 +57,7 @@ use gfx::display_list::{StackingContext, StackingContextType, WebRenderImageInfo
|
|||
use gfx::font;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx::font_context;
|
||||
use gfx_traits::{Epoch, FragmentType, ScrollPolicy, StackingContextId, color};
|
||||
use gfx_traits::{Epoch, FragmentType, ScrollPolicy, ScrollRootId, StackingContextId, color};
|
||||
use heapsize::HeapSizeOf;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
|
@ -1285,14 +1285,13 @@ impl LayoutThread {
|
|||
let mut layout_scroll_states = HashMap::new();
|
||||
for new_scroll_state in &new_scroll_states {
|
||||
let offset = new_scroll_state.scroll_offset;
|
||||
layout_scroll_states.insert(new_scroll_state.stacking_context_id, offset);
|
||||
layout_scroll_states.insert(new_scroll_state.scroll_root_id, offset);
|
||||
|
||||
if new_scroll_state.stacking_context_id == StackingContextId::root() {
|
||||
if new_scroll_state.scroll_root_id == ScrollRootId::root() {
|
||||
script_scroll_states.push((UntrustedNodeAddress::from_id(0), offset))
|
||||
} else if !new_scroll_state.stacking_context_id.is_special() &&
|
||||
new_scroll_state.stacking_context_id.fragment_type() ==
|
||||
FragmentType::FragmentBody {
|
||||
let id = new_scroll_state.stacking_context_id.id();
|
||||
} else if !new_scroll_state.scroll_root_id.is_special() &&
|
||||
new_scroll_state.scroll_root_id.fragment_type() == FragmentType::FragmentBody {
|
||||
let id = new_scroll_state.scroll_root_id.id();
|
||||
script_scroll_states.push((UntrustedNodeAddress::from_id(id), offset))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue