Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp

Issue 2604073002: Apply offset from the correct graphics layer; simplify code for link highlights. (Closed)
Patch Set: none Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2445 matching lines...) Expand 10 before | Expand all | Expand 10 after
2456 rect.expand(collapsedMarginBoxLogicalOutsets()); 2456 rect.expand(collapsedMarginBoxLogicalOutsets());
2457 rects.append(pixelSnappedIntRect(rect)); 2457 rects.append(pixelSnappedIntRect(rect));
2458 continuation()->absoluteRects( 2458 continuation()->absoluteRects(
2459 rects, 2459 rects,
2460 accumulatedOffset - 2460 accumulatedOffset -
2461 toLayoutSize( 2461 toLayoutSize(
2462 location() + 2462 location() +
2463 inlineElementContinuation()->containingBlock()->location())); 2463 inlineElementContinuation()->containingBlock()->location()));
2464 } 2464 }
2465 2465
2466 void LayoutBlockFlow::absoluteQuads(Vector<FloatQuad>& quads) const { 2466 void LayoutBlockFlow::absoluteQuads(Vector<FloatQuad>& quads,
2467 MapCoordinatesFlags mode) const {
2467 if (!isAnonymousBlockContinuation()) { 2468 if (!isAnonymousBlockContinuation()) {
2468 LayoutBlock::absoluteQuads(quads); 2469 LayoutBlock::absoluteQuads(quads, mode);
2469 return; 2470 return;
2470 } 2471 }
2471 LayoutBoxModelObject::absoluteQuads(quads); 2472 LayoutBoxModelObject::absoluteQuads(quads, mode);
2472 } 2473 }
2473 2474
2474 void LayoutBlockFlow::absoluteQuadsForSelf(Vector<FloatQuad>& quads) const { 2475 void LayoutBlockFlow::absoluteQuadsForSelf(Vector<FloatQuad>& quads,
2476 MapCoordinatesFlags mode) const {
2475 // For blocks inside inlines, we go ahead and include margins so that we run 2477 // For blocks inside inlines, we go ahead and include margins so that we run
2476 // right up to the inline boxes above and below us (thus getting merged with 2478 // right up to the inline boxes above and below us (thus getting merged with
2477 // them to form a single irregular shape). 2479 // them to form a single irregular shape).
2478 // FIXME: This is wrong for vertical writing-modes. 2480 // FIXME: This is wrong for vertical writing-modes.
2479 // https://bugs.webkit.org/show_bug.cgi?id=46781 2481 // https://bugs.webkit.org/show_bug.cgi?id=46781
2480 LayoutRect localRect(LayoutPoint(), size()); 2482 LayoutRect localRect(LayoutPoint(), size());
2481 localRect.expand(collapsedMarginBoxLogicalOutsets()); 2483 localRect.expand(collapsedMarginBoxLogicalOutsets());
2482 quads.append(localToAbsoluteQuad(FloatRect(localRect))); 2484 quads.append(localToAbsoluteQuad(FloatRect(localRect), mode));
2483 } 2485 }
2484 2486
2485 LayoutObject* LayoutBlockFlow::hoverAncestor() const { 2487 LayoutObject* LayoutBlockFlow::hoverAncestor() const {
2486 return isAnonymousBlockContinuation() ? continuation() 2488 return isAnonymousBlockContinuation() ? continuation()
2487 : LayoutBlock::hoverAncestor(); 2489 : LayoutBlock::hoverAncestor();
2488 } 2490 }
2489 2491
2490 RootInlineBox* LayoutBlockFlow::createAndAppendRootInlineBox() { 2492 RootInlineBox* LayoutBlockFlow::createAndAppendRootInlineBox() {
2491 RootInlineBox* rootBox = createRootInlineBox(); 2493 RootInlineBox* rootBox = createRootInlineBox();
2492 m_lineBoxes.appendLineBox(rootBox); 2494 m_lineBoxes.appendLineBox(rootBox);
(...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after
4596 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); 4598 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState);
4597 } 4599 }
4598 4600
4599 void LayoutBlockFlow::invalidateDisplayItemClients( 4601 void LayoutBlockFlow::invalidateDisplayItemClients(
4600 PaintInvalidationReason invalidationReason) const { 4602 PaintInvalidationReason invalidationReason) const {
4601 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( 4603 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(
4602 invalidationReason); 4604 invalidationReason);
4603 } 4605 }
4604 4606
4605 } // namespace blink 4607 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.h ('k') | third_party/WebKit/Source/core/layout/LayoutBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698