Changeset 54270 in webkit
- Timestamp:
- Feb 2, 2010 8:20:05 PM (14 years ago)
- Location:
- trunk/WebKit/chromium
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/chromium/ChangeLog
r54232 r54270 1 2010-02-02 Shinichiro Hamaji <hamaji@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 [Chromium] Implement WebFrameImpl::pageNumberForElementById 6 https://bugs.webkit.org/show_bug.cgi?id=34471 7 8 * public/WebFrame.h: 9 * src/WebFrameImpl.cpp: 10 (WebKit::WebFrameImpl::pageNumberForElementById): 11 * src/WebFrameImpl.h: 12 1 13 2010-02-02 Yury Semikhatsky <yurys@chromium.org> 2 14 -
trunk/WebKit/chromium/public/WebFrame.h
r54212 r54270 484 484 virtual WebString counterValueForElementById(const WebString& id) const = 0; 485 485 486 487 // Returns the number of page where the specified element will be put. 488 // This method is used to support layout tests. 489 virtual int pageNumberForElementById(const WebString& id, 490 float pageWidthInPixels, 491 float pageHeightInPixels) const = 0; 492 486 493 protected: 487 494 ~WebFrame() { } -
trunk/WebKit/chromium/src/WebFrameImpl.cpp
r54212 r54270 1519 1519 } 1520 1520 1521 int WebFrameImpl::pageNumberForElementById(const WebString& id, 1522 float pageWidthInPixels, 1523 float pageHeightInPixels) const 1524 { 1525 if (!m_frame) 1526 return -1; 1527 1528 Element* element = m_frame->document()->getElementById(id); 1529 if (!element) 1530 return -1; 1531 1532 FloatSize pageSize(pageWidthInPixels, pageHeightInPixels); 1533 return PrintContext::pageNumberForElement(element, pageSize); 1534 } 1535 1521 1536 // WebFrameImpl public --------------------------------------------------------- 1522 1537 -
trunk/WebKit/chromium/src/WebFrameImpl.h
r54212 r54270 165 165 virtual WebString renderTreeAsText() const; 166 166 virtual WebString counterValueForElementById(const WebString& id) const; 167 virtual int pageNumberForElementById(const WebString& id, 168 float pageWidthInPixels, 169 float pageHeightInPixels) const; 167 170 168 171 static PassRefPtr<WebFrameImpl> create(WebFrameClient* client);
Note: See TracChangeset
for help on using the changeset viewer.