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

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

Issue 2557943002: Sync requestFullscreen() and exitFullscreen() algorithms with the spec (Closed)
Patch Set: rebase Created 4 years 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 LayoutObject* beforeChild, 395 LayoutObject* beforeChild,
396 LayoutBoxModelObject* oldCont) { 396 LayoutBoxModelObject* oldCont) {
397 ASSERT(isDescendantOf(fromBlock)); 397 ASSERT(isDescendantOf(fromBlock));
398 398
399 // If we're splitting the inline containing the fullscreened element, 399 // If we're splitting the inline containing the fullscreened element,
400 // |beforeChild| may be the layoutObject for the fullscreened element. 400 // |beforeChild| may be the layoutObject for the fullscreened element.
401 // However, that layoutObject is wrapped in a LayoutFullScreen, so |this| is 401 // However, that layoutObject is wrapped in a LayoutFullScreen, so |this| is
402 // not its parent. Since the splitting logic expects |this| to be the parent, 402 // not its parent. Since the splitting logic expects |this| to be the parent,
403 // set |beforeChild| to be the LayoutFullScreen. 403 // set |beforeChild| to be the LayoutFullScreen.
404 if (Fullscreen* fullscreen = Fullscreen::fromIfExists(document())) { 404 if (Fullscreen* fullscreen = Fullscreen::fromIfExists(document())) {
405 const Element* fullScreenElement = fullscreen->currentFullScreenElement(); 405 const Element* fullscreenElement = fullscreen->fullscreenElement();
406 if (fullScreenElement && beforeChild && 406 if (fullscreenElement && beforeChild &&
407 beforeChild->node() == fullScreenElement) 407 beforeChild->node() == fullscreenElement)
408 beforeChild = fullscreen->fullScreenLayoutObject(); 408 beforeChild = fullscreen->fullScreenLayoutObject();
409 } 409 }
410 410
411 // FIXME: Because splitting is O(n^2) as tags nest pathologically, we cap the 411 // FIXME: Because splitting is O(n^2) as tags nest pathologically, we cap the
412 // depth at which we're willing to clone. 412 // depth at which we're willing to clone.
413 // There will eventually be a better approach to this problem that will let us 413 // There will eventually be a better approach to this problem that will let us
414 // nest to a much greater depth (see bugzilla bug 13430) but for now we have a 414 // nest to a much greater depth (see bugzilla bug 13430) but for now we have a
415 // limit. This *will* result in incorrect rendering, but the alternative is to 415 // limit. This *will* result in incorrect rendering, but the alternative is to
416 // hang forever. 416 // hang forever.
417 const unsigned cMaxSplitDepth = 200; 417 const unsigned cMaxSplitDepth = 200;
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); 1512 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason);
1513 } 1513 }
1514 1514
1515 // TODO(lunalu): Not to just dump 0, 0 as the x and y here 1515 // TODO(lunalu): Not to just dump 0, 0 as the x and y here
1516 LayoutRect LayoutInline::debugRect() const { 1516 LayoutRect LayoutInline::debugRect() const {
1517 IntRect linesBox = enclosingIntRect(linesBoundingBox()); 1517 IntRect linesBox = enclosingIntRect(linesBoundingBox());
1518 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); 1518 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height()));
1519 } 1519 }
1520 1520
1521 } // namespace blink 1521 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698