Changeset 126338 in webkit
- Timestamp:
- Aug 22, 2012 12:38:45 PM (12 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r126232 r126338 6446 6446 } 6447 6447 6448 } 6449 } 6448 IntSize WebPagePrivate::screenSize() const 6449 { 6450 return Platform::Graphics::Screen::primaryScreen()->size(); 6451 } 6452 6453 } 6454 } -
trunk/Source/WebKit/blackberry/Api/WebPage_p.h
r126232 r126338 463 463 void setTextZoomFactor(float); 464 464 465 WebCore::IntSize screenSize() const; 466 465 467 WebPage* m_webPage; 466 468 WebPageClient* m_client; -
trunk/Source/WebKit/blackberry/ChangeLog
r126232 r126338 1 2012-08-22 Crystal Zhang <haizhang@rim.com> 2 3 [BlackBerry] Make all pickers non-zoomable 4 https://bugs.webkit.org/show_bug.cgi?id=94729 5 6 Reviewed by Antonio Gomes. 7 8 Move HTML header initialization to PagePopupBlackBerry as that part are all the same, and make all pickers non-zoomable. 9 10 * Api/WebPage.cpp: 11 (BlackBerry::WebKit::WebPagePrivate::screenSize): 12 (WebKit): 13 * Api/WebPage_p.h: 14 (WebPagePrivate): 15 * WebCoreSupport/DatePickerClient.cpp: 16 (WebCore::DatePickerClient::generateHTML): 17 (WebCore::DatePickerClient::writeDocument): 18 * WebCoreSupport/PagePopupBlackBerry.cpp: 19 (WebCore::PagePopupBlackBerry::init): 20 (WebCore::PagePopupBlackBerry::generateHTML): 21 (WebCore): 22 * WebCoreSupport/PagePopupBlackBerry.h: 23 (PagePopupBlackBerry): 24 * WebCoreSupport/SelectPopupClient.cpp: 25 (WebCore::SelectPopupClient::generateHTML): 26 (WebCore::SelectPopupClient::writeDocument): 27 1 28 2012-08-21 Benjamin C Meyer <bmeyer@rim.com> 2 29 -
trunk/Source/WebKit/blackberry/WebCoreSupport/DatePickerClient.cpp
r122364 r126338 51 51 { 52 52 StringBuilder source; 53 source.append("< html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/><style>\n");53 source.append("<style>\n"); 54 54 // Include CSS file. 55 55 source.append(popupControlBlackBerryCss, … … 135 135 void DatePickerClient::writeDocument(DocumentWriter& writer) 136 136 { 137 writer.setMIMEType("text/html");138 writer.begin(KURL());139 137 writer.addData(m_source.utf8().data(), m_source.utf8().length()); 140 writer.end();141 138 } 142 139 } -
trunk/Source/WebKit/blackberry/WebCoreSupport/PagePopupBlackBerry.cpp
r122162 r126338 41 41 // Fixme: should get the height from runtime. 42 42 #define URL_BAR_HEIGHT 70 43 #define PADDING 80 43 44 44 45 using namespace BlackBerry::Platform::Graphics; … … 64 65 bool PagePopupBlackBerry::init(WebPage* webpage) 65 66 { 66 DocumentWriter* writer = webpage->d->mainFrame()->loader()->activeDocumentLoader()->writer(); 67 m_client->writeDocument(*writer); 67 generateHTML(webpage); 68 68 69 69 installDomFunction(webpage->d->mainFrame()); 70 70 71 71 return true; 72 } 73 74 void PagePopupBlackBerry::generateHTML(WebPage* webpage) 75 { 76 DocumentWriter* writer = webpage->d->mainFrame()->loader()->activeDocumentLoader()->writer(); 77 writer->setMIMEType("text/html"); 78 writer->begin(KURL()); 79 80 // All the popups have the same html head and the page content should be non-zoomable. 81 StringBuilder source; 82 // FIXME: the hardcoding padding will be removed soon. 83 int screenWidth = webpage->d->screenSize().width() - PADDING; 84 source.append("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n"); 85 source.append("<meta name=\"viewport\" content=\"width=" + String::number(screenWidth)); 86 source.append("; user-scalable=no\" />\n"); 87 writer->addData(source.toString().utf8().data(), source.toString().utf8().length()); 88 89 m_client->writeDocument(*writer); 90 writer->end(); 72 91 } 73 92 -
trunk/Source/WebKit/blackberry/WebCoreSupport/PagePopupBlackBerry.h
r121158 r126338 47 47 void installDomFunction(Frame*); 48 48 void setRect(); 49 void generateHTML(BlackBerry::WebKit::WebPage*); 49 50 50 51 private: -
trunk/Source/WebKit/blackberry/WebCoreSupport/SelectPopupClient.cpp
r126128 r126338 67 67 { 68 68 StringBuilder source; 69 source.append("< html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/><style>\n");69 source.append("<style>\n"); 70 70 // Include CSS file. 71 71 source.append(popupControlBlackBerryCss, … … 189 189 void SelectPopupClient::writeDocument(DocumentWriter& writer) 190 190 { 191 writer.setMIMEType("text/html");192 writer.begin(KURL());193 191 writer.addData(m_source.utf8().data(), m_source.utf8().length()); 194 writer.end();195 192 } 196 193
Note: See TracChangeset
for help on using the changeset viewer.