Ignore:
Timestamp:
May 12, 2011, 3:34:28 PM (14 years ago)
Author:
[email protected]
Message:

2011-05-12 Daniel Bates <[email protected]>

Reviewed by Adele Peterson.

Frame's noResize attribute can not be set by JavaScript
https://bugs.webkit.org/show_bug.cgi?id=14845

Tests that frame resizing is allowed and disallowed depending on the value of the noResize property.

Also, tests to ensure that frame resizing is allowed and disallowed when programmatically
removing and adding the noresize attribute, respectively.

  • fast/frames/frame-inherit-noresize-from-frameset-expected.txt: Added.
  • fast/frames/frame-inherit-noresize-from-frameset.html: Added. See <https://bugs.webkit.org/show_bug.cgi?id=57604>.
  • fast/frames/frame-programmatic-noresize-expected.txt: Added.
  • fast/frames/frame-programmatic-noresize.html: Added.
  • fast/frames/frame-with-noresize-can-be-resized-after-removal-of-noresize-expected.txt: Added.
  • fast/frames/frame-with-noresize-can-be-resized-after-removal-of-noresize.html: Added.
  • fast/frames/frame-with-noresize-can-be-resized-after-setting-noResize-to-false-expected.txt: Added.
  • fast/frames/frame-with-noresize-can-be-resized-after-setting-noResize-to-false.html: Added.
  • fast/frames/resources/frame-programmatic-resize.js: Added. (setTestFrameById): (deltaWidth): (shouldAllowFrameResize): (shouldDisallowFrameResize): (shouldDisallowFrameResizeAfterProcessingFrame): (shouldAllowFrameResizeAfterProcessingFrame): (checkTestFrameWidthEquals): (resizeTestFrameBy): (log): (description):

2011-05-12 Daniel Bates <[email protected]>

Reviewed by Adele Peterson.

Frame's noResize attribute can not be set by JavaScript
https://bugs.webkit.org/show_bug.cgi?id=14845

Tests: fast/frames/frame-inherit-noresize-from-frameset.html

fast/frames/frame-programmatic-noresize.html
fast/frames/frame-with-noresize-can-be-resized-after-removal-of-noresize.html
fast/frames/frame-with-noresize-can-be-resized-after-setting-noResize-to-false.html

Implements support to programmatically allow and disallow frame resizing.

Currently, HTMLFrameElement::parseMappedAttribute() is hardcoded to disallow frame resize (i.e.
m_noResize = true) when either the noresize DOM attribute is specified (or existed at some
point in time) or the value of the noResize attribute is modified. Instead we should allow/disallow
frame resize depending on the presence of the noresize DOM attribute/the value of the noResize
attribute.

  • html/HTMLFrameElement.cpp: (WebCore::HTMLFrameElement::HTMLFrameElement): (WebCore::HTMLFrameElement::noResize): Made this a non-inline function since this code path isn't performance critical. (WebCore::HTMLFrameElement::attach): Removed code to inherit noresize attribute from parent <frameset> since this functionality is part of RenderFrameSet::computeEdgeInfo(). (WebCore::HTMLFrameElement::parseMappedAttribute):
  • html/HTMLFrameElement.h:
  • rendering/RenderFrame.cpp: (WebCore::RenderFrame::updateFromElement): Added.
  • rendering/RenderFrame.h:
  • rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::notifyFrameEdgeInfoChanged): Added.
  • rendering/RenderFrameSet.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderFrameSet.cpp

    r82747 r86390  
    381381}
    382382
     383void RenderFrameSet::notifyFrameEdgeInfoChanged()
     384{
     385    if (needsLayout())
     386        return;
     387    // FIXME: We should only recompute the edge info with respect to the frame that changed
     388    // and its adjacent frame(s) instead of recomputing the edge info for the entire frameset.
     389    computeEdgeInfo();
     390}
     391
    383392void RenderFrameSet::fillFromEdgeInfo(const FrameEdgeInfo& edgeInfo, int r, int c)
    384393{
Note: See TracChangeset for help on using the changeset viewer.