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

Side by Side Diff: Source/core/layout/line/InlineBox.h

Issue 988903002: [S.P.] Fix cull rects for InlineTextBox to account for vertical text. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/layout/line/InlineBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All r ights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All r ights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 // Use with caution! The type is not checked! 283 // Use with caution! The type is not checked!
284 LayoutBoxModelObject* boxModelObject() const 284 LayoutBoxModelObject* boxModelObject() const
285 { 285 {
286 if (!layoutObject().isText()) 286 if (!layoutObject().isText())
287 return toLayoutBoxModelObject(&layoutObject()); 287 return toLayoutBoxModelObject(&layoutObject());
288 return 0; 288 return 0;
289 } 289 }
290 290
291 FloatPointWillBeLayoutPoint locationIncludingFlipping(); 291 FloatPointWillBeLayoutPoint locationIncludingFlipping();
292
293 // Converts from a rect in the logical space of the InlineBox to one in the physical space
294 // of the containing block. The logical space of an InlineBox may be transpo sed for vertical text and
295 // flipped for right-to-left text.
296 LayoutRect logicalRectToPhysicalRect(const LayoutRect&);
297
292 void flipForWritingMode(FloatRect&); 298 void flipForWritingMode(FloatRect&);
293 FloatPoint flipForWritingMode(const FloatPoint&); 299 FloatPoint flipForWritingMode(const FloatPoint&);
294 void flipForWritingMode(LayoutRect&); 300 void flipForWritingMode(LayoutRect&);
295 LayoutPoint flipForWritingMode(const LayoutPoint&); 301 LayoutPoint flipForWritingMode(const LayoutPoint&);
296 302
297 bool knownToHaveNoOverflow() const { return m_bitfields.knownToHaveNoOverflo w(); } 303 bool knownToHaveNoOverflow() const { return m_bitfields.knownToHaveNoOverflo w(); }
298 void clearKnownToHaveNoOverflow(); 304 void clearKnownToHaveNoOverflow();
299 305
300 bool dirOverride() const { return m_bitfields.dirOverride(); } 306 bool dirOverride() const { return m_bitfields.dirOverride(); }
301 void setDirOverride(bool dirOverride) { m_bitfields.setDirOverride(dirOverri de); } 307 void setDirOverride(bool dirOverride) { m_bitfields.setDirOverride(dirOverri de); }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 private: 380 private:
375 unsigned m_expansion : 12; // for justified text 381 unsigned m_expansion : 12; // for justified text
376 382
377 public: 383 public:
378 signed expansion() const { return m_expansion; } 384 signed expansion() const { return m_expansion; }
379 void setExpansion(signed expansion) { m_expansion = expansion; } 385 void setExpansion(signed expansion) { m_expansion = expansion; }
380 }; 386 };
381 #undef ADD_BOOLEAN_BITFIELD 387 #undef ADD_BOOLEAN_BITFIELD
382 388
383 private: 389 private:
390 // Converts the given point from the logical space of the InlineBox to the p hysical space of the
391 // containing block.
392 FloatPointWillBeLayoutPoint logicalPointToPhysicalPoint(const FloatPoint&);
393
384 InlineBox* m_next; // The next element on the same line as us. 394 InlineBox* m_next; // The next element on the same line as us.
385 InlineBox* m_prev; // The previous element on the same line as us. 395 InlineBox* m_prev; // The previous element on the same line as us.
386 396
387 InlineFlowBox* m_parent; // The box that contains us. 397 InlineFlowBox* m_parent; // The box that contains us.
388 LayoutObject& m_renderer; 398 LayoutObject& m_renderer;
389 399
390 protected: 400 protected:
391 // For RootInlineBox 401 // For RootInlineBox
392 bool endsWithBreak() const { return m_bitfields.endsWithBreak(); } 402 bool endsWithBreak() const { return m_bitfields.endsWithBreak(); }
393 void setEndsWithBreak(bool endsWithBreak) { m_bitfields.setEndsWithBreak(end sWithBreak); } 403 void setEndsWithBreak(bool endsWithBreak) { m_bitfields.setEndsWithBreak(end sWithBreak); }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 449
440 } // namespace blink 450 } // namespace blink
441 451
442 #ifndef NDEBUG 452 #ifndef NDEBUG
443 // Outside the WebCore namespace for ease of invocation from gdb. 453 // Outside the WebCore namespace for ease of invocation from gdb.
444 void showTree(const blink::InlineBox*); 454 void showTree(const blink::InlineBox*);
445 void showLineTree(const blink::InlineBox*); 455 void showLineTree(const blink::InlineBox*);
446 #endif 456 #endif
447 457
448 #endif // InlineBox_h 458 #endif // InlineBox_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/layout/line/InlineBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698