Changeset 106900 in webkit
- Timestamp:
- Feb 6, 2012 8:26:17 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106899 r106900 1 2012-02-06 Emil A Eklund <eae@chromium.org> 2 3 Change baselinePosition and lineHeight to LayoutUnit 4 https://bugs.webkit.org/show_bug.cgi?id=77905 5 6 Reviewed by Eric Seidel. 7 8 Change the virtual baselinePosition and lineHeight methods to return 9 LayoutUnits as they are both computed from the height and top/bottom 10 margins (or width and left/right margins for vertical text), all of 11 which are LayoutUnits. 12 13 No new tests. 14 15 * platform/efl/RenderThemeEfl.cpp: 16 (WebCore::RenderThemeEfl::baselinePosition): 17 * platform/efl/RenderThemeEfl.h: 18 (RenderThemeEfl): 19 * platform/gtk/RenderThemeGtk.cpp: 20 (WebCore::RenderThemeGtk::baselinePosition): 21 * platform/gtk/RenderThemeGtk.h: 22 (RenderThemeGtk): 23 * platform/qt/RenderThemeQt.cpp: 24 (WebCore::RenderThemeQt::baselinePosition): 25 * platform/qt/RenderThemeQt.h: 26 (RenderThemeQt): 27 * rendering/RenderListMarker.cpp: 28 (WebCore::RenderListMarker::lineHeight): 29 (WebCore::RenderListMarker::baselinePosition): 30 * rendering/RenderListMarker.h: 31 (RenderListMarker): 32 * rendering/RenderSlider.cpp: 33 (WebCore::RenderSlider::baselinePosition): 34 * rendering/RenderSlider.h: 35 (RenderSlider): 36 * rendering/RootInlineBox.h: 37 (WebCore::RootInlineBox::baselinePosition): 38 (WebCore::RootInlineBox::lineHeight): 39 * rendering/mathml/RenderMathMLFraction.cpp: 40 (WebCore::RenderMathMLFraction::baselinePosition): 41 * rendering/mathml/RenderMathMLFraction.h: 42 (RenderMathMLFraction): 43 * rendering/mathml/RenderMathMLOperator.cpp: 44 (WebCore::RenderMathMLOperator::baselinePosition): 45 * rendering/mathml/RenderMathMLOperator.h: 46 (RenderMathMLOperator): 47 * rendering/mathml/RenderMathMLRow.cpp: 48 (WebCore::RenderMathMLRow::baselinePosition): 49 * rendering/mathml/RenderMathMLRow.h: 50 (RenderMathMLRow): 51 * rendering/mathml/RenderMathMLSubSup.cpp: 52 (WebCore::RenderMathMLSubSup::baselinePosition): 53 * rendering/mathml/RenderMathMLSubSup.h: 54 (RenderMathMLSubSup): 55 * rendering/mathml/RenderMathMLUnderOver.cpp: 56 (WebCore::RenderMathMLUnderOver::baselinePosition): 57 * rendering/mathml/RenderMathMLUnderOver.h: 58 (RenderMathMLUnderOver): 59 1 60 2012-02-06 Xianzhu Wang <wangxianzhu@chromium.org> 2 61 -
trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp
r100408 r106900 823 823 } 824 824 825 int RenderThemeEfl::baselinePosition(const RenderObject* object) const825 LayoutUnit RenderThemeEfl::baselinePosition(const RenderObject* object) const 826 826 { 827 827 if (!object->isBox()) -
trunk/Source/WebCore/platform/efl/RenderThemeEfl.h
r95901 r106900 92 92 // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of 93 93 // controls that need to do this. 94 virtual int baselinePosition(const RenderObject*) const;94 virtual LayoutUnit baselinePosition(const RenderObject*) const; 95 95 96 96 virtual Color platformActiveSelectionBackgroundColor() const { return m_activeSelectionBackgroundColor; } -
trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp
r101920 r106900 162 162 } 163 163 164 int RenderThemeGtk::baselinePosition(const RenderObject* o) const164 LayoutUnit RenderThemeGtk::baselinePosition(const RenderObject* o) const 165 165 { 166 166 if (!o->isBox()) -
trunk/Source/WebCore/platform/gtk/RenderThemeGtk.h
r105286 r106900 61 61 // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of 62 62 // controls that need to do this. 63 virtual int baselinePosition(const RenderObject*) const;63 virtual LayoutUnit baselinePosition(const RenderObject*) const; 64 64 65 65 // The platform selection color. -
trunk/Source/WebCore/platform/qt/RenderThemeQt.cpp
r102768 r106900 157 157 } 158 158 159 int RenderThemeQt::baselinePosition(const RenderObject* o) const159 LayoutUnit RenderThemeQt::baselinePosition(const RenderObject* o) const 160 160 { 161 161 if (!o->isBox()) -
trunk/Source/WebCore/platform/qt/RenderThemeQt.h
r102768 r106900 54 54 virtual bool supportsFocusRing(const RenderStyle*) const; 55 55 56 virtual int baselinePosition(const RenderObject*) const;56 virtual LayoutUnit baselinePosition(const RenderObject*) const; 57 57 58 58 // A method asking if the control changes its tint when the window has focus or not. -
trunk/Source/WebCore/rendering/RenderListMarker.cpp
r98852 r106900 1535 1535 } 1536 1536 1537 int RenderListMarker::lineHeight(bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const1537 LayoutUnit RenderListMarker::lineHeight(bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const 1538 1538 { 1539 1539 if (!isImage()) … … 1542 1542 } 1543 1543 1544 int RenderListMarker::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const1544 LayoutUnit RenderListMarker::baselinePosition(FontBaseline baselineType, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const 1545 1545 { 1546 1546 if (!isImage()) -
trunk/Source/WebCore/rendering/RenderListMarker.h
r90596 r106900 59 59 virtual InlineBox* createInlineBox(); 60 60 61 virtual int lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;62 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;61 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; 62 virtual LayoutUnit baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; 63 63 64 64 bool isImage() const; -
trunk/Source/WebCore/rendering/RenderSlider.cpp
r95502 r106900 60 60 } 61 61 62 int RenderSlider::baselinePosition(FontBaseline, bool /*firstLine*/, LineDirectionMode, LinePositionMode) const62 LayoutUnit RenderSlider::baselinePosition(FontBaseline, bool /*firstLine*/, LineDirectionMode, LinePositionMode) const 63 63 { 64 64 // FIXME: Patch this function for writing-mode. -
trunk/Source/WebCore/rendering/RenderSlider.h
r88901 r106900 41 41 virtual bool isSlider() const { return true; } 42 42 43 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;43 virtual LayoutUnit baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; 44 44 virtual void computePreferredLogicalWidths(); 45 45 virtual bool requiresForcedStyleRecalcPropagation() const { return true; } -
trunk/Source/WebCore/rendering/RootInlineBox.h
r105176 r106900 102 102 bool isHyphenated() const; 103 103 104 virtual int baselinePosition(FontBaseline baselineType) const { return boxModelObject()->baselinePosition(baselineType, m_firstLine, isHorizontal() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes); }105 virtual int lineHeight() const { return boxModelObject()->lineHeight(m_firstLine, isHorizontal() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes); }104 virtual LayoutUnit baselinePosition(FontBaseline baselineType) const { return boxModelObject()->baselinePosition(baselineType, m_firstLine, isHorizontal() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes); } 105 virtual LayoutUnit lineHeight() const { return boxModelObject()->lineHeight(m_firstLine, isHorizontal() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes); } 106 106 107 107 #if PLATFORM(MAC) -
trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
r95901 r106900 166 166 } 167 167 168 int RenderMathMLFraction::baselinePosition(FontBaseline, bool firstLine, LineDirectionMode lineDirection, LinePositionMode linePositionMode) const168 LayoutUnit RenderMathMLFraction::baselinePosition(FontBaseline, bool firstLine, LineDirectionMode lineDirection, LinePositionMode linePositionMode) const 169 169 { 170 170 if (firstChild() && firstChild()->isRenderMathMLBlock()) { -
trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.h
r95901 r106900 39 39 virtual void addChild(RenderObject* child, RenderObject* beforeChild = 0); 40 40 virtual void updateFromElement(); 41 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;41 virtual LayoutUnit baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; 42 42 virtual void paint(PaintInfo&, const LayoutPoint&); 43 43 protected: -
trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp
r95901 r106900 335 335 } 336 336 337 int RenderMathMLOperator::baselinePosition(FontBaseline, bool firstLine, LineDirectionMode lineDirection, LinePositionMode linePositionMode) const337 LayoutUnit RenderMathMLOperator::baselinePosition(FontBaseline, bool firstLine, LineDirectionMode lineDirection, LinePositionMode linePositionMode) const 338 338 { 339 339 if (m_isStacked) -
trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h
r95901 r106900 42 42 virtual void updateFromElement(); 43 43 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const; 44 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;44 virtual LayoutUnit baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; 45 45 46 46 protected: -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp
r95901 r106900 120 120 } 121 121 122 int RenderMathMLRow::baselinePosition(FontBaseline, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const122 LayoutUnit RenderMathMLRow::baselinePosition(FontBaseline, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const 123 123 { 124 124 if (firstChild() && firstChild()->isRenderMathMLBlock()) { -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h
r95901 r106900 38 38 virtual bool isRenderMathMLRow() const { return true; } 39 39 virtual int nonOperatorHeight() const; 40 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;40 virtual LayoutUnit baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; 41 41 virtual void stretchToHeight(int) {} 42 42 protected: -
trunk/Source/WebCore/rendering/mathml/RenderMathMLSubSup.cpp
r103213 r106900 182 182 } 183 183 184 int RenderMathMLSubSup::baselinePosition(FontBaseline, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const184 LayoutUnit RenderMathMLSubSup::baselinePosition(FontBaseline, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const 185 185 { 186 186 RenderObject* base = firstChild(); … … 188 188 return offsetHeight(); 189 189 190 int baseline = offsetHeight();190 LayoutUnit baseline = offsetHeight(); 191 191 if (!base || !base->isBoxModelObject()) 192 192 return baseline; -
trunk/Source/WebCore/rendering/mathml/RenderMathMLSubSup.h
r95901 r106900 42 42 virtual int nonOperatorHeight() const; 43 43 virtual void stretchToHeight(int pixelHeight); 44 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;44 virtual LayoutUnit baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; 45 45 46 46 protected: -
trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp
r103213 r106900 245 245 } 246 246 247 int RenderMathMLUnderOver::baselinePosition(FontBaseline, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const247 LayoutUnit RenderMathMLUnderOver::baselinePosition(FontBaseline, bool firstLine, LineDirectionMode direction, LinePositionMode linePositionMode) const 248 248 { 249 249 RenderObject* current = firstChild(); … … 251 251 return RenderBlock::baselinePosition(AlphabeticBaseline, firstLine, direction, linePositionMode); 252 252 253 int baseline = 0;253 LayoutUnit baseline = 0; 254 254 switch (m_kind) { 255 255 case UnderOver: -
trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h
r95901 r106900 41 41 virtual bool hasBase() const { return true; } 42 42 virtual int nonOperatorHeight() const; 43 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const;43 virtual LayoutUnit baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; 44 44 virtual void stretchToHeight(int pixelHeight); 45 45 private:
Note: See TracChangeset
for help on using the changeset viewer.