Changeset 154326 in webkit
- Timestamp:
- Aug 20, 2013, 8:25:04 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r154323 r154326 1 2013-08-20 Antti Koivisto <antti@apple.com> 2 3 <https://webkit.org/b/120025> REGRESSION (r154254): fast/frames/frameset-frameborder-inheritance.html failing on Apple MountainLion Debug WK1 (Tests) 4 5 Reviewed by Anders Carlsson. 6 7 * platform/mac/TestExpectations: Unskip. 8 1 9 2013-08-20 Antti Koivisto <antti@apple.com> 2 10 -
trunk/LayoutTests/platform/mac/TestExpectations
r154295 r154326 1277 1277 webkit.org/b/105988 [ Debug ] inspector/debugger/watch-expressions-preserve-expansion.html [ Pass Crash ] 1278 1278 1279 webkit.org/b/120025 fast/frames/frameset-frameborder-inheritance.html [ Failure ]1280 1281 1279 # Fails with WebKit1 only. 1282 1280 editing/secure-input/reset-state-on-navigation.html [ Failure ] -
trunk/Source/WebCore/ChangeLog
r154323 r154326 1 2013-08-20 Antti Koivisto <antti@apple.com> 2 3 <https://webkit.org/b/120025> REGRESSION (r154254): fast/frames/frameset-frameborder-inheritance.html failing on Apple MountainLion Debug WK1 (Tests) 4 5 Reviewed by Anders Carlsson. 6 7 * html/HTMLDocument.cpp: 8 (WebCore::HTMLDocument::isFrameSet): 9 * html/HTMLFrameElement.cpp: 10 (WebCore::HTMLFrameElement::didAttachRenderers): 11 12 Make helper public in HTMLFrameSetElement. 13 14 * html/HTMLFrameSetElement.cpp: 15 (WebCore::HTMLFrameSetElement::findContaining): 16 17 Static function for finding containing frameset, if any. 18 19 (WebCore::HTMLFrameSetElement::willAttachRenderers): 20 21 This broke in refactoring. We should exit the loop when the first containing frameset is found. Fix by refactoring more. 22 23 * html/HTMLFrameSetElement.h: 24 (WebCore::isHTMLFrameSetElement): 25 (WebCore::toHTMLFrameSetElement): 26 27 Add casting functions. 28 29 * rendering/RenderFrameSet.cpp: 30 (WebCore::RenderFrameSet::frameSet): 31 1 32 2013-08-20 Antti Koivisto <antti@apple.com> 2 33 -
trunk/Source/WebCore/html/HTMLDocument.cpp
r154122 r154326 69 69 #include "HTMLElementFactory.h" 70 70 #include "HTMLFrameOwnerElement.h" 71 #include "HTMLFrameSetElement.h" 71 72 #include "HTMLNames.h" 72 73 #include "InspectorInstrumentation.h" … … 393 394 { 394 395 HTMLElement* bodyElement = body(); 395 return bodyElement && bodyElement->hasTagName(framesetTag);396 } 397 398 } 396 return bodyElement && isHTMLFrameSetElement(bodyElement); 397 } 398 399 } -
trunk/Source/WebCore/html/HTMLFrameElement.cpp
r154254 r154326 60 60 } 61 61 62 static inline HTMLFrameSetElement* containingFrameSetElement(Node* node)63 {64 while ((node = node->parentNode())) {65 if (node->hasTagName(framesetTag))66 return static_cast<HTMLFrameSetElement*>(node);67 }68 return 0;69 }70 71 62 bool HTMLFrameElement::noResize() const 72 63 { … … 77 68 { 78 69 HTMLFrameElementBase::didAttachRenderers(); 79 if (HTMLFrameSetElement* frameSetElement = containingFrameSetElement(this)) { 80 if (!m_frameBorderSet) 81 m_frameBorder = frameSetElement->hasFrameBorder(); 82 } 70 const HTMLFrameSetElement* containingFrameSet = HTMLFrameSetElement::findContaining(this); 71 if (!containingFrameSet) 72 return; 73 if (!m_frameBorderSet) 74 m_frameBorder = containingFrameSet->hasFrameBorder(); 83 75 } 84 76 -
trunk/Source/WebCore/html/HTMLFrameSetElement.cpp
r154254 r154326 165 165 } 166 166 167 HTMLFrameSetElement* HTMLFrameSetElement::findContaining(Node* node) 168 { 169 for (Element* parent = node->parentElement(); parent; parent = parent->parentElement()) { 170 if (isHTMLFrameSetElement(parent)) 171 return toHTMLFrameSetElement(parent); 172 } 173 return 0; 174 } 175 167 176 void HTMLFrameSetElement::willAttachRenderers() 168 177 { 169 // Inherit default settings from parent frameset 178 // Inherit default settings from parent frameset. 170 179 // FIXME: This is not dynamic. 171 for (ContainerNode* node = parentNode(); node; node = node->parentNode()) { 172 if (!node->hasTagName(framesetTag)) 173 continue; 174 HTMLFrameSetElement* frameset = static_cast<HTMLFrameSetElement*>(node); 175 if (!m_frameborderSet) 176 m_frameborder = frameset->hasFrameBorder(); 177 if (m_frameborder) { 178 if (!m_borderSet) 179 m_border = frameset->border(); 180 if (!m_borderColorSet) 181 m_borderColorSet = frameset->hasBorderColor(); 182 } 183 if (!m_noresize) 184 m_noresize = frameset->noResize(); 185 } 180 const HTMLFrameSetElement* containingFrameSet = findContaining(this); 181 if (!containingFrameSet) 182 return; 183 if (!m_frameborderSet) 184 m_frameborder = containingFrameSet->hasFrameBorder(); 185 if (m_frameborder) { 186 if (!m_borderSet) 187 m_border = containingFrameSet->border(); 188 if (!m_borderColorSet) 189 m_borderColorSet = containingFrameSet->hasBorderColor(); 190 } 191 if (!m_noresize) 192 m_noresize = containingFrameSet->noResize(); 186 193 } 187 194 -
trunk/Source/WebCore/html/HTMLFrameSetElement.h
r154254 r154326 45 45 const Length* rowLengths() const { return m_rowLengths.get(); } 46 46 const Length* colLengths() const { return m_colLengths.get(); } 47 48 static HTMLFrameSetElement* findContaining(Node* descendant); 47 49 48 50 // Declared virtual in Element … … 99 101 }; 100 102 103 inline bool isHTMLFrameSetElement(const Node* node) 104 { 105 return node->hasTagName(HTMLNames::framesetTag); 106 } 107 108 inline bool isHTMLFrameSetElement(const Element* element) 109 { 110 return element->hasTagName(HTMLNames::framesetTag); 111 } 112 113 inline HTMLFrameSetElement* toHTMLFrameSetElement(Node* node) 114 { 115 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLFrameSetElement(node)); 116 return static_cast<HTMLFrameSetElement*>(node); 117 } 118 119 inline const HTMLFrameSetElement* toHTMLFrameSetElement(const Node* node) 120 { 121 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLFrameSetElement(node)); 122 return static_cast<const HTMLFrameSetElement*>(node); 123 } 124 101 125 } // namespace WebCore 102 126 -
trunk/Source/WebCore/rendering/RenderFrameSet.cpp
r154219 r154326 64 64 inline HTMLFrameSetElement* RenderFrameSet::frameSet() const 65 65 { 66 return static_cast<HTMLFrameSetElement*>(node());66 return toHTMLFrameSetElement(node()); 67 67 } 68 68
Note:
See TracChangeset
for help on using the changeset viewer.