Changeset 79978 in webkit
- Timestamp:
- Mar 1, 2011 12:48:46 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 9 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/Android.mk
r79825 r79978 352 352 html/shadow/MediaControls.cpp \ 353 353 html/shadow/SliderThumbElement.cpp \ 354 html/shadow/TextControlInnerElements.cpp \ 354 355 \ 355 356 loader/cache/CachedCSSStyleSheet.cpp \ … … 783 784 LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \ 784 785 rendering/ScrollBehavior.cpp \ 785 rendering/TextControlInnerElements.cpp \786 786 rendering/TransformState.cpp \ 787 787 rendering/break_lines.cpp \ -
trunk/Source/WebCore/CMakeLists.txt
r79861 r79978 1035 1035 html/shadow/MediaControls.cpp 1036 1036 html/shadow/SliderThumbElement.cpp 1037 html/shadow/TextControlInnerElements.cpp 1037 1038 1038 1039 inspector/ConsoleMessage.cpp … … 1406 1407 rendering/ScrollBehavior.cpp 1407 1408 rendering/ShadowElement.cpp 1408 rendering/TextControlInnerElements.cpp1409 1409 rendering/TransformState.cpp 1410 1410 rendering/break_lines.cpp -
trunk/Source/WebCore/ChangeLog
r79976 r79978 1 2011-03-01 Roland Steiner <rolandsteiner@chromium.org> 2 3 Reviewed by Kent Tamura. 4 5 Bug 54853 - Move TextControlInnerElements from WebCore/rendering to WebCore/html/shadow 6 https://bugs.webkit.org/show_bug.cgi?id=54853 7 8 Moving the files from rendering to html/shadow, with the exception of 9 the class RenderTextControlInnerBlock, which I moved to RenderTextControlSingleLine 10 (this place is not ideal, but only a temporary state during the larger refactoring 11 for <input>). 12 13 No new tests. (refactoring) 14 15 * Android.mk: 16 * CMakeLists.txt: 17 * WebCore.gypi: 18 * WebCore.pro: 19 * WebCore.vcproj/WebCore.vcproj: 20 * WebCore.xcodeproj/project.pbxproj: 21 * html/shadow/TextControlInnerElements.cpp: Copied from Source/WebCore/rendering/TextControlInnerElements.cpp. 22 * html/shadow/TextControlInnerElements.h: Copied from Source/WebCore/rendering/TextControlInnerElements.h. 23 * rendering/RenderTextControlSingleLine.cpp: 24 (WebCore::RenderTextControlInnerBlock::positionForPoint): 25 * rendering/RenderTextControlSingleLine.h: 26 (WebCore::RenderTextControlInnerBlock::RenderTextControlInnerBlock): 27 (WebCore::RenderTextControlInnerBlock::hasLineIfEmpty): 28 * rendering/TextControlInnerElements.cpp: Removed. 29 * rendering/TextControlInnerElements.h: Removed. 30 1 31 2011-03-01 Ryosuke Niwa <rniwa@webkit.org> 2 32 -
trunk/Source/WebCore/WebCore.gypi
r79882 r79978 2021 2021 'html/shadow/SliderThumbElement.cpp', 2022 2022 'html/shadow/SliderThumbElement.h', 2023 'html/shadow/TextControlInnerElements.cpp', 2024 'html/shadow/TextControlInnerElements.h', 2023 2025 'inspector/ConsoleMessage.cpp', 2024 2026 'inspector/ConsoleMessage.h', … … 4024 4026 'rendering/ShadowElement.h', 4025 4027 'rendering/TableLayout.h', 4026 'rendering/TextControlInnerElements.cpp',4027 'rendering/TextControlInnerElements.h',4028 4028 'rendering/TransformState.cpp', 4029 4029 'rendering/TransformState.h', -
trunk/Source/WebCore/WebCore.pro
r79825 r79978 789 789 html/shadow/MediaControls.cpp \ 790 790 html/shadow/SliderThumbElement.cpp \ 791 html/shadow/TextControlInnerElements.cpp \ 791 792 inspector/ConsoleMessage.cpp \ 792 793 inspector/InjectedScript.cpp \ … … 1117 1118 rendering/ScrollBehavior.cpp \ 1118 1119 rendering/ShadowElement.cpp \ 1119 rendering/TextControlInnerElements.cpp \1120 1120 rendering/TransformState.cpp \ 1121 1121 rendering/style/ContentData.cpp \ … … 2182 2182 rendering/svg/SVGTextMetrics.h \ 2183 2183 rendering/svg/SVGTextQuery.h \ 2184 rendering/TextControlInnerElements.h \2185 2184 rendering/TransformState.h \ 2186 2185 svg/animation/SMILTimeContainer.h \ -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r79861 r79978 38481 38481 </File> 38482 38482 <File 38483 RelativePath="..\rendering\TextControlInnerElements.cpp"38484 >38485 <FileConfiguration38486 Name="Debug|Win32"38487 ExcludedFromBuild="true"38488 >38489 <Tool38490 Name="VCCLCompilerTool"38491 />38492 </FileConfiguration>38493 <FileConfiguration38494 Name="Release|Win32"38495 ExcludedFromBuild="true"38496 >38497 <Tool38498 Name="VCCLCompilerTool"38499 />38500 </FileConfiguration>38501 <FileConfiguration38502 Name="Debug_Cairo_CFLite|Win32"38503 ExcludedFromBuild="true"38504 >38505 <Tool38506 Name="VCCLCompilerTool"38507 />38508 </FileConfiguration>38509 <FileConfiguration38510 Name="Release_Cairo_CFLite|Win32"38511 ExcludedFromBuild="true"38512 >38513 <Tool38514 Name="VCCLCompilerTool"38515 />38516 </FileConfiguration>38517 <FileConfiguration38518 Name="Debug_All|Win32"38519 ExcludedFromBuild="true"38520 >38521 <Tool38522 Name="VCCLCompilerTool"38523 />38524 </FileConfiguration>38525 <FileConfiguration38526 Name="Release_LTCG|Win32"38527 ExcludedFromBuild="true"38528 >38529 <Tool38530 Name="VCCLCompilerTool"38531 />38532 </FileConfiguration>38533 </File>38534 <File38535 RelativePath="..\rendering\TextControlInnerElements.h"38536 >38537 </File>38538 <File38539 38483 RelativePath="..\rendering\TrailingFloatsRootInlineBox.h" 38540 38484 > … … 55805 55749 > 55806 55750 </File> 55751 <File 55752 RelativePath="..\html\shadow\TextControlInnerElements.cpp" 55753 > 55754 </File> 55755 <File 55756 RelativePath="..\html\shadow\TextControlInnerElements.h" 55757 > 55758 </File> 55807 55759 </Filter> 55808 55760 </Filter> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r79947 r79978 284 284 142011B60A003133008303F9 /* JSCSSStyleDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 142011B40A003133008303F9 /* JSCSSStyleDeclaration.cpp */; }; 285 285 142011B70A003133008303F9 /* JSCSSStyleDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = 142011B50A003133008303F9 /* JSCSSStyleDeclaration.h */; settings = {ATTRIBUTES = (Private, ); }; }; 286 142B97C913138943008BEF4B /* TextControlInnerElements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 142B97C713138943008BEF4B /* TextControlInnerElements.cpp */; }; 287 142B97CA13138943008BEF4B /* TextControlInnerElements.h in Headers */ = {isa = PBXBuildFile; fileRef = 142B97C813138943008BEF4B /* TextControlInnerElements.h */; }; 286 288 1432E8470C51493800B1500F /* GCController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1432E8460C51493800B1500F /* GCController.h */; settings = {ATTRIBUTES = (Private, ); }; }; 287 289 1432E8490C51493F00B1500F /* GCController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1432E8480C51493F00B1500F /* GCController.cpp */; }; … … 4009 4011 AA4C3A760B2B1679002334A2 /* StyleElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA4C3A740B2B1679002334A2 /* StyleElement.cpp */; }; 4010 4012 AA4C3A770B2B1679002334A2 /* StyleElement.h in Headers */ = {isa = PBXBuildFile; fileRef = AA4C3A750B2B1679002334A2 /* StyleElement.h */; }; 4011 AB014DE30E689A4300E10445 /* TextControlInnerElements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB014DE10E689A4300E10445 /* TextControlInnerElements.cpp */; };4012 AB014DE40E689A4300E10445 /* TextControlInnerElements.h in Headers */ = {isa = PBXBuildFile; fileRef = AB014DE20E689A4300E10445 /* TextControlInnerElements.h */; };4013 4013 AB23A32709BBA7D00067CC53 /* BeforeTextInsertedEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB23A32509BBA7D00067CC53 /* BeforeTextInsertedEvent.cpp */; }; 4014 4014 AB23A32809BBA7D00067CC53 /* BeforeTextInsertedEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = AB23A32609BBA7D00067CC53 /* BeforeTextInsertedEvent.h */; }; … … 6581 6581 142011B40A003133008303F9 /* JSCSSStyleDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSStyleDeclaration.cpp; sourceTree = "<group>"; }; 6582 6582 142011B50A003133008303F9 /* JSCSSStyleDeclaration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCSSStyleDeclaration.h; sourceTree = "<group>"; }; 6583 142B97C713138943008BEF4B /* TextControlInnerElements.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextControlInnerElements.cpp; sourceTree = "<group>"; }; 6584 142B97C813138943008BEF4B /* TextControlInnerElements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextControlInnerElements.h; sourceTree = "<group>"; }; 6583 6585 1432E8460C51493800B1500F /* GCController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GCController.h; sourceTree = "<group>"; }; 6584 6586 1432E8480C51493F00B1500F /* GCController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GCController.cpp; sourceTree = "<group>"; }; … … 10189 10191 AA4C3A740B2B1679002334A2 /* StyleElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = StyleElement.cpp; sourceTree = "<group>"; }; 10190 10192 AA4C3A750B2B1679002334A2 /* StyleElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = StyleElement.h; sourceTree = "<group>"; }; 10191 AB014DE10E689A4300E10445 /* TextControlInnerElements.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextControlInnerElements.cpp; sourceTree = "<group>"; };10192 AB014DE20E689A4300E10445 /* TextControlInnerElements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextControlInnerElements.h; sourceTree = "<group>"; };10193 10193 AB23A32509BBA7D00067CC53 /* BeforeTextInsertedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BeforeTextInsertedEvent.cpp; sourceTree = "<group>"; }; 10194 10194 AB23A32609BBA7D00067CC53 /* BeforeTextInsertedEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = BeforeTextInsertedEvent.h; sourceTree = "<group>"; }; … … 13222 13222 4150F9F012B6E0E70008C860 /* SliderThumbElement.cpp */, 13223 13223 4150F9EF12B6E0E70008C860 /* SliderThumbElement.h */, 13224 142B97C713138943008BEF4B /* TextControlInnerElements.cpp */, 13225 142B97C813138943008BEF4B /* TextControlInnerElements.h */, 13224 13226 ); 13225 13227 path = shadow; … … 18898 18900 A7F338A211C0EFCA00A320A7 /* ShadowElement.h */, 18899 18901 A8CFF04C0A154F09000A4234 /* TableLayout.h */, 18900 AB014DE10E689A4300E10445 /* TextControlInnerElements.cpp */,18901 AB014DE20E689A4300E10445 /* TextControlInnerElements.h */,18902 18902 37FC96DA1104ED71003E1FAD /* TrailingFloatsRootInlineBox.h */, 18903 18903 0F500AB00F54DB3100EEF928 /* TransformState.cpp */, … … 22257 22257 B2C3DA420D006C1D00EF6F26 /* TextCodecUTF16.h in Headers */, 22258 22258 9343CB8212F25E510033C5EE /* TextCodecUTF8.h in Headers */, 22259 AB014DE40E689A4300E10445/* TextControlInnerElements.h in Headers */,22259 142B97CA13138943008BEF4B /* TextControlInnerElements.h in Headers */, 22260 22260 B2C3DA450D006C1D00EF6F26 /* TextDirection.h in Headers */, 22261 22261 97BC84B412371180000C6161 /* TextDocument.h in Headers */, … … 24939 24939 B2C3DA410D006C1D00EF6F26 /* TextCodecUTF16.cpp in Sources */, 24940 24940 9343CB8112F25E510033C5EE /* TextCodecUTF8.cpp in Sources */, 24941 AB014DE30E689A4300E10445/* TextControlInnerElements.cpp in Sources */,24941 142B97C913138943008BEF4B /* TextControlInnerElements.cpp in Sources */, 24942 24942 97BC84B312371180000C6161 /* TextDocument.cpp in Sources */, 24943 24943 97BC84831236FD93000C6161 /* TextDocumentParser.cpp in Sources */, -
trunk/Source/WebCore/html/shadow/TextControlInnerElements.cpp
r79287 r79978 48 48 using namespace HTMLNames; 49 49 50 class RenderTextControlInnerBlock : public RenderBlock {51 public:52 RenderTextControlInnerBlock(Node* node, bool isMultiLine) : RenderBlock(node), m_multiLine(isMultiLine) { }53 54 private:55 virtual bool hasLineIfEmpty() const { return true; }56 virtual VisiblePosition positionForPoint(const IntPoint&);57 58 bool m_multiLine;59 };60 61 VisiblePosition RenderTextControlInnerBlock::positionForPoint(const IntPoint& point)62 {63 IntPoint contentsPoint(point);64 65 // Multiline text controls have the scroll on shadowAncestorNode, so we need to take that66 // into account here.67 if (m_multiLine) {68 RenderTextControl* renderer = toRenderTextControl(node()->shadowAncestorNode()->renderer());69 if (renderer->hasOverflowClip())70 contentsPoint += renderer->layer()->scrolledContentOffset();71 }72 73 return RenderBlock::positionForPoint(contentsPoint);74 }75 76 // ----------------------------77 78 50 TextControlInnerElement::TextControlInnerElement(Document* document, HTMLElement* shadowParent) 79 51 : HTMLDivElement(divTag, document) -
trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp
r79284 r79978 52 52 using namespace HTMLNames; 53 53 54 VisiblePosition RenderTextControlInnerBlock::positionForPoint(const IntPoint& point) 55 { 56 IntPoint contentsPoint(point); 57 58 // Multiline text controls have the scroll on shadowAncestorNode, so we need to take that 59 // into account here. 60 if (m_multiLine) { 61 RenderTextControl* renderer = toRenderTextControl(node()->shadowAncestorNode()->renderer()); 62 if (renderer->hasOverflowClip()) 63 contentsPoint += renderer->layer()->scrolledContentOffset(); 64 } 65 66 return RenderBlock::positionForPoint(contentsPoint); 67 } 68 69 // ---------------------------- 70 54 71 RenderTextControlSingleLine::RenderTextControlSingleLine(Node* node, bool placeholderVisible) 55 72 : RenderTextControl(node, placeholderVisible) -
trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h
r76378 r79978 175 175 void toRenderTextControlSingleLine(const RenderTextControlSingleLine*); 176 176 177 // ---------------------------- 178 179 class RenderTextControlInnerBlock : public RenderBlock { 180 public: 181 RenderTextControlInnerBlock(Node* node, bool isMultiLine) : RenderBlock(node), m_multiLine(isMultiLine) { } 182 183 private: 184 virtual bool hasLineIfEmpty() const { return true; } 185 virtual VisiblePosition positionForPoint(const IntPoint&); 186 187 bool m_multiLine; 188 }; 189 177 190 } 178 191
Note: See TracChangeset
for help on using the changeset viewer.