Changeset 82712 in webkit
- Timestamp:
- Apr 1, 2011 1:07:23 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 9 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r82710 r82712 1 2011-04-01 Daniel Bates <dbates@rim.com> 2 3 Reviewed by Darin Adler. 4 5 Frame's noResize attribute can not be set by JavaScript 6 https://bugs.webkit.org/show_bug.cgi?id=14845 7 8 Tests that frame resizing is allowed and disallowed depending on the value of the noResize property. 9 10 Also, tests to ensure that frame resizing is allowed and disallowed when programmatically 11 removing and adding the noresize attribute, respectively. 12 13 * fast/frames/frame-inherit-noresize-from-frameset-expected.txt: Added. 14 * fast/frames/frame-inherit-noresize-from-frameset.html: Added. See <https://bugs.webkit.org/show_bug.cgi?id=57604>. 15 * fast/frames/frame-programmatic-noresize-expected.txt: Added. 16 * fast/frames/frame-programmatic-noresize.html: Added. 17 * fast/frames/frame-with-noresize-can-be-resized-after-removal-of-noresize-expected.txt: Added. 18 * fast/frames/frame-with-noresize-can-be-resized-after-removal-of-noresize.html: Added. 19 * fast/frames/frame-with-noresize-can-be-resized-after-setting-noResize-to-false-expected.txt: Added. 20 * fast/frames/frame-with-noresize-can-be-resized-after-setting-noResize-to-false.html: Added. 21 * fast/frames/resources/frame-programmatic-resize.js: Added. 22 (setTestFrameById): 23 (deltaWidth): 24 (shouldAllowFrameResize): 25 (shouldDisallowFrameResize): 26 (shouldDisallowFrameResizeAfterProcessingFrame): 27 (shouldAllowFrameResizeAfterProcessingFrame): 28 (checkTestFrameWidthEquals): 29 (resizeTestFrameBy): 30 (log): 31 (description): 32 1 33 2011-04-01 Chang Shu <cshu@webkit.org> 2 34 -
trunk/Source/WebCore/ChangeLog
r82711 r82712 1 2011-04-01 Daniel Bates <dbates@rim.com> 2 3 Reviewed by Darin Adler. 4 5 Frame's noResize attribute can not be set by JavaScript 6 https://bugs.webkit.org/show_bug.cgi?id=14845 7 8 Tests: fast/frames/frame-inherit-noresize-from-frameset.html 9 fast/frames/frame-programmatic-noresize.html 10 fast/frames/frame-with-noresize-can-be-resized-after-removal-of-noresize.html 11 fast/frames/frame-with-noresize-can-be-resized-after-setting-noResize-to-false.html 12 13 Implements support to programmatically allow and disallow frame resizing. 14 15 Currently, HTMLFrameElement::parseMappedAttribute() is hardcoded to disallow frame resize (i.e. 16 m_noResize = true) when either the noresize DOM attribute is specified (or existed at some 17 point in time) or the value of the noResize attribute is modified. Instead we should allow/disallow 18 frame resize depending on the presence of the noresize DOM attribute/the value of the noResize 19 attribute. 20 21 * html/HTMLFrameElement.cpp: 22 (WebCore::HTMLFrameElement::HTMLFrameElement): 23 (WebCore::HTMLFrameElement::noResize): Made this a non-inline function since this 24 code path isn't performance critical. 25 (WebCore::HTMLFrameElement::attach): Removed code to inherit noresize attribute from 26 parent <frameset> since this functionality is part of RenderFrameSet::computeEdgeInfo(). 27 (WebCore::HTMLFrameElement::parseMappedAttribute): 28 * html/HTMLFrameElement.h: 29 * rendering/RenderFrame.cpp: 30 (WebCore::RenderFrame::updateFromElement): Added. 31 * rendering/RenderFrame.h: 32 * rendering/RenderFrameSet.cpp: 33 (WebCore::RenderFrameSet::notifyFrameEdgeInfoChanged): Added. 34 * rendering/RenderFrameSet.h: 35 1 36 2011-04-01 Michael Saboff <msaboff@apple.com> 2 37 -
trunk/Source/WebCore/html/HTMLFrameElement.cpp
r61959 r82712 39 39 , m_frameBorder(true) 40 40 , m_frameBorderSet(false) 41 , m_noResize(false)42 41 { 43 42 ASSERT(hasTagName(frameTag)); … … 69 68 } 70 69 70 bool HTMLFrameElement::noResize() const 71 { 72 return hasAttribute(noresizeAttr); 73 } 74 71 75 void HTMLFrameElement::attach() 72 76 { … … 76 80 if (!m_frameBorderSet) 77 81 m_frameBorder = frameSetElement->hasFrameBorder(); 78 if (!m_noResize)79 m_noResize = frameSetElement->noResize();80 82 } 81 83 } … … 88 90 // FIXME: If we are already attached, this has no effect. 89 91 } else if (attr->name() == noresizeAttr) { 90 m_noResize = true; 91 // FIXME: If we are already attached, this has no effect. 92 // FIXME: Since this does not check attr->isNull(), it can 93 // never reset m_noResize to false if the attribute is removed. 92 if (renderer()) 93 renderer()->updateFromElement(); 94 94 } else 95 95 HTMLFrameElementBase::parseMappedAttribute(attr); -
trunk/Source/WebCore/html/HTMLFrameElement.h
r66057 r82712 35 35 bool hasFrameBorder() const { return m_frameBorder; } 36 36 37 bool noResize() const { return m_noResize; }37 bool noResize() const; 38 38 39 39 private: … … 49 49 bool m_frameBorder; 50 50 bool m_frameBorderSet; 51 52 bool m_noResize;53 51 }; 54 52 -
trunk/Source/WebCore/rendering/RenderFrame.cpp
r74700 r82712 43 43 } 44 44 45 void RenderFrame::updateFromElement() 46 { 47 if (parent() && parent()->isFrameSet()) 48 toRenderFrameSet(parent())->notifyFrameEdgeInfoChanged(); 49 } 50 45 51 void RenderFrame::viewCleared() 46 52 { -
trunk/Source/WebCore/rendering/RenderFrame.h
r69437 r82712 41 41 virtual bool isFrame() const { return true; } 42 42 43 virtual void updateFromElement(); 44 43 45 virtual void viewCleared(); 44 46 }; -
trunk/Source/WebCore/rendering/RenderFrameSet.cpp
r77286 r82712 381 381 } 382 382 383 void RenderFrameSet::notifyFrameEdgeInfoChanged() 384 { 385 // FIXME: We should only recompute the edge info with respect to the frame that changed 386 // and its adjacent frame(s) instead of recomputing the edge info for the entire frameset. 387 computeEdgeInfo(); 388 } 389 383 390 void RenderFrameSet::fillFromEdgeInfo(const FrameEdgeInfo& edgeInfo, int r, int c) 384 391 { -
trunk/Source/WebCore/rendering/RenderFrameSet.h
r76248 r82712 30 30 class HTMLFrameSetElement; 31 31 class MouseEvent; 32 class RenderFrame; 32 33 33 34 enum FrameEdge { LeftFrameEdge, RightFrameEdge, TopFrameEdge, BottomFrameEdge }; … … 70 71 bool canResizeRow(const IntPoint&) const; 71 72 bool canResizeColumn(const IntPoint&) const; 73 74 void notifyFrameEdgeInfoChanged(); 72 75 73 76 private:
Note: See TracChangeset
for help on using the changeset viewer.