2010-09-14 Chris Rogers <crogers@google.com>
[WebKit-https.git] / WebCore / ChangeLog
1 2010-09-14  Chris Rogers  <crogers@google.com>
2
3         Reviewed by Kenneth Russell.
4
5         audio engine: add AudioFileReader files (Mac implementation)
6         https://bugs.webkit.org/show_bug.cgi?id=36475
7
8         No new tests since audio API is not yet implemented.
9
10         * platform/audio/AudioFileReader.h: Added.
11         * platform/audio/mac/AudioFileReaderMac.cpp: Added.
12         (WebCore::createAudioBufferList):
13         (WebCore::destroyAudioBufferList):
14         (WebCore::AudioFileReader::AudioFileReader):
15         (WebCore::AudioFileReader::~AudioFileReader):
16         (WebCore::AudioFileReader::readProc):
17         (WebCore::AudioFileReader::getSizeProc):
18         (WebCore::AudioFileReader::createBus):
19         (WebCore::createBusFromAudioFile):
20         (WebCore::createBusFromInMemoryAudioFile):
21         * platform/audio/mac/AudioFileReaderMac.h: Added.
22         (WebCore::AudioFileReader::data):
23         (WebCore::AudioFileReader::dataSize):
24
25 2010-09-14  Simon Fraser  <simon.fraser@apple.com>
26
27         Reviewed by Oliver Hunt.
28
29         Drawing an image outside the bounds of a canvas still causes repaints
30         https://bugs.webkit.org/show_bug.cgi?id=45792
31         
32         Some canvas examples, such as http://www.phoboslab.org/biolab/, draw
33         images outide the bounds of the canvas. If the canvas already had a
34         non-empty m_dirtyRect, such draws would cause us to do a repaint of
35         m_dirtyRect again (which goes through the platform-specific invalidation
36         machinery, which can be slow).
37         
38         Optimize this by avoiding extra invalidation when the dirty rect
39         does not intersect the canvas bounds.
40         
41         Not testable because this avoids additional repaints of m_dirtyRect, but
42         m_dirtyRect has to be non-empty for this to benefit.
43
44         * html/HTMLCanvasElement.cpp:
45         (WebCore::HTMLCanvasElement::didDraw):
46
47 2010-09-14  Yury Semikhatsky  <yurys@chromium.org>
48
49         Reviewed by Pavel Feldman.
50
51         Web Inspector: Links from "Profiles" don't lead to "Scripts"
52         https://bugs.webkit.org/show_bug.cgi?id=45756
53
54         * inspector/front-end/ProfileDataGridTree.js:
55         (WebInspector.ProfileDataGridNode.prototype.createCell): use standard routine to create resource link
56         * inspector/front-end/inspector.js: code cleanup: removed no-op method
57         (WebInspector.addMainEventListeners):
58
59 2010-09-14  Patrick Gansterer  <paroga@paroga.com>
60
61         Reviewed by Adam Roben.
62
63         [WINCE] Use codePage instead of TextEncoding
64         https://bugs.webkit.org/show_bug.cgi?id=45466
65
66         Use codePage as member variable to avoid repeated lookup.
67
68         * platform/text/wince/TextCodecWinCE.cpp:
69         (WebCore::newTextCodecWinCE):
70         (WebCore::TextCodecWinCE::TextCodecWinCE):
71         (WebCore::decode):
72         (WebCore::TextCodecWinCE::decode):
73         (WebCore::TextCodecWinCE::encode):
74         * platform/text/wince/TextCodecWinCE.h:
75
76 2010-09-14  Adam Barth  <abarth@webkit.org>
77
78         Attempted Chromium build fix.  The compiler can't tell that
79         ASSERT_NOT_REACHED is not reached and so it demands an initialization
80         of this variable.
81
82         * html/HTMLFontElement.cpp:
83         (WebCore::HTMLFontElement::parseMappedAttribute):
84
85 2010-09-14  Andreas Kling  <andreas.kling@nokia.com>
86
87         Reviewed by Ariya Hidayat.
88
89         [Qt] Wheeling over windowed plugins sometimes cause them to disappear
90
91         * plugins/qt/PluginContainerQt.cpp:
92         (PluginClientWrapper::x11Event): Pass on captured mouse wheel events
93         to the effective native window rather than the grandparent widget.
94         We were calling QWidget::winId() which caused a new X11 window to be
95         created for the grandparent widget and generally mess things up.
96
97 2010-09-14  Kevin Ollivier  <kevino@theolliviers.com>
98
99         [wx] Build fix after move of selectedText() method.
100
101         * platform/wx/PasteboardWx.cpp:
102         (WebCore::Pasteboard::writeSelection):
103
104 2010-09-14  Adam Barth  <abarth@webkit.org>
105
106         Reviewed by Darin Adler.
107
108         Handle <font size=0> as <font size=1> like any other browser
109         https://bugs.webkit.org/show_bug.cgi?id=39148
110
111         Update font size parser to match HTML5 spec.  The main difference here
112         is the handling of 0, which now maps to 1 instead of 3.
113
114         * html/HTMLFontElement.cpp:
115         (WebCore::parseFontSize):
116         (WebCore::HTMLFontElement::cssValueFromFontSizeNumber):
117
118 2010-09-14  Adam Barth  <abarth@webkit.org>
119
120         Reviewed by Darin Adler.
121
122         document.lastModified gives no output if the response doesn't have a Last-Modified header
123         https://bugs.webkit.org/show_bug.cgi?id=8475
124
125         Implement document.lastModified as per HTML5.
126
127         Tests: http/tests/misc/last-modified-parsing.html
128                http/tests/misc/no-last-modified.html
129
130         * dom/Document.cpp:
131         (WebCore::Document::lastModified):
132
133 2010-09-14  Adam Barth  <abarth@webkit.org>
134
135         Reviewed by Eric Seidel.
136
137         `document.compatMode` is `undefined` when using `application/xhtml+xml`
138         https://bugs.webkit.org/show_bug.cgi?id=44422
139
140         Moving the compatMode IDL attribute from HTMLDocument.idl to
141         Document.idl fixes this bug and improve compliance with HTML5.
142
143         Test: fast/parser/compatMode-in-xhtml.xhtml
144
145         * dom/Document.cpp:
146         (WebCore::Document::compatMode):
147         * dom/Document.h:
148         * dom/Document.idl:
149         * html/HTMLDocument.cpp:
150         * html/HTMLDocument.h:
151
152 2010-09-14  Adam Barth  <abarth@webkit.org>
153
154         Reviewed by Nate Chapin.
155
156         V8 security checks don't account for shadowing named frames
157         https://bugs.webkit.org/show_bug.cgi?id=45700
158
159         Test: http/tests/security/xss-DENIED-frame-name.html
160
161         * bindings/v8/custom/V8DOMWindowCustom.cpp:
162         (WebCore::V8DOMWindow::namedSecurityCheck):
163             - If the property name exists on the object, it will shadow the
164               named property lookup on the window object.  That means we need
165               to block access if there's shadowing going on.
166         (WebCore::V8DOMWindow::indexedSecurityCheck):
167             - I made the corresponding change to this function too, but I don't
168               think this one can actually be triggered because JavaScript
169               variable names need to start with a non-digit.
170
171 2010-09-14  Adam Barth  <abarth@webkit.org>
172
173         Reviewed by Eric Seidel.
174
175         incorrect tabindex parsing
176         https://bugs.webkit.org/show_bug.cgi?id=21076
177
178         Updated our integer parsing for tabindex to use the algorithm from the
179         HTML5 spec.
180
181         Test: fast/parser/tabindex-parsing-2.html
182
183         * html/HTMLElement.cpp:
184         (WebCore::HTMLElement::parseMappedAttribute):
185         * html/parser/HTMLParserIdioms.cpp:
186         (WebCore::parseHTMLInteger):
187         * html/parser/HTMLParserIdioms.h:
188
189 2010-09-14  Brent Fulgham  <bfulgham@webkit.org>
190
191         Build correction, no review.
192
193         * WebCore.vcproj/WebCore.vcproj: Exclude OwnPtrCairo.cpp from
194         non-Cairo based builds.
195
196 2010-09-14  Jian Li  <jianli@chromium.org>
197
198         Reviewed by David Levin.
199
200         fast/files/apply-blob-url-to-img.html timeout on Leopard
201         https://bugs.webkit.org/show_bug.cgi?id=45576
202
203         The failure on Leopard is caused by the static method
204         ResourceHandle::supportsBufferedData that returns true to indicate that
205         the buffered data support is enabled for blob resource. However,
206         BlobResourceHandle does not support this and we need to override this.
207
208         The fix is to change supportsBufferedData method from static to virtual
209         so that we can override the default behavior in BlobResourceHandle.
210
211         * fileapi/ThreadableBlobRegistry.cpp: Copy BlobData to make it cross-thread. 
212         (WebCore::BlobRegistryContext::BlobRegistryContext):
213         * loader/ResourceLoader.cpp:
214         (WebCore::ResourceLoader::resourceData):
215         (WebCore::ResourceLoader::addData):
216         * platform/network/BlobResourceHandle.cpp:
217         (WebCore::BlobResourceHandle::supportsBufferedData): Override the default
218         behavior.
219         * platform/network/BlobResourceHandle.h:
220         * platform/network/ResourceHandle.h: Made supportsBufferedData virtual.
221         * platform/network/mac/ResourceHandleMac.mm:
222         (WebCore::ResourceHandle::bufferedData):
223
224 2010-09-14  Brent Fulgham  <bfulgham@webkit.org>
225
226         Build correction, no review.
227
228         * WebCore.vcproj/WebCore.vcproj: Add missing OwnPtrCairo.cpp
229           implementation file.
230         * platform/graphics/cairo/OwnPtrCairo.cpp: Add missing include
231           for <cairo.h>
232
233 2010-09-14  Chris Guillory   <chris.guillory@google.com>
234
235         Reviewed by Chris Fleizach.
236
237         Send all accessibility notifications to Chromium.
238         https://bugs.webkit.org/show_bug.cgi?id=45156
239         
240         Use postAccessibilityNotification to pass accessibility notifications
241         to chromium.
242
243         Tests: platform/chromium/accessibility/post-notification-ActiveDescendantChanged.html
244                platform/chromium/accessibility/post-notification-CheckedStateChanged.html
245                platform/chromium/accessibility/post-notification-ChildrenChanged.html
246                platform/chromium/accessibility/post-notification-FocusedUIElementChanged.html
247                platform/chromium/accessibility/post-notification-LayoutComplete.html
248                platform/chromium/accessibility/post-notification-LiveRegionChanged.html
249                platform/chromium/accessibility/post-notification-LoadComplete.html
250                platform/chromium/accessibility/post-notification-MenuListValueChanged.html
251                platform/chromium/accessibility/post-notification-RowCollapsed.html
252                platform/chromium/accessibility/post-notification-RowCountChanged.html
253                platform/chromium/accessibility/post-notification-RowExpanded.html
254                platform/chromium/accessibility/post-notification-ScrolledToAnchor.html
255                platform/chromium/accessibility/post-notification-SelectedChildrenChanged.html
256                platform/chromium/accessibility/post-notification-SelectedTextChanged.html
257                platform/chromium/accessibility/post-notification-ValueChanged.html
258
259         * accessibility/chromium/AXObjectCacheChromium.cpp:
260         (WebCore::AXObjectCache::postPlatformNotification):
261         * page/chromium/ChromeClientChromium.h:
262
263 2010-09-14  Darin Adler  <darin@apple.com>
264
265         Reviewed by Geoffrey Garen.
266
267         Hang processing href attribute containing a million slashes
268         https://bugs.webkit.org/show_bug.cgi?id=45767
269
270         Test: fast/css/visited-link-hang.html
271
272         * platform/LinkHash.cpp:
273         (WebCore::findSlashDotDotSlash): Added a start position argument and
274         changed types to use size_t consistently instead of a mix.
275         (WebCore::findSlashSlash): Ditto.
276         (WebCore::findSlashDotSlash): Ditto.
277         (WebCore::squeezeOutNullCharacters): Added.
278         (WebCore::cleanSlashDotDotSlashes): Added. Factored out part
279         of cleanPath (see below).
280         (WebCore::mergeDoubleSlashes): Ditto.
281         (WebCore::cleanSlashDotSlashes): Ditto.
282         (WebCore::cleanPath): Changed algorithm to not remove as we go to
283         avoid N^2 behavior; instead replace with null characters and then
284         do a squeeze operation after the fact. Also moved the body of the
285         function out of line since we normally don't have to do any cleaning.
286         This whole thing should go at some point -- it's not the right
287         algorithm -- but this should eliminate the performance problems
288         without changing behavior.
289
290 2010-09-14  Nico Weber  <thakis@chromium.org>
291
292         Reviewed by Kenneth Russell.
293
294         [chromium]: On Mac, let image layer data row order match skia.
295         https://bugs.webkit.org/show_bug.cgi?id=45400
296
297         Make CoreGraphics texture row order match skia's row order, remove all
298         code that worked around this difference. This also fixes a problem where
299         image layers would be drawn upside down.
300
301         Covered by existing layout tests, but we don't run these with
302         compositing yet.
303
304         * platform/graphics/chromium/ContentLayerChromium.cpp:
305         (WebCore::ContentLayerChromium::SharedValues::SharedValues):
306         (WebCore::ContentLayerChromium::updateContents):
307         (WebCore::ContentLayerChromium::updateTextureRect):
308         * platform/graphics/chromium/LayerRendererChromium.cpp:
309         (WebCore::LayerRendererChromium::setRootLayerCanvasSize):
310         (WebCore::LayerRendererChromium::drawLayers):
311
312 2010-09-14  Ryosuke Niwa  <rniwa@webkit.org>
313
314         Reviewed by Tony Chang.
315
316         applyInlineStyleToNodeRange does not extend run properly
317         https://bugs.webkit.org/show_bug.cgi?id=45616
318
319         The bug was caused by applyInlineStyleToNodeRange's skipping a node whenever it has children.
320         Fixed the bug by only skipping a node that contains the past end node, contains non-editable region,
321         or has a non-editable parent node. Also fixed a bug that applyInlineStyleToNodeRange does not remove
322         styled elements in a run that are identical to the one added. addInlineStyleIfNeeded now removes
323         all styled elements in a run using removeStyleFromRunBeforeApplyingStyle before calling addInlineStyleIfNeeded.
324
325         Test: editing/style/inline-style-extend-run.html
326
327         * editing/ApplyStyleCommand.cpp:
328         (WebCore::containsNonEditableRegion): Added.
329         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): See above.
330         (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle): Added, see above.
331         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Added support for RemoveAlways.
332         (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Replaced RemoveAttributesAndElements by RemoveIfNeeded.
333         (WebCore::ApplyStyleCommand::extractInlineStyleToPushDown): Replaced RemoveAttributesAndElements by RemoveIfNeeded.
334         * editing/ApplyStyleCommand.h:
335
336 2010-09-14  Andreas Kling  <andreas.kling@nokia.com>
337
338         Reviewed by Kenneth Rohde Christiansen.
339
340         [Qt] V8 port: Get inspector up and running
341         https://bugs.webkit.org/show_bug.cgi?id=45771
342
343         * inspector/front-end/WebKit.qrc: Add DebuggerScript.js
344
345 2010-09-14  Oliver Hunt  <oliver@apple.com>
346
347         PPC Build fix.
348
349         * bindings/js/SerializedScriptValue.cpp:
350         (WebCore::CloneDeserializer::readFile):
351         (WebCore::CloneDeserializer::readTerminal):
352
353 2010-09-14  Kwang Yul Seo  <skyul@company100.net>
354
355         Reviewed by Andreas Kling.
356
357         [chromium] Remove unused ICU headers
358         https://bugs.webkit.org/show_bug.cgi?id=45698
359
360         Remove unused headers.
361
362         * platform/graphics/chromium/FontCacheLinux.cpp:
363
364 2010-09-14  Andreas Kling  <andreas.kling@nokia.com>
365
366         Reviewed by Antonio Gomes.
367
368         [Qt] Numpad Enter key returns keyCode 0 instead of 13
369         https://bugs.webkit.org/show_bug.cgi?id=45014
370
371         Original patch by Jarred Nicholls <jarred.nicholls@gmail.com>
372
373         There is a missing case statement in the PlatformKeyboardEventQt.cpp
374         file to handle the Enter button on the number pad.  Because it is not
375         handled, the keyCode returned in a JavaScript event is 0 rather than 13.
376
377         Test: manual-tests/qt/numpad-enter-key.html
378
379         * manual-tests/qt/numpad-enter-key.html: Added.
380         * platform/qt/PlatformKeyboardEventQt.cpp:
381         (WebCore::windowsKeyCodeForKeyEvent):
382
383 2010-09-14  Evan Martin  <evan@chromium.org>
384
385         Reviewed by Darin Fisher.
386
387         [chromium] building without debug syms broke after recent refactoring
388         https://bugs.webkit.org/show_bug.cgi?id=45720
389
390         Now that we build WebCore as multiple libraries, we need to adjust the
391         flags to turn off debug symbols for all of these libraries.
392
393         No new tests; should only affect an uncommon build flag.
394
395         * WebCore.gyp/WebCore.gyp:
396
397 2010-09-14  Tony Chang  <tony@chromium.org>
398
399         Unreviewed, fix chromium compile.
400
401         * platform/graphics/chromium/ImageLayerChromium.h:
402
403 2010-09-14  Nico Weber  <thakis@chromium.org>
404
405         Reviewed by Darin Fisher.
406
407         [chromium]: crash less in compositor mode on mac
408         https://bugs.webkit.org/show_bug.cgi?id=45714
409
410         The contents image can go away when the dom is updated. Since the
411         layer tree is updated asynchronously, it needs to ref the native image,
412         else it will hold on to a stale object.
413
414         This still needs to be done for skia, too.
415
416         * platform/graphics/chromium/ImageLayerChromium.h:
417         * platform/graphics/chromium/ImageLayerChromium.cpp:
418
419 2010-09-14  Andrey Kosyakov  <caseq@chromium.org>
420
421         Reviewed by Yury Semikhatsky.
422
423         Web Inspector: [Resources panel] [HAR] Need a way to save timing data.
424         Added support for resource timings to HAREntry.
425         https://bugs.webkit.org/show_bug.cgi?id=45663
426
427         * inspector/front-end/HAREntry.js:
428         (WebInspector.HAREntry.prototype._buildTimings):
429         (WebInspector.HAREntry.prototype._toMilliseconds):
430         (WebInspector.HAREntry.prototype._interval):
431
432 2010-09-14  Kwang Yul Seo  <skyul@company100.net>
433
434         Reviewed by Kent Tamura.
435
436         [BREWMP] Always set LeftButton in PlatformMouseEvent
437         https://bugs.webkit.org/show_bug.cgi?id=45705
438
439         AEE_POINTER_GET_MOUSE_MODIFIERS always returns 0, so it is impossible to know
440         which button is pressed or released. The current code erroneously sets NoButton.
441         Set LeftButton unconditionally because Brew MP usually runs on touch device.
442
443         * platform/brew/PlatformMouseEventBrew.cpp:
444         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
445
446 2010-09-14  Yury Semikhatsky  <yurys@chromium.org>
447
448         Reviewed by Andreas Kling.
449
450         Move DebuggerScript.js from WebKit/chromium/src/js to WebCore/bindings/v8
451         https://bugs.webkit.org/show_bug.cgi?id=45739
452
453         * bindings/v8/DebuggerScript.js: Added.
454
455 2010-09-10  Alexander Pavlov  <apavlov@chromium.org>
456
457         Reviewed by Pavel Feldman.
458
459         Web Inspector: Implement on-demand reporting of empty CSS rules matched for a node by WebCore
460         https://bugs.webkit.org/show_bug.cgi?id=45530
461
462         * css/CSSStyleSelector.cpp:
463         (WebCore::CSSStyleSelector::matchRules):
464         (WebCore::CSSStyleSelector::matchRulesForList):
465         (WebCore::CSSStyleSelector::matchUARules):
466         (WebCore::CSSStyleSelector::styleForElement):
467         (WebCore::CSSStyleSelector::pseudoStyleForElement):
468         (WebCore::CSSStyleSelector::styleRulesForElement):
469         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement):
470         * css/CSSStyleSelector.h:
471         * inspector/InspectorDOMAgent.cpp:
472         (WebCore::InspectorDOMAgent::getStyles):
473         (WebCore::InspectorDOMAgent::buildArrayForPseudoElements):
474
475 2010-09-14  Hyung Song  <beergun@company100.net>
476
477         Reviewed by Darin Adler.
478
479         [BREWMP] Set m_size in SharedBuffer::createWithContentsOfFile();
480         https://bugs.webkit.org/show_bug.cgi?id=45701
481
482         SharedBuffer::createWithContentsOfFile() reads file content and saves to 
483         result.m_buffer directly, leaving result.m_size unchanged.
484
485         * platform/brew/SharedBufferBrew.cpp:
486         (WebCore::SharedBuffer::createWithContentsOfFile):
487
488 2010-09-14  Adam Barth  <abarth@webkit.org>
489
490         Reviewed by Darin Adler.
491
492         Move adjustLexerState to the HTMLTokenizer
493         https://bugs.webkit.org/show_bug.cgi?id=45649
494
495         This function used let us share code between the tree builder and the
496         two other users of the HTMLTokenizer.  However, now that the tree
497         builder is all grown up, it can't use this code anymore.  The other
498         users would much rather this code lived on HTMLTokenizer and understood
499         <script>.  This patch attempts to make them happy.
500
501         * html/parser/HTMLPreloadScanner.cpp:
502         (WebCore::HTMLPreloadScanner::processToken):
503         * html/parser/HTMLTokenizer.cpp:
504         (WebCore::HTMLTokenizer::updateStateFor):
505         * html/parser/HTMLTokenizer.h:
506         * html/parser/HTMLTreeBuilder.cpp:
507         (WebCore::HTMLTreeBuilder::scriptEnabled):
508         * html/parser/HTMLTreeBuilder.h:
509         * html/parser/HTMLViewSourceParser.cpp:
510         (WebCore::HTMLViewSourceParser::updateTokenizerState):
511
512 2010-09-14  Pierre-Antoine LaFayette  <plafayet@codeaurora.org>
513
514         Reviewed by Darin Adler.
515
516         REGRESSION (r52839): Incomplete repaint of IMG with text-align:center
517         https://bugs.webkit.org/show_bug.cgi?id=40142
518
519         http://trac.webkit.org/changeset/52839 didn't really deal with the inline replaced element case.  This just generalizes to all inline content.
520
521         Patch by: Dave Hyatt
522
523         Tests: fast/repaint/block-layout-inline-children-float-positioned.html
524                fast/repaint/block-layout-inline-children-replaced.html
525
526         * rendering/RenderBlockLineLayout.cpp:
527         (WebCore::RenderBlock::layoutInlineChildren):
528          
529 2010-09-14  Balazs Kelemen  <kb@inf.u-szeged.hu>
530
531         Reviewed by Andreas Kling.
532
533         [Qt] Cookie operations should use NetworkingContext
534         https://bugs.webkit.org/show_bug.cgi?id=45745
535         No new functionality so no new tests.
536
537         * platform/qt/CookieJarQt.cpp:
538         (WebCore::cookieJar): Use the NetworkingContext for obtaining the QNetworkAccessManager
539         instead of directly accessing the FrameLoaderClient.
540
541 2010-09-14  Sheriff Bot  <webkit.review.bot@gmail.com>
542
543         Unreviewed, rolling out r67449.
544         http://trac.webkit.org/changeset/67449
545         https://bugs.webkit.org/show_bug.cgi?id=45746
546
547         This change makes tree red. (Requested by pfeldman on
548         #webkit).
549
550         * editing/ApplyStyleCommand.cpp:
551         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
552         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement):
553         (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
554         (WebCore::ApplyStyleCommand::extractInlineStyleToPushDown):
555         * editing/ApplyStyleCommand.h:
556
557 2010-09-14  Eric Seidel  <eric@webkit.org>
558
559         Unreviewed, reverting changes r67451 and r67451.
560         Broke lots of builders.
561
562         Only intercept ESC key press when autocorrection UI is visible.
563         https://bugs.webkit.org/show_bug.cgi?id=45071
564
565         * editing/Editor.cpp:
566         * editing/Editor.h:
567         * editing/EditorCommand.cpp:
568         (WebCore::createCommandMap):
569         * loader/EmptyClients.h:
570         * page/EditorClient.h:
571
572 2010-09-14  Kinuko Yasuda  <kinuko@chromium.org>
573
574         Unreviewed; an attempt to fix Chromium Windows build.
575
576         * fileapi/FileEntry.cpp:
577
578 2010-09-13  Andrey Kosyakov  <caseq@chromium.org>
579
580         Reviewed by Pavel Feldman.
581
582         Web Inspector: provide support for opening external navigation for links within certain elements
583         Use default handling for clicks on links that have target="_blank".
584         Add option for external navigation to URL audit formatter.
585         https://bugs.webkit.org/show_bug.cgi?id=45671
586
587         * inspector/front-end/AuditFormatters.js:
588         (WebInspector.AuditFormatters.url):
589         * inspector/front-end/inspector.js:
590
591 2010-09-14  Dan Bernstein  <mitz@apple.com>
592
593         Build fix.
594
595         * editing/EditorCommand.cpp:
596
597 2010-09-14  Jia Pu  <jpu@apple.com>
598
599         Reviewed by Dan Bernstein.
600
601         Only intercept ESC key press when autocorrection UI is visible.
602         https://bugs.webkit.org/show_bug.cgi?id=45071
603
604         Only intercept ESC key when autocorrection panel is shown. Otherwise pressing
605         ESC will cancel current loading like usual.
606
607         * editing/Editor.cpp:
608         (WebCore::Editor::isShowingCorrectionPanel): Query editor client whether autocorrection
609           panel is shown.
610
611         * editing/Editor.h: Added declaration of isShowingCorrectionPanel().
612
613         * editing/EditorCommand.cpp:
614         (WebCore::supportedDismissCorrectionPanel): Only support executeCancelOperation()
615           when autocorrection panel is shown.
616         (WebCore::createCommandMap): Replaced isSupported function pointer for
617           executeCancelOperation() command with supportedDismissCorrectionPanel().
618
619         * loader/EmptyClients.h:
620         (WebCore::EmptyEditorClient::isShowingCorrectionPanel): Dummy implementation of
621           new member method declared in base class.
622
623         * page/EditorClient.h: Declared new member method isShowingCorrectionPanel().
624
625 2010-09-14  Kwang Yul Seo  <skyul@company100.net>
626
627         Reviewed by Kent Tamura.
628
629         [BREWMP] Remove TextBreakIteratorInternalICUBrew.cpp
630         https://bugs.webkit.org/show_bug.cgi?id=45691
631
632         Brew MP no longer depends on ICU for internationalization.
633         Remove TextBreakIteratorInternalICUBrew.cpp.
634
635         * platform/text/brew/TextBreakIteratorInternalICUBrew.cpp: Removed.
636
637 2010-09-14  Ryosuke Niwa  <rniwa@webkit.org>
638
639         Reviewed by Tony Chang.
640
641         applyInlineStyleToNodeRange does not extend run properly
642         https://bugs.webkit.org/show_bug.cgi?id=45616
643
644         The bug was caused by applyInlineStyleToNodeRange's skipping a node whenever it has children.
645         Fixed the bug by only skipping a node that contains the past end node, contains non-editable region,
646         or has a non-editable parent node. Also fixed a bug that applyInlineStyleToNodeRange does not remove
647         styled elements in a run that are identical to the one added. addInlineStyleIfNeeded now removes
648         all styled elements in a run using removeStyleFromRunBeforeApplyingStyle before calling addInlineStyleIfNeeded.
649
650         Test: editing/style/inline-style-extend-run.html
651
652         * editing/ApplyStyleCommand.cpp:
653         (WebCore::containsNonEditableRegion): Added.
654         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): See above.
655         (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle): Added, see above.
656         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Added support for RemoveAlways.
657         (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Replaced RemoveAttributesAndElements by RemoveIfNeeded.
658         (WebCore::ApplyStyleCommand::extractInlineStyleToPushDown): Replaced RemoveAttributesAndElements by RemoveIfNeeded.
659         * editing/ApplyStyleCommand.h:
660
661 2010-09-13  Yuta Kitamura  <yutak@chromium.org>
662
663         Reviewed by Kent Tamura.
664
665         Add one #if guard block to fix Qt builds.
666
667         Web Inspector: WebSocket in Resources tab
668         https://bugs.webkit.org/show_bug.cgi?id=40768
669
670         * inspector/InspectorResource.cpp:
671
672 2010-09-13  Yuta Kitamura  <yutak@chromium.org>
673
674         Reviewed by Pavel Feldman.
675
676         Add WebSocket resource type to Web Inspector.
677
678         When a new WebSocket connection is established, a line for that connection
679         will appear in Web Inspector's Resources tab. If the resource name is
680         clicked, the details of handshake request and response will be shown.
681
682         Web Inspector: WebSocket in Resources tab
683         https://bugs.webkit.org/show_bug.cgi?id=40768
684
685         * inspector/InspectorController.cpp:
686         (WebCore::InspectorController::addResource): WebSocket resource does not
687         have an associated loader, thus frame might be null. Need to check it.
688         (WebCore::InspectorController::removeResource): Ditto.
689         (WebCore::InspectorController::didCreateWebSocket):
690         (WebCore::InspectorController::willSendWebSocketHandshakeRequest):
691         (WebCore::InspectorController::didReceiveWebSocketHandshakeResponse):
692         (WebCore::InspectorController::didCloseWebSocket):
693         * inspector/InspectorController.h:
694         * inspector/InspectorResource.cpp: Add null checks of m_loader and m_frame,
695         because WebSocket does not have a loader and we need to allow null for
696         these variables.
697         (WebCore::createReadableStringFromBinary):
698         (WebCore::InspectorResource::InspectorResource):
699         (WebCore::InspectorResource::create): Factory function of
700         regular (non-WebSocket) resources.
701         (WebCore::InspectorResource::createWebSocket): Factory function of
702         WebSocket resources.
703         (WebCore::InspectorResource::updateWebSocketRequest):
704         (WebCore::InspectorResource::updateWebSocketResponse):
705         (WebCore::InspectorResource::updateScriptObject): m_frame->document() becomes
706         available when Frame::setDocument() is called. We cannot obtain documentURL
707         during the constructor or updateRequest() function, because m_frame->document()
708         is not available yet at that point and documentURL will contain a wrong URL.
709         As far as I know, updateScriptObject() is the only place where we can safely
710         obtain documentURL.
711         (WebCore::InspectorResource::cachedResource):
712         (WebCore::InspectorResource::type):
713         (WebCore::InspectorResource::resourceData):
714         * inspector/InspectorResource.h:
715         (WebCore::InspectorResource::):
716         (WebCore::InspectorResource::markWebSocket):
717         * inspector/front-end/Resource.js:
718         (WebInspector.Resource.Type.toString):
719         (WebInspector.Resource.prototype.set type):
720         (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType):
721         * inspector/front-end/ResourceView.js:
722         (WebInspector.ResourceView.prototype._refreshRequestHeaders):
723         (WebInspector.ResourceView.prototype._refreshResponseHeaders):
724         (WebInspector.ResourceView.prototype._refreshHeaders):
725         * inspector/front-end/inspector.css:
726         (.resources-category-websockets, .resources-category-other):
727         (.resources-category-websockets .resources-graph-bar):
728         (.resources-category-websockets.resource-cached .resources-graph-bar):
729         * inspector/front-end/inspector.js:
730         (WebInspector.loaded):
731         (WebInspector.updateResource):
732         * websockets/WebSocketChannel.cpp:
733         (WebCore::WebSocketChannel::WebSocketChannel):
734         (WebCore::WebSocketChannel::disconnect):
735         (WebCore::WebSocketChannel::didOpen):
736         (WebCore::WebSocketChannel::didClose):
737         (WebCore::WebSocketChannel::processBuffer):
738         (WebCore::WebSocketChannel::identifier):
739         * websockets/WebSocketChannel.h:
740
741 2010-09-13  W. James MacLean  <wjmaclean@google.com>
742
743         Reviewed by Darin Fisher.
744
745         [chromium] Thumbnails not generated for GPU Rendered Pages
746         https://bugs.webkit.org/show_bug.cgi?id=44127
747
748         Replicates existing functionality, use existing tests.
749         Adds pixel-readback for GPU composited pages to allow for thumbnailing,
750         printing and other services to work with GPU rendered pages.
751
752         * platform/graphics/chromium/LayerRendererChromium.cpp:
753         (WebCore::LayerRendererChromium::getFramebufferPixels):
754         * platform/graphics/chromium/LayerRendererChromium.h:
755         (WebCore::LayerRendererChromium::rootLayerTextureSize):
756
757 2010-09-13  Kinuko Yasuda  <kinuko@chromium.org>
758
759         Unreviewed, build fix for Gtk.
760
761         * bindings/js/JSEntryCustom.cpp:
762
763 2010-09-13  Kinuko Yasuda  <kinuko@chromium.org>
764
765         Reviewed by Adam Barth.
766
767         Make FileEntry and DirectoryEntry methods accessible via Entry instance
768         https://bugs.webkit.org/show_bug.cgi?id=45553
769
770         FileEntry- and DirectoryEntry- specific methods must be available on Entry object based on its internal type.
771
772         Added custom toJS/toV8 implementation to Entry interface.
773
774         No new tests; test will be added later when we have complete implementation for the API.
775
776         * CMakeLists.txt:
777         * GNUmakefile.am:
778         * WebCore.gypi:
779         * WebCore.pro:
780         * WebCore.vcproj/WebCore.vcproj:
781         * WebCore.xcodeproj/project.pbxproj:
782         * bindings/js/JSEntryCustom.cpp: Added.
783         (WebCore::toJS):
784         * bindings/v8/custom/V8EntryCustom.cpp: Added.
785         (WebCore::toV8):
786         * fileapi/DirectoryEntry.h: Nits fix.
787         * fileapi/DirectoryEntry.idl: Added ConvertUndefinedOrNullToString to path parameter.
788         * fileapi/Entry.idl: Added CustomToJS attribute.
789         * fileapi/FileEntry.cpp:
790         (WebCore::FileEntry::createWriter):
791         (WebCore::FileEntry::file):
792         * fileapi/FileEntry.h:
793         * fileapi/FileEntry.idl:
794
795 2010-09-13  Ryosuke Niwa  <rniwa@webkit.org>
796
797         Reviewed by Darin Adler.
798
799         REGRESSION: In Gmail, a crash occurs at getDoubleValue() when applying a text color to a new line
800         https://bugs.webkit.org/show_bug.cgi?id=45632
801
802         Test: editing/execCommand/query-font-size-with-typing-style.html
803
804         The crash was caused by selectionStartCSSPropertyValue's deleting nodeToRemove before
805         retrieving the font-size property. Fixed the bug by moving the removal code to the end of the function.
806
807         * editing/Editor.cpp:
808         (WebCore::Editor::selectionStartCSSPropertyValue):
809
810 2010-09-13  Kwang Yul Seo  <skyul@company100.net>
811
812         Reviewed by Darin Adler.
813
814         [BREWMP] Remove WebCore namespace in SSLKeyGeneratorBrew.cpp
815         https://bugs.webkit.org/show_bug.cgi?id=45690
816
817         WebCore namespace is not required because getSupportedKeySizes and signedPublicKeyAndChallengeString are already
818         in namespace WebCore block.
819
820         * platform/brew/SSLKeyGeneratorBrew.cpp:
821         (WebCore::getSupportedKeySizes):
822         (WebCore::signedPublicKeyAndChallengeString):
823
824 2010-09-13  Mario Sanchez Prada  <msanchez@igalia.com>
825
826         Reviewed by Martin Robinson.
827
828         [GTK] Code simplification needed in Atk Wrapper
829         https://bugs.webkit.org/show_bug.cgi?id=45687
830
831         Use TextIterator::rangeLength() to calculate endOffset
832
833         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
834         (getSelectionOffsetsForObject): Don't manually iterate over a
835         artificial new range but just call TextIterator::rangeLength on
836         the range created between the start and end positions.
837
838 2010-09-13  Sam Weinig  <sam@webkit.org>
839
840         Reviewed by Alice Liu.
841
842         Clean up xcode project.
843
844         * WebCore.xcodeproj/project.pbxproj:
845
846 2010-09-13  Eric Carlson  <eric.carlson@apple.com>
847
848         Reviewed by Geoff Garen.
849
850         JavaScript dialog should not deactivate media element
851         https://bugs.webkit.org/show_bug.cgi?id=45688
852
853         Test: http/tests/media/reload-after-dialog.html
854
855         * bindings/generic/ActiveDOMCallback.cpp:
856         (WebCore::ActiveDOMObjectCallbackImpl::suspend): Add ReasonForSuspension parameter.
857
858         * bindings/js/ScriptDebugServer.cpp:
859         (WebCore::ScriptDebugServer::setJavaScriptPaused): Pass new parameter to suspendActiveDOMObjects.
860
861         * dom/ActiveDOMObject.cpp:
862         (WebCore::ActiveDOMObject::suspend): Add ReasonForSuspension parameter.
863         * dom/ActiveDOMObject.h:
864
865         * dom/ScriptExecutionContext.cpp:
866         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): Ditto.
867         * dom/ScriptExecutionContext.h:
868
869         * history/CachedFrame.cpp:
870         (WebCore::CachedFrame::CachedFrame): Pass new parameter to suspendActiveDOMObjects.
871
872         * html/HTMLMarqueeElement.cpp:
873         (WebCore::HTMLMarqueeElement::suspend): Add ReasonForSuspension parameter.
874         * html/HTMLMarqueeElement.h:
875
876         * html/HTMLMediaElement.cpp:
877         (WebCore::HTMLMediaElement::stop): Deal with element being suspended.
878         (WebCore::HTMLMediaElement::suspend): Do nothing unless reason for suspension is document
879         becoming inactive.
880         * html/HTMLMediaElement.h:
881
882         * page/PageGroupLoadDeferrer.cpp:
883         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer): Pass WillShowDialog to suspendActiveDOMObjects.
884
885         * page/SuspendableTimer.cpp:
886         (WebCore::SuspendableTimer::suspend): Add ReasonForSuspension parameter.
887         * page/SuspendableTimer.h:
888
889         * websockets/WebSocket.cpp:
890         (WebCore::WebSocket::suspend): Ditto.
891         * websockets/WebSocket.h:
892
893         * xml/XMLHttpRequest.cpp:
894         (WebCore::XMLHttpRequest::suspend): Ditto.
895         * xml/XMLHttpRequest.h:
896
897 2010-09-13  Sam Weinig  <sam@webkit.org>
898
899         Fix the mac build.
900
901         * page/mac/EventHandlerMac.mm:
902         (WebCore::EventHandler::passMousePressEventToSubframe):
903
904 2010-09-13  Sam Weinig  <sam@webkit.org>
905
906         Reviewed by Anders Carlsson.
907
908         Can't scroll on Bugzilla patch review pages on Mac with WebKit2
909         https://bugs.webkit.org/show_bug.cgi?id=43555
910
911         <rdar://problem/8421386> WebKit2: gmail.com is completely unresponsive to clicks
912         <rdar://problem/8276298> Can't scroll on Bugzilla patch review pages on Mac with WebKit2 (43555)
913
914         * page/mac/EventHandlerMac.mm:
915         (WebCore::EventHandler::passWheelEventToWidget):
916         (WebCore::frameHasPlatformWidget):
917         (WebCore::EventHandler::passMousePressEventToSubframe):
918         (WebCore::EventHandler::passMouseMoveEventToSubframe):
919         (WebCore::EventHandler::passMouseReleaseEventToSubframe):
920         Add WebKit2 mode for these functions based on the presence of a platform widget for a
921         FrameView.
922
923 2010-09-13  Patrick Gansterer  <paroga@paroga.com>
924
925         Reviewed by Kenneth Rohde Christiansen.
926
927         [WINCE] Buildfix for ViewportArguments.cpp
928         https://bugs.webkit.org/show_bug.cgi?id=45678
929
930         Use fabs() instead of abs().
931         This patch also fixes the return value, when
932         the value is between -1 and 1.
933
934         * dom/ViewportArguments.cpp:
935         (WebCore::findUserScalableValue):
936
937 2010-09-13  Darin Adler  <darin@apple.com>
938
939         Reviewed by Adam Barth.
940
941         Preparation for eliminating deprecatedParseURL
942         https://bugs.webkit.org/show_bug.cgi?id=45695
943
944         Added new HTMLParserIdioms source file, with a name inspired by the HTML
945         specification, which has a section defining things like "space character"
946         that talks about common parser idioms. These are idioms for the main HTML
947         parser and for parsers for various microlanguages as well.
948
949         * Android.mk:
950         * CMakeLists.txt:
951         * GNUmakefile.am:
952         * WebCore.gypi:
953         * WebCore.pro:
954         * WebCore.vcproj/WebCore.vcproj:
955         * WebCore.xcodeproj/project.pbxproj:
956         Added HTMLParserIdioms.
957
958         * css/CSSHelper.h: Fixed indentation and comments here. Point to the new
959         stripLeadingAndTrailingHTMLSpaces function.
960
961         * html/parser/HTMLParserIdioms.cpp: Added.
962         * html/parser/HTMLParserIdioms.h: Added.
963
964         * html/parser/HTMLTreeBuilder.cpp:
965         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeadingWhitespace):
966         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeadingWhitespace):
967         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeadingNonWhitespace):
968         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemainingWhitespace):
969         Updated for name changes.
970
971         * html/parser/HTMLTreeBuilder.h: Moved functions to HTMLParserIdioms.h.
972
973         * html/HTMLInputElement.cpp:
974         * html/HTMLMeterElement.cpp:
975         * html/HTMLProgressElement.cpp:
976         * html/StepRange.cpp:
977         * rendering/RenderSlider.cpp:
978         Updated includes.
979
980         * svg/SVGImageLoader.cpp:
981         (WebCore::SVGImageLoader::sourceURI): Fixed incorrect use of deprecatedParseURL.
982         This is for use on the attribute value before building the URL, not on the URL
983         after building it. I did not add a test case; this is an obscure corner and soon
984         we will be moving to stripLeadingAndTrailingHTMLSpaces anyway.
985         * wml/WMLImageLoader.cpp:
986         (WebCore::WMLImageLoader::sourceURI): Ditto.
987
988 2010-09-13  Chris Fleizach  <cfleizach@apple.com>
989
990         Reviewed by Darin Adler.
991
992         AX: REGRESSION: WebKit does not report label of web popup buttons
993         https://bugs.webkit.org/show_bug.cgi?id=45715
994
995         Test: platform/mac/accessibility/popup-button-title.html
996
997         * WebCore.xcodeproj/project.pbxproj:
998         * accessibility/AccessibilityRenderObject.cpp:
999         (WebCore::AccessibilityRenderObject::title):
1000
1001 2010-09-13  Kinuko Yasuda  <kinuko@chromium.org>
1002
1003         Reviewed by Dumitru Daniliuc.
1004
1005         Expose Flags constructor if FileSystem API is Enabled
1006         https://bugs.webkit.org/show_bug.cgi?id=45165
1007
1008         This change also includes:
1009         - Changed Flags' attribute names from UPPERCASE to camelCase to reflect the recent spec change.
1010           http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interface
1011         - Enhanced EnabledAtRuntime attribute to take parameter that is used to generate a RuntimeEnabledFeatures method name.
1012
1013         No new tests; tests will be added when we fully expose the interface.
1014
1015         * bindings/v8/V8DOMWindowCustom.cpp: Added custom getter for FlagsConstructor.
1016         * fileapi/Flags.idl: Changed attribute names to camelCase.
1017         * page/DOMWindow.idl: Exposed Flags constructor.
1018
1019         * bindings/scripts/CodeGenerator.pm: Updated the WK_lcfirst hack to work around getter method for 'create' (create() should be avoided as it's widely used to instantiate an object).
1020         * bindings/scripts/CodeGeneratorV8.pm: Added EnabledAtRuntime=FeatureName support.
1021         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1022         (WebDOMTestObj::create):
1023         (WebDOMTestObj::setCreate):
1024         * bindings/scripts/test/CPP/WebDOMTestObj.h:
1025         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1026         (webkit_dom_test_obj_set_property):
1027         (webkit_dom_test_obj_get_property):
1028         (webkit_dom_test_obj_class_init):
1029         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1030         * bindings/scripts/test/JS/JSTestObj.cpp:
1031         * bindings/scripts/test/ObjC/DOMTestObj.h:
1032         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1033         * bindings/scripts/test/TestObj.idl:
1034         * bindings/scripts/test/V8/V8TestObj.cpp:
1035         (WebCore::TestObjInternal::createAttrGetter):
1036         (WebCore::TestObjInternal::createAttrSetter):
1037         (WebCore::TestObjInternal::enabledAtRuntimeAttr1AttrGetter):
1038         (WebCore::TestObjInternal::enabledAtRuntimeAttr1AttrSetter):
1039         (WebCore::TestObjInternal::enabledAtRuntimeAttr2AttrGetter):
1040         (WebCore::TestObjInternal::enabledAtRuntimeAttr2AttrSetter):
1041         (WebCore::TestObjInternal::enabledAtRuntimeMethod1Callback):
1042         (WebCore::TestObjInternal::enabledAtRuntimeMethod2Callback):
1043         (WebCore::ConfigureV8TestObjTemplate):
1044
1045 2010-09-13  Adam Barth  <abarth@webkit.org>
1046
1047         Reviewed by Darin Adler.
1048
1049         "Implement" EOF processing in AfterBodyMode and AfterAfterBodyMode
1050         https://bugs.webkit.org/show_bug.cgi?id=45647
1051
1052         Implements the notImplemented by doing nothing, which is the proper
1053         behavior according to the spec.
1054
1055         * html/parser/HTMLTreeBuilder.cpp:
1056         (WebCore::HTMLTreeBuilder::processEndOfFile):
1057
1058 2010-09-13  Adam Barth  <abarth@webkit.org>
1059
1060         Reviewed by Darin Adler.
1061
1062         More trivial EOF handling in tree builder
1063         https://bugs.webkit.org/show_bug.cgi?id=45648
1064
1065         The spec says to treat these modes like the InBodyMode, which is what
1066         this patch does.  Doing so is indistinguishable from our current
1067         behavior, which is why we didn't catch this based on tests.
1068
1069         * html/parser/HTMLTreeBuilder.cpp:
1070         (WebCore::HTMLTreeBuilder::processEndOfFile):
1071
1072 2010-09-13  James Robinson  <jamesr@chromium.org>
1073
1074         Reviewed by Kenneth Russell.
1075
1076         SharedGraphicsContext3D's texture cache holds on to images after free
1077         https://bugs.webkit.org/show_bug.cgi?id=45706
1078
1079         Each SharedGraphicsContext3D keeps a cache of uploaded textures keyed by NativeImagePtrs.
1080         Whenever the backing native image is deleted it needs to let the SharedGraphicsContext3D know
1081         so that the cache entry and associated texture can also be removed.
1082
1083         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
1084         (WebCore::SharedGraphicsContext3D::SharedGraphicsContext3D):
1085         (WebCore::SharedGraphicsContext3D::~SharedGraphicsContext3D):
1086         (WebCore::SharedGraphicsContext3D::removeTextureFor):
1087         (WebCore::SharedGraphicsContext3D::removeTexturesFor):
1088         (WebCore::SharedGraphicsContext3D::allContexts):
1089         * platform/graphics/gpu/SharedGraphicsContext3D.h:
1090         * platform/graphics/skia/NativeImageSkia.cpp:
1091         (WebCore::NativeImageSkia::~NativeImageSkia):
1092         * platform/graphics/skia/NativeImageSkia.h:
1093
1094 2010-09-13  Chris Fleizach  <cfleizach@apple.com>
1095
1096         Reviewed by David Kilzer.
1097
1098         AX: accessibilityIsIgnored is returning nil when return value expects a BOOL
1099         https://bugs.webkit.org/show_bug.cgi?id=45548
1100
1101         Test: platform/mac/accessibility/element-is-ignored.html
1102
1103         * accessibility/mac/AccessibilityObjectWrapper.mm:
1104         (-[AccessibilityObjectWrapper accessibilityIsIgnored]):
1105
1106 2010-09-13  Chris Fleizach  <cfleizach@apple.com>
1107
1108         Reviewed by Darin Adler.
1109
1110         CrashTracer: 874 crashes in Safari at com.apple.WebCore: WebCore::AccessibilityTable::isTableExposableThroughAccessibility + 663
1111         https://bugs.webkit.org/show_bug.cgi?id=45697
1112
1113         Inside of AccessibilityTableRow, parentTable() should not use getOrCreate() on the parent table, because the render table may
1114         be in a bad state and accessing internal variables can lead to a crash.
1115
1116         Test: platform/mac/accessibility/updating-attribute-in-table-row-crash.html
1117
1118         * accessibility/AccessibilityTableRow.cpp:
1119         (WebCore::AccessibilityTableRow::parentTable):
1120
1121 2010-09-13  Adam Barth  <abarth@webkit.org>
1122
1123         Reviewed by Eric Seidel.
1124
1125         Implement EOF handling in TextMode
1126         https://bugs.webkit.org/show_bug.cgi?id=45644
1127
1128         This patch is actually covered by a bunch of tests.  We were just
1129         magically passing the tests before because of some nutty code in
1130         Document.cpp.
1131
1132         * dom/Document.cpp:
1133         (WebCore::Document::implicitClose):
1134             - This code was masking the notImplemented in the tree builder.
1135               I also removed the use of the setting because it wasn't working
1136               properly anyway.  I'll implement a working version shortly.
1137         * html/parser/HTMLTreeBuilder.cpp:
1138         (WebCore::HTMLTreeBuilder::processEndOfFile):
1139             - Implement per the spec.
1140
1141 2010-09-13  Enrica Casucci  <enrica@apple.com>
1142
1143         Reviewed by Sam Weining.
1144
1145         Paste should be implemented in WebCore like Copy and Cut for Mac also.
1146         https://bugs.webkit.org/show_bug.cgi?id=45494
1147         <rdar://problem/7660537>
1148
1149         On the Mac platform, the implementation of the paste operation is all done
1150         at the WebKit level. In order to support it on WebKit2 it is necessary to
1151         refactor the code and move this functionality at the level of WebCore like
1152         we already have on Windows.
1153         The original code relies on some in AppKit functions that call back into
1154         WebKit causing problems in WebKit2. All this functionality has been moved
1155         at the level of the editor client where it can be dealt with appropriately.
1156
1157         * editing/Editor.cpp:
1158         (WebCore::Editor::shouldInsertFragment):
1159         * editing/mac/EditorMac.mm: extended to support Mail specific scenarios.
1160         (WebCore::Editor::pasteWithPasteboard):
1161         * loader/EmptyClients.h:
1162         (WebCore::EmptyFrameLoaderClient::canShowMIMETypeAsHTML): Added.
1163         (WebCore::EmptyEditorClient::documentFragmentFromAttributedString): Added.
1164         (WebCore::EmptyEditorClient::setInsertionPasteboard): Added to support Mail.
1165         * loader/FrameLoaderClient.h:
1166         * page/EditorClient.h:
1167         * platform/Pasteboard.h:
1168         * platform/mac/PasteboardMac.mm:
1169         (WebCore::Pasteboard::writeSelection): replaced call to Appkit with one that
1170         doesn't calll back into WebKit.
1171         (WebCore::Pasteboard::documentFragmentWithImageResource): Re-implemented at the
1172         WebCore level.
1173         (WebCore::Pasteboard::documentFragmentWithRtf): Re-implemented at the
1174         WebCore level.
1175         (WebCore::uniqueURLWithRelativePart): Added.
1176         (WebCore::Pasteboard::documentFragment): Extended to include all the functionality
1177         provided in documentFragmentFromPasteboard in WebHTMLView.mm.
1178
1179 2010-09-13  Alejandro G. Castro  <alex@igalia.com>
1180
1181         Reviewed by Kenneth Rohde Christiansen.
1182
1183         [Gtk] Reduce the size of the shadow buffer in the paths using the clip region
1184         https://bugs.webkit.org/show_bug.cgi?id=44699
1185
1186         Intersect the clip bounding rect with the path that we are going
1187         to use to create the shadow in order to reduce the region we have
1188         to blur.
1189
1190         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1191         (WebCore::drawPathShadow):
1192
1193 210-09-13  Darin Fisher  <darin@chromium.org>
1194
1195         Reviewed by David Levin.
1196
1197         Add option to conditionally compile smooth scrolling support.
1198         https://bugs.webkit.org/show_bug.cgi?id=45689
1199
1200         The OS(WINDOWS) conditional becomes unnecessary since
1201         ENABLE(SMOOTH_SCROLLING) should only be specified on
1202         platforms that have a smooth scrolling implementation.
1203
1204         * platform/ScrollAnimator.cpp:
1205         * platform/ScrollAnimatorWin.cpp:
1206         * platform/ScrollAnimatorWin.h:
1207
1208 2010-09-13  Ryosuke Niwa  <rniwa@webkit.org>
1209
1210         Reviewed by Kent Tamura.
1211
1212         Move functions of StyledMarkupAccumulator below that of MarkupAccumulator
1213         https://bugs.webkit.org/show_bug.cgi?id=45624
1214
1215         Moved the declaration of StyledMarkupAccumulator and the definitions of its member functions
1216         to below the definitions of MarkupAccumulator's member functions.
1217
1218         No new tests are added since this is a cleanup.
1219
1220         * editing/markup.cpp:
1221         (WebCore::StyledMarkupAccumulator::StyledMarkupAccumulator):
1222         (WebCore::StyledMarkupAccumulator::appendElement):
1223         (WebCore::StyledMarkupAccumulator::shouldAnnotate):
1224         (WebCore::StyledMarkupAccumulator::wrapWithNode):
1225         (WebCore::StyledMarkupAccumulator::wrapWithStyleNode):
1226         (WebCore::StyledMarkupAccumulator::takeResults):
1227         (WebCore::StyledMarkupAccumulator::appendText):
1228         (WebCore::StyledMarkupAccumulator::renderedText):
1229         (WebCore::StyledMarkupAccumulator::stringValueForRange):
1230         (WebCore::styleFromMatchedRulesForElement):
1231         (WebCore::StyledMarkupAccumulator::removeExteriorStyles):
1232         (WebCore::needInterchangeNewlineAfter):
1233         (WebCore::styleFromMatchedRulesAndInlineDecl):
1234         (WebCore::removeEnclosingMailBlockquoteStyle):
1235         (WebCore::removeDefaultStyles):
1236
1237 2010-09-13  Alejandro G. Castro  <alex@igalia.com>
1238
1239         Reviewed by Martin Robinson.
1240
1241         [GTK] Leak in the GraphicsContextCairo drawPathShadow
1242         https://bugs.webkit.org/show_bug.cgi?id=44959
1243
1244         Fix a leak of the cairo_path.
1245
1246         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1247         (WebCore::drawPathShadow):
1248         * platform/graphics/cairo/OwnPtrCairo.cpp:
1249         (WTF::cairo_path_t):
1250         * platform/graphics/cairo/OwnPtrCairo.h:
1251
1252 2010-09-13  Adam Barth  <abarth@webkit.org>
1253
1254         Reviewed by Darin Adler.
1255
1256         Fix </sarcasm>
1257         https://bugs.webkit.org/show_bug.cgi?id=45645
1258
1259         Umm... Yeah.
1260
1261         * html/parser/HTMLTreeBuilder.cpp:
1262         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
1263
1264 2010-09-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1265
1266         Reviewed by Darin Adler.
1267
1268         [WML] Fix build breaks when WML is enabled
1269         https://bugs.webkit.org/show_bug.cgi?id=45628
1270
1271         There are build breaks by Bug 22382 when WML is enabled. The handleLinkClick() has an event parameter.
1272         So, we need to set an event when wml invoke the handleLinkClick(). And, doTextFieldCommandFromEvent()
1273         was moved to editor. So, we need to mofidy the invocation in WMLInputElement.cpp 
1274
1275         * wml/WMLAElement.cpp:
1276         (WebCore::WMLAElement::defaultEventHandler):
1277         * wml/WMLInputElement.cpp:
1278         (WebCore::WMLInputElement::defaultEventHandler):
1279
1280 2010-09-13  Martin Robinson  <mrobinson@igalia.com>
1281
1282         Reviewed by Xan Lopez.
1283
1284         [GTK] When a feature is disabled by default, the source necessary to build it are not included in the distribution
1285         https://bugs.webkit.org/show_bug.cgi?id=45230
1286
1287         No new tests as this is just a build change.
1288
1289         * GNUmakefile.am: Move as many sources as possible to the SOURCES primary.
1290         Others should be moved over time as we solve issues with them.
1291
1292 2010-09-13  Chris Fleizach  <cfleizach@apple.com>
1293
1294         Reviewed by Darin Adler.
1295
1296         REGRESSION (r64816-r64889): Crash in WebCore::AccessibilityRenderObject
1297         https://bugs.webkit.org/show_bug.cgi?id=43807
1298
1299         Ensure that visiblePositionForPoint can handle non RenderBoxModelObject types.
1300
1301         Test: platform/mac/accessibility/visible-position-crash-for-text-node.html
1302
1303         * accessibility/AccessibilityRenderObject.cpp:
1304         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
1305
1306 2010-09-13  Martin Robinson  <mrobinson@igalia.com>
1307
1308         Reviewed by Andreas Kling.
1309
1310         [Qt] DOM listeners get wrong keycodes for some keys
1311         https://bugs.webkit.org/show_bug.cgi?id=43365
1312
1313         Produce the proper keycodes for the print screen key as well as the
1314         keypad insert and delete keys.
1315
1316         * platform/qt/PlatformKeyboardEventQt.cpp:
1317         (WebCore::windowsKeyCodeForKeyEvent): Fix keycode translation for the mentioned keys.
1318
1319 2010-09-13  Jonathan Dixon  <joth@chromium.org>
1320
1321         Reviewed by Steve Block.
1322
1323         [chromium] Port test shell geolocation fixes to DRT
1324         https://bugs.webkit.org/show_bug.cgi?id=45313
1325
1326         Also re-apply rolled out patch http://trac.webkit.org/changeset/66886 :-
1327         Add missing virtual destructor to the abstract base class.
1328
1329         * platform/chromium/GeolocationServiceChromium.cpp:
1330         (WebCore::GeolocationServiceBridge::~GeolocationServiceBridge):
1331         * platform/chromium/GeolocationServiceChromium.h:
1332
1333 2010-09-13  Yury Semikhatsky  <yurys@chromium.org>
1334
1335         Reviewed by Pavel Feldman.
1336
1337         Web Inspector: upstream testExpandScope debugger test
1338         https://bugs.webkit.org/show_bug.cgi?id=45260
1339
1340         Test: inspector/debugger-expand-scope.html
1341
1342         * inspector/front-end/InjectedScript.js: return "Arguments" as class name for arguments variable in v8.
1343         (injectedScriptConstructor.):
1344
1345 2010-09-13  Mario Sanchez Prada  <msanchez@igalia.com>
1346
1347         Reviewed by Martin Robinson.
1348
1349         [GTK] ATs should be able to select/unselect text
1350         https://bugs.webkit.org/show_bug.cgi?id=25673
1351
1352         Implement AtkText's setSelection and removeSelection functions
1353
1354         * accessibility/AccessibilityObject.cpp:
1355         (WebCore::AccessibilityObject::visiblePositionRangeForRange):
1356         Moved some GTK specific code from a ifdef-endif region to
1357         AccessibilityObjectAtk.cpp
1358         * accessibility/AccessibilityObject.h:
1359         * accessibility/gtk/AccessibilityObjectAtk.cpp:
1360         (WebCore::AccessibilityObject::getLengthForTextRange): New.
1361         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1362         (webkit_accessible_text_remove_selection): Implemented following
1363         the lead of GAIL's implementation of the AtkText interface.
1364         (webkit_accessible_text_set_selection): Implemented following
1365         the lead of GAIL's implementation of the AtkText interface.
1366         (webkit_accessible_text_set_caret_offset): Changed to directly use
1367         visiblePositionRangeForRange now that there's no longer a problem
1368         with that, as it was in the past (only worked for text controls).
1369
1370 2010-08-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1371
1372         Reviewed by Antti Koivisto.
1373
1374         Update support for the viewport meta tag algorithm, to
1375         match the following draft spec:
1376
1377         http://people.opera.com/rune/TR/ED-css-viewport-20100806/
1378
1379         Add common handling of viewport meta tag based on new Opera spec
1380         https://bugs.webkit.org/show_bug.cgi?id=44201
1381
1382         Tests: fast/viewport/viewport-1.html
1383                fast/viewport/viewport-10.html
1384                fast/viewport/viewport-100.html
1385                fast/viewport/viewport-101.html
1386                fast/viewport/viewport-102.html
1387                fast/viewport/viewport-103.html
1388                fast/viewport/viewport-104.html
1389                fast/viewport/viewport-105.html
1390                fast/viewport/viewport-106.html
1391                fast/viewport/viewport-107.html
1392                fast/viewport/viewport-108.html
1393                fast/viewport/viewport-109.html
1394                fast/viewport/viewport-11.html
1395                fast/viewport/viewport-110.html
1396                fast/viewport/viewport-111.html
1397                fast/viewport/viewport-112.html
1398                fast/viewport/viewport-113.html
1399                fast/viewport/viewport-114.html
1400                fast/viewport/viewport-115.html
1401                fast/viewport/viewport-116.html
1402                fast/viewport/viewport-117.html
1403                fast/viewport/viewport-118.html
1404                fast/viewport/viewport-119.html
1405                fast/viewport/viewport-12.html
1406                fast/viewport/viewport-120.html
1407                fast/viewport/viewport-121.html
1408                fast/viewport/viewport-122.html
1409                fast/viewport/viewport-123.html
1410                fast/viewport/viewport-124.html
1411                fast/viewport/viewport-125.html
1412                fast/viewport/viewport-126.html
1413                fast/viewport/viewport-127.html
1414                fast/viewport/viewport-13.html
1415                fast/viewport/viewport-14.html
1416                fast/viewport/viewport-15.html
1417                fast/viewport/viewport-16.html
1418                fast/viewport/viewport-17.html
1419                fast/viewport/viewport-18.html
1420                fast/viewport/viewport-19.html
1421                fast/viewport/viewport-2.html
1422                fast/viewport/viewport-20.html
1423                fast/viewport/viewport-21.html
1424                fast/viewport/viewport-22.html
1425                fast/viewport/viewport-23.html
1426                fast/viewport/viewport-24.html
1427                fast/viewport/viewport-25.html
1428                fast/viewport/viewport-26.html
1429                fast/viewport/viewport-27.html
1430                fast/viewport/viewport-28.html
1431                fast/viewport/viewport-29.html
1432                fast/viewport/viewport-3.html
1433                fast/viewport/viewport-30.html
1434                fast/viewport/viewport-31.html
1435                fast/viewport/viewport-32.html
1436                fast/viewport/viewport-33.html
1437                fast/viewport/viewport-34.html
1438                fast/viewport/viewport-35.html
1439                fast/viewport/viewport-36.html
1440                fast/viewport/viewport-37.html
1441                fast/viewport/viewport-38.html
1442                fast/viewport/viewport-39.html
1443                fast/viewport/viewport-4.html
1444                fast/viewport/viewport-40.html
1445                fast/viewport/viewport-41.html
1446                fast/viewport/viewport-42.html
1447                fast/viewport/viewport-43.html
1448                fast/viewport/viewport-44.html
1449                fast/viewport/viewport-45.html
1450                fast/viewport/viewport-46.html
1451                fast/viewport/viewport-47.html
1452                fast/viewport/viewport-48.html
1453                fast/viewport/viewport-49.html
1454                fast/viewport/viewport-5.html
1455                fast/viewport/viewport-50.html
1456                fast/viewport/viewport-51.html
1457                fast/viewport/viewport-52.html
1458                fast/viewport/viewport-53.html
1459                fast/viewport/viewport-54.html
1460                fast/viewport/viewport-55.html
1461                fast/viewport/viewport-56.html
1462                fast/viewport/viewport-57.html
1463                fast/viewport/viewport-58.html
1464                fast/viewport/viewport-59.html
1465                fast/viewport/viewport-6.html
1466                fast/viewport/viewport-60.html
1467                fast/viewport/viewport-61.html
1468                fast/viewport/viewport-62.html
1469                fast/viewport/viewport-63.html
1470                fast/viewport/viewport-64.html
1471                fast/viewport/viewport-65.html
1472                fast/viewport/viewport-66.html
1473                fast/viewport/viewport-67.html
1474                fast/viewport/viewport-68.html
1475                fast/viewport/viewport-69.html
1476                fast/viewport/viewport-7.html
1477                fast/viewport/viewport-70.html
1478                fast/viewport/viewport-71.html
1479                fast/viewport/viewport-72.html
1480                fast/viewport/viewport-73.html
1481                fast/viewport/viewport-74.html
1482                fast/viewport/viewport-75.html
1483                fast/viewport/viewport-76.html
1484                fast/viewport/viewport-77.html
1485                fast/viewport/viewport-78.html
1486                fast/viewport/viewport-79.html
1487                fast/viewport/viewport-8.html
1488                fast/viewport/viewport-80.html
1489                fast/viewport/viewport-81.html
1490                fast/viewport/viewport-82.html
1491                fast/viewport/viewport-83.html
1492                fast/viewport/viewport-84.html
1493                fast/viewport/viewport-85.html
1494                fast/viewport/viewport-86.html
1495                fast/viewport/viewport-87.html
1496                fast/viewport/viewport-88.html
1497                fast/viewport/viewport-9.html
1498                fast/viewport/viewport-90.html
1499
1500         * dom/ViewportArguments.cpp:
1501         (WebCore::findConfigurationForViewportData):
1502         (WebCore::findSizeValue):
1503         (WebCore::findScaleValue):
1504         (WebCore::findUserScalableValue):
1505         (WebCore::findTargetDensityDPIValue):
1506         (WebCore::setViewportFeature):
1507         * dom/ViewportArguments.h:
1508         (WebCore::ViewportArguments::):
1509         (WebCore::ViewportArguments::ViewportArguments):
1510         (WebCore::ViewportArguments::hasCustomArgument):
1511
1512 2010-09-13  Andreas Kling  <andreas.kling@nokia.com>
1513
1514         Reviewed by Kenneth Rohde Christiansen.
1515
1516         [Qt] Don't add empty strings to list of supported image MIME types
1517         https://bugs.webkit.org/show_bug.cgi?id=45643
1518
1519         After <http://trac.webkit.org/changeset/67355> getMIMETypeForExtension()
1520         returns an empty string instead of "application/octet-stream" for unsupported
1521         extensions. Don't add these to the list of supported types, and clean out
1522         the logic that removed "application/octet-stream" from supported types.
1523
1524         Fixes crash in initializeMIMETypeRegistry() due to inserting String() into
1525         a HashSet<String>.
1526
1527         * platform/MIMETypeRegistry.cpp:
1528         (WebCore::initializeSupportedImageMIMETypes):
1529         (WebCore::initializeSupportedImageMIMETypesForEncoding):
1530
1531 2010-09-13  Adam Barth  <abarth@webkit.org>
1532
1533         Attempted Qt build fix.
1534
1535         * html/parser/HTMLElementStack.cpp:
1536
1537 2010-09-13  Adam Barth  <abarth@webkit.org>
1538
1539         Reviewed by Eric Seidel.
1540
1541         Apply spec changes to InForeignContentMode
1542         https://bugs.webkit.org/show_bug.cgi?id=45636
1543
1544         Now breaking out of foreign content doesn't always bring you back to
1545         HTML.  If you have a foreign content element that can contain HTML, you
1546         just get brought back to that element.
1547
1548         * html/parser/HTMLElementStack.cpp:
1549         (WebCore::HTMLNames::isForeignContentScopeMarker):
1550         (WebCore::HTMLElementStack::popUntilForeignContentScopeMarker):
1551         * html/parser/HTMLElementStack.h:
1552         * html/parser/HTMLTreeBuilder.cpp:
1553         (WebCore::HTMLTreeBuilder::processStartTag):
1554         (WebCore::HTMLTreeBuilder::processEndOfFile):
1555
1556 2010-09-13  Adam Barth  <abarth@webkit.org>
1557
1558         Reviewed by Eric Seidel.
1559
1560         Convert notImplemented() to ASSERT_NOT_REACHED
1561         https://bugs.webkit.org/show_bug.cgi?id=45639
1562
1563         The reason we never implemented this state is because it's not actually
1564         reachable.
1565
1566         * html/parser/HTMLTreeBuilder.cpp:
1567         (WebCore::HTMLTreeBuilder::processStartTag):
1568
1569 2010-09-13  Patrick Gansterer  <paroga@paroga.com>
1570
1571         Reviewed by Kenneth Rohde Christiansen.
1572
1573         [WINCE] Buildfix for ScrollAnimatorWin
1574         https://bugs.webkit.org/show_bug.cgi?id=45595
1575
1576         Use fabs() instead of abs().
1577
1578         * platform/ScrollAnimatorWin.cpp:
1579         (WebCore::ScrollAnimatorWin::scroll):
1580         (WebCore::ScrollAnimatorWin::animateScroll):
1581
1582 2010-09-13  Adam Barth  <abarth@webkit.org>
1583
1584         Reviewed by Eric Seidel.
1585
1586         Remove fixed FIXME
1587         https://bugs.webkit.org/show_bug.cgi?id=45637
1588
1589         The spec made assertions that were false.  Hixie fixed the spec by
1590         removing the assertions.  There's no need to keep these FIXMEs in the
1591         code.
1592
1593         * html/parser/HTMLTreeBuilder.cpp:
1594         (WebCore::HTMLTreeBuilder::processEndTagForInCell):
1595
1596 2010-09-12  Adam Barth  <abarth@webkit.org>
1597
1598         Reviewed by Eric Seidel.
1599
1600         Remove FIXME now that the HTML5 spec has been updated
1601         https://bugs.webkit.org/show_bug.cgi?id=45634
1602
1603         The spec changed to say what we do here so this FIXME isn't needed
1604         anymore.
1605
1606         Tests: fast/parser/form-pointer-1.html
1607                fast/parser/form-pointer-2.html
1608                fast/parser/form-pointer-3.html
1609                fast/parser/form-pointer-4.html
1610
1611         * html/parser/HTMLTreeBuilder.cpp:
1612         (WebCore::HTMLTreeBuilder::processStartTagForInTable):
1613
1614 2010-09-12  Robin Qiu  <robin.qiu@torchmobile.com.cn>
1615
1616         Reviewed by Antonio Gomes.
1617
1618         https://bugs.webkit.org/show_bug.cgi?id=18768
1619         Fixed a bug in scroll flow. When we don't have scrollbars, we need to
1620         repaintFixedElementsAfterScrolling(), sendScrollEvent() ... as well as
1621         scrollContents();
1622
1623         Tests: scrollbars/scrollevent-iframe-no-scrolling-wheel.html
1624                scrollbars/scrollevent-iframe-no-scrolling.html
1625
1626         * page/FrameView.cpp:
1627         (WebCore::FrameView::valueChanged): Added.
1628         * page/FrameView.h: Added a new method.
1629         * platform/ScrollView.cpp:
1630         (WebCore::ScrollView::valueChanged): Added.
1631         (WebCore::ScrollView::updateScrollbars):
1632         * platform/ScrollView.h: Added a new method.
1633
1634 2010-09-10  MORITA Hajime  <morrita@google.com>
1635
1636         Reviewed by Tony Chang.
1637
1638         [Chromium] Implement textInputController.hasSpellingMarker() for Chromium
1639         https://bugs.webkit.org/show_bug.cgi?id=45441
1640         
1641         Added an  API for testing marker state. 
1642         We locate this here instead of DRT for sharing the logic between
1643         multiple ports.
1644
1645         * WebCore.exp.in:
1646         * editing/Editor.cpp:
1647         (WebCore::Editor::selectionStartHasSpellingMarkerFor):
1648         * editing/Editor.h:
1649
1650 2010-09-12  Adam Barth  <abarth@webkit.org>
1651
1652         Reviewed by Eric Seidel.
1653
1654         Adoption agency should use takeAllChildrenFrom
1655         https://bugs.webkit.org/show_bug.cgi?id=45570
1656
1657         Before this patch, we were using an unsafe pattern of walking the
1658         sibling list without grabbing references.  Instead, we should use the
1659         shiny new takeAllChildrenFrom method that shoves the children into a
1660         vector first.  Also, update takeAllChildrenFrom to handle the case
1661         where the old parent is attached.
1662
1663         * dom/ContainerNode.cpp:
1664         (WebCore::ContainerNode::takeAllChildrenFrom):
1665         * html/parser/HTMLTreeBuilder.cpp:
1666         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1667         * html/parser/HTMLTreeBuilder.h:
1668
1669 2010-09-12  Adam Barth  <abarth@webkit.org>
1670
1671         Reviewed by Eric Seidel.
1672
1673         isParsingFragment assert hit in new treebuilder
1674         https://bugs.webkit.org/show_bug.cgi?id=45621
1675
1676         Update our list of special tags to match the spec.
1677
1678         * html/parser/HTMLTreeBuilder.cpp:
1679
1680 2010-09-12  Robert Hogan  <robert@webkit.org>
1681
1682         Reviewed by Andreas Kling.
1683
1684         [Qt] Fix http/tests/navigation/reload-subframe-object.html
1685
1686         We need to bring our use of getMimeTypeForPath() and
1687         getMimeTypeForExtension() into line with WebCore expectations.
1688
1689         We should use MIMETypeRegistry::getMIMETypeForExtension() for cases
1690         where an empty mimetype should be returned if no match is found, and
1691         MIMETypeRegistry::getMIMETypeForPath() for cases where
1692         'application/octet-stream' should be returned if no match is found.
1693
1694         Fixes http/tests/navigation/reload-subframe-object.html
1695
1696         Based on findings in webkit.org/b/31398 and webkit.org/b/15554.
1697
1698         https://bugs.webkit.org/show_bug.cgi?id=45613
1699
1700         * platform/network/qt/QNetworkReplyHandler.cpp:
1701         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
1702         * platform/qt/MIMETypeRegistryQt.cpp:
1703         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
1704
1705 2010-09-12  Dan Bernstein  <mitz@apple.com>
1706
1707         Reviewed by Adele Peterson.
1708
1709         Neglect unlikely hyphenation opportunities
1710         https://bugs.webkit.org/show_bug.cgi?id=45606
1711
1712         Avoid looking for hyphenation points in about 40% of the cases at the cost of missing about
1713         3% of the hyphenation opportunities.
1714
1715         * rendering/RenderBlockLineLayout.cpp:
1716         (WebCore::tryHyphenating): Bail out if the widest the prefix before the hyphen can be is no more
1717         than 5/4 the font size.
1718
1719 2010-09-12  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
1720
1721         Reviewed by Simon Hausmann.
1722
1723         [Qt] fix qt_webkit_version.pri install for in-Qt builds
1724
1725         Always add the target, even if building inside Qt - as opposed to the
1726         headers and libraries, there are no rules for that coming from
1727         qbase.pri.
1728
1729         Task-number: QTBUG-13306
1730
1731         * WebCore.pro:
1732
1733 2010-09-12  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
1734
1735         Reviewed by Simon Hausmann.
1736
1737         [Qt] Let QtWebKit inject itself into the qt configuration
1738
1739         i.e., don't explicitly deal with qt_webkit_version.pri outside of the
1740         webkit source directory.
1741
1742         Task-number: QTBUG-12379
1743
1744         * WebCore.pro:
1745
1746 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1747
1748         [Qt] Build fix.
1749
1750         * WebCore.pro: Re-add erroneously removed sources.
1751
1752 2010-09-12  Andreas Kling  <andreas.kling@nokia.com>
1753
1754         Reviewed by Kenneth Rohde Christiansen.
1755
1756         [Qt] Remove Path::closeSubpath() workaround for broken miter joins
1757         https://bugs.webkit.org/show_bug.cgi?id=45618
1758
1759         Removed Path::closeCanvasSubpath() and share the logic between Canvas and SVG
1760         paths. The problem was actually in Qt's path stroker and has been fixed for Qt 4.7.1.
1761
1762         * html/canvas/CanvasRenderingContext2D.cpp:
1763         (WebCore::CanvasRenderingContext2D::closePath):
1764         * platform/graphics/Path.h:
1765         * platform/graphics/qt/PathQt.cpp:
1766
1767 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1768
1769         Fix the Gtk and minimal builds.
1770
1771         * plugins/PluginView.cpp:
1772         (WebCore::PluginView::npObject): Correct the #ifdefs.
1773         (WebCore::PluginView::bindingInstance): Moved npErr variable
1774         into npObject() function where it is used.
1775
1776 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1777
1778         [Qt] Prospective build fix for minimal build.
1779
1780         * plugins/PluginView.cpp: Guard newly added function
1781         by ENABLE_NETSCAPE_PLUGIN feature.
1782         (WebCore::PluginView::npObject):
1783         * plugins/PluginView.h:
1784
1785 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1786
1787         Reviewed by Andreas Kling.
1788
1789         [Qt] Add support for binding QtWebKit to a QScriptEngine.
1790
1791         The ScriptController owns the V8 context, and this patch
1792         for the Qt build also gives it a QScriptEngine, that has
1793         been instructed to adopt the V8 context.
1794
1795         This is the enabler for the QObject bindings, used in
1796         the API and DRT.
1797
1798         * WebCore.pro:
1799         * bindings/v8/ScriptController.cpp: Include QScriptEngine
1800         for the Qt build, to let the ~ScriptController destructor
1801         find the QScriptEngine destructor (via OwnPtr).
1802         * bindings/v8/ScriptController.h: Declare getters.
1803         * bindings/v8/ScriptControllerQt.cpp: Added.
1804         (WebCore::ScriptController::qtScriptEngine): Implement
1805         engine adoption.
1806
1807 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1808
1809         Reviewed by Andreas Kling.
1810
1811         [Qt] Last bits and pieces for a V8 build.
1812
1813         When building with V8, get it from QtScript.
1814
1815         * WebCore.pro: Use QtScript, removed non-existant
1816         bridge files from the build.
1817
1818 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1819
1820         Reviewed by Andreas Kling.
1821
1822         [Qt] Add PlatformBridge for V8 build.
1823
1824         Add the minimalisting platform bridge with the two
1825         methods needed by NPV8Object.cpp.
1826
1827         * WebCore.pro:
1828         * platform/qt/PlatformBridge.h: Added.
1829         * platform/qt/PlatformBridgeQt.cpp: Added.
1830         (WebCore::PlatformBridge::popupsAllowed):
1831         (WebCore::PlatformBridge::pluginScriptableObject):
1832         * plugins/PluginView.cpp: Refactor the plugin object
1833         retrieval code into a separate function, called by
1834         bindingInstance() and PlatformBridge.
1835         (WebCore::PluginView::npObject):
1836         (WebCore::PluginView::bindingInstance):
1837         * plugins/PluginView.h:
1838
1839 2010-09-11  Jer Noble  <jer.noble@apple.com>
1840
1841         Reviewed by Eric Carlson.
1842
1843         http/tests/media/text-served-as-text.html failing on Windows (Debug+Release)
1844         https://bugs.webkit.org/show_bug.cgi?id=45603
1845
1846         Disable the eat/text components under Windows the same way as we do on the Mac.
1847
1848         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1849         * platform/graphics/win/QTMovie.cpp:
1850         * platform/graphics/win/QTMovie.h:
1851
1852 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1853
1854         Reviewed by Andreas Kling.
1855
1856         Fix compilation of the V8 bindings on X11 with Qt.
1857
1858         This changes brings the file in sync with its copy in bridge/,
1859         adding additional conflicting X11 keywords to undef. This is
1860         a temporary fix until the file is removed altogether, which is
1861         tracked in https://bugs.webkit.org/show_bug.cgi?id=45617
1862
1863         * bindings/v8/npruntime_internal.h:
1864
1865 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1866
1867         Reviewed by Andreas Kling.
1868
1869         Fix compilation of the V8 bindings on X11 with Qt.
1870
1871         These headers include npruntime, which drag on X11Resources.h, which
1872         among other things #define's None and Boolean. Later on v8.h is included,
1873         which declares these in enums and therefore conflicts. npruntime_internal.h
1874         was introduced exactly to address this problem by including npruntime.h
1875         and undeff'ing the offending constants.
1876
1877         * bindings/v8/V8Helpers.h:
1878         * bindings/v8/V8NPObject.h:
1879         * bindings/v8/V8NPUtils.h:
1880
1881 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1882
1883         Gtk build fix.
1884
1885         Use false instead of False after
1886         http://trac.webkit.org/changeset/67323
1887
1888         * plugins/gtk/PluginViewGtk.cpp:
1889         (WebCore::PluginView::updatePluginWidget):
1890         (WebCore::PluginView::paint):
1891
1892 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1893
1894         Reviewed by Andreas Kling.
1895
1896         [Qt] Fix the compilation of V8Binding.cpp when compiling with Qt.
1897
1898         * bindings/v8/V8Binding.cpp:
1899         (WebCore::WebCoreStringResource::WebCoreStringResource): In this
1900         line an AtomicString should be converted to a WTF::String. The former
1901         has a conversion operator to the latter, to be able to call the
1902         WTF::String copy constructor. When compiling with Qt, then AtomicString
1903         also has a conversion operator to QString _and_ WTF::String has an
1904         implicit constructor that takes a QString. Therefore the compiler is
1905         confused and not sure which conversion to prefer, the one that isn't
1906         actually a conversion - going to WTF::String - or the conversion from
1907         AtomicString to QString and then constructing the WTF::String from
1908         a QString. To resolve this ambiguity we explicitly call the string()
1909         helper function on the AtomicString, which is equivalent to the
1910         operator WTF::String().
1911
1912 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1913
1914         Reviewed by Andreas Kling.
1915
1916         Fix the build without JSC.
1917
1918         Complement http://trac.webkit.org/changeset/59826 and
1919         add missing JSC guards.
1920
1921         * plugins/PluginView.cpp:
1922         (WebCore::PluginView::bindingInstance):
1923         (WebCore::PluginView::privateBrowsingStateChanged):
1924         * plugins/qt/PluginViewQt.cpp:
1925         (WebCore::PluginView::dispatchNPEvent):
1926         (WebCore::PluginView::setNPWindowIfNeeded):
1927         (WebCore::PluginView::platformStart):
1928
1929 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1930
1931         Reviewed by Andreas Kling.
1932
1933         Fix compilation with V8 and XPath enabled.
1934
1935         V8XPathNSResolver.cpp includes V8XPathNSResolver.h,
1936         which includes V8DOMWrapper.h as its first header.
1937         V8DOMWrapper.h then uses V8XPathNSResolver in an inline
1938         function, and gcc doesn't seem to like this, because
1939         at this point the type isn't known ("V8XPathNSResolver
1940         has not been declared"). Forward declaring the type
1941         doesn't help unfortunately: "incomplete type
1942         'WebCore::V8XPathNSResolver' used in nested name
1943         specifier".
1944
1945         To resolve this circular dependency, this patch moves
1946         the inline function into the .cpp file.
1947
1948         * bindings/v8/V8DOMWrapper.cpp:
1949         (WebCore::V8DOMWrapper::getXPathNSResolver):
1950         * bindings/v8/V8DOMWrapper.h:
1951
1952 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1953
1954         Reviewed by Andreas Kling.
1955
1956         [Qt][X11] Fix build with V8 against X11 headers.
1957
1958         Added "True" and "False" to the list of words
1959         we free from the X11 macro jail.
1960
1961         * bridge/npruntime_internal.h:
1962         * config.h: The V8 bindings end up indirectly pulling
1963         in X11 headers and they use True/False. There's no
1964         central header apart from this one, so include the
1965         x11 fixing header here for Qt/X11/V8.
1966         * plugins/qt/PluginViewQt.cpp:
1967         (WebCore::PluginView::paint): Use false instead of False
1968         since False isn't available anymore.
1969
1970 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1971
1972         Reviewed by Andreas Kling.
1973
1974         [Qt] Fix compilation with V8 and Qt.
1975
1976         Use WebKit's page cache for ScriptCachedFrameData.
1977
1978         * bindings/v8/ScriptCachedFrameData.h:
1979
1980 2010-09-12  Simon Hausmann  <simon.hausmann@nokia.com>
1981
1982         Reviewed by Andreas Kling.
1983
1984         Fix compiler warning.
1985
1986         NPClass has 13 members, the last one (NPConstructFunctionPtr construct) wasn't
1987         initialized explicitly.
1988
1989         * bindings/v8/NPV8Object.cpp:
1990
1991 2010-09-12  Mario Sanchez Prada  <msanchez@igalia.com>
1992
1993         Reviewed by Martin Robinson.
1994
1995         [Gtk] get_n_selections and get_selection fail when selecting text across object boundaries
1996         https://bugs.webkit.org/show_bug.cgi?id=26991
1997
1998         Fix AtkText getNSelections() and getSelection() to work properly
1999
2000         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2001         (selectionBelongsToObject): Check that both the selection intersects
2002         the node AND that the selection is not just "touching" one of the
2003         boundaries for the selected node. We want to check whether the
2004         node is actually inside the region, at least partially
2005         (getSelectionOffsetsForObject): New function to get the start and
2006         end offsets of a selection for a given accessible object.
2007         (webkit_accessible_text_get_selection): Return zero when both
2008         start and end offsets are equal, following the lead of GAIL.
2009
2010 2010-09-11  Adam Barth  <abarth@webkit.org>
2011
2012         Reviewed by Sam Weinig.
2013
2014         Make SecurityOrigin::canDisplay an instance function
2015         https://bugs.webkit.org/show_bug.cgi?id=45219
2016
2017         This function was secretly an instance function because callers needed
2018         to pass in a document (which owns a SecurityOrigin).  Only the
2019         FrameLoader actually needs the method to be static.
2020
2021         * WebCore.exp.in:
2022         * html/HTMLMediaElement.cpp:
2023         (WebCore::HTMLMediaElement::isSafeToLoadURL):
2024         * loader/Cache.cpp:
2025         (WebCore::Cache::requestResource):
2026             - Notice that DocLoader::doc() can never be 0.
2027         * loader/FrameLoader.cpp:
2028         (WebCore::FrameLoader::loadFrameRequest):
2029         * loader/PingLoader.cpp:
2030         (WebCore::PingLoader::loadImage):
2031         * loader/SubframeLoader.cpp:
2032         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
2033         (WebCore::SubframeLoader::createJavaAppletWidget):
2034         (WebCore::SubframeLoader::loadSubframe):
2035         (WebCore::SubframeLoader::loadPlugin):
2036         * loader/SubresourceLoader.cpp:
2037         (WebCore::SubresourceLoader::create):
2038         * page/SecurityOrigin.cpp:
2039         (WebCore::SecurityOrigin::canDisplay):
2040         (WebCore::SecurityOrigin::deprecatedCanDisplay):
2041         * page/SecurityOrigin.h:
2042         * plugins/PluginView.cpp:
2043         (WebCore::PluginView::load):
2044
2045 2010-09-11  Adam Barth  <abarth@webkit.org>
2046
2047         Reviewed by Sam Weinig.
2048
2049         Make SecurityOrigin::canDisplay an instance function
2050         https://bugs.webkit.org/show_bug.cgi?id=45219
2051
2052         This function was secretly an instance function because callers needed
2053         to pass in a document (which owns a SecurityOrigin).  Only the
2054         FrameLoader actually needs the method to be static.
2055
2056         * WebCore.exp.in:
2057         * html/HTMLMediaElement.cpp:
2058         (WebCore::HTMLMediaElement::isSafeToLoadURL):
2059         * loader/Cache.cpp:
2060         (WebCore::Cache::requestResource):
2061             - Notice that DocLoader::doc() can never be 0.
2062         * loader/FrameLoader.cpp:
2063         (WebCore::FrameLoader::loadFrameRequest):
2064         * loader/PingLoader.cpp:
2065         (WebCore::PingLoader::loadImage):
2066         * loader/SubframeLoader.cpp:
2067         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
2068         (WebCore::SubframeLoader::createJavaAppletWidget):
2069         (WebCore::SubframeLoader::loadSubframe):
2070         (WebCore::SubframeLoader::loadPlugin):
2071         * loader/SubresourceLoader.cpp:
2072         (WebCore::SubresourceLoader::create):
2073         * page/SecurityOrigin.cpp:
2074         (WebCore::SecurityOrigin::canDisplay):
2075         (WebCore::SecurityOrigin::deprecatedCanDisplay):
2076         * page/SecurityOrigin.h:
2077         * plugins/PluginView.cpp:
2078         (WebCore::PluginView::load):
2079
2080 2010-09-11  Simon Hausmann  <simon.hausmann@nokia.com>
2081
2082         Unreviewed.
2083
2084         [Qt] Trivial V8 build fix.
2085
2086         * WebCore.pri: Add storage, workers and css to the include paths for the
2087         JS code generator.
2088
2089 2010-09-11  Andreas Kling  <andreas.kling@nokia.com>
2090
2091         Reviewed by Simon Hausmann.
2092
2093         [Qt] V8 port: Fix "WTF::String::utf8" returns incomplete type WTF::CString
2094         https://bugs.webkit.org/show_bug.cgi?id=45157
2095
2096         Include CString.h where necessary. Chromium builds would get it from
2097         KURLGooglePrivate.h so this is only an issue for Qt + V8.
2098
2099         * bindings/v8/V8Proxy.cpp:
2100         * inspector/InspectorDebuggerAgent.cpp:
2101         * inspector/InspectorProfilerAgent.cpp:
2102         * plugins/PluginDatabase.cpp:
2103
2104 2010-09-11  Simon Hausmann  <simon.hausmann@nokia.com>
2105
2106         Reviewed by Andreas Kling.
2107
2108         [Qt] V8 port: webkit project files changes
2109         https://bugs.webkit.org/show_bug.cgi?id=45140
2110
2111         * WebCore.pro: Removed unecessary common.pri inclusion from earlier patch.
2112
2113 2010-09-03  Vlad Burlik  <volodimir.burlik@nokia.com>, Simon Hausmann  <simon.hausmann@nokia.com>
2114
2115         Reviewed by Andreas Kling.
2116
2117         [Qt] V8 port: webcore project files changes
2118         https://bugs.webkit.org/show_bug.cgi?id=45141
2119
2120         Modify webcore project files to include V8 javascript engine. By default disabled.
2121
2122         * WebCore.pri:
2123         * WebCore.pro:
2124         * features.pri:
2125
2126 2010-09-11  Andreas Kling  <andreas.kling@nokia.com>
2127
2128         Reviewed by Simon Hausmann.
2129
2130         Web Inspector: Include CString.h in generated files
2131
2132         This is necessary for generated code that uses the CString
2133         returned by String::utf8() (from generateBackendDispatcher)
2134
2135         Chromium builds already get CString.h from KURLGooglePrivate.h
2136         so this issue only occurs when building Qt against V8.
2137
2138         * inspector/CodeGeneratorInspector.pm:
2139
2140 2010-09-11  Adele Peterson  <adele@apple.com>
2141
2142         Reviewed by Sam Weinig.
2143
2144         Fix for https://bugs.webkit.org/show_bug.cgi?id=45587
2145         Move line clamp code to its own function.
2146
2147         * rendering/RenderFlexibleBox.cpp:
2148         (WebCore::RenderFlexibleBox::layoutVerticalBox):
2149         (WebCore::RenderFlexibleBox::applyLineClamp):
2150         * rendering/RenderFlexibleBox.h:
2151
2152 2010-09-11  Mihai Parparita  <mihaip@chromium.org>
2153
2154         Reviewed by Adam Barth.
2155
2156         URIs in styles created via innerHTML are not resolved against the document's base URI
2157         https://bugs.webkit.org/show_bug.cgi?id=45565
2158
2159         The dummy document used for fragment parsing created by 
2160         FragmentParsingContext should use the base URI of the fragment's
2161         document. Since (HTML)Document doesn't expose a setter for the base URI
2162         (and shouldn't), we allow it to be set by the constructor/create
2163         function.
2164         
2165         Also remove some obsolete code that references the legacy tree builder
2166         from HTMLElement that I happened to notice.
2167
2168         Test: fast/innerHTML/innerHTML-uri-resolution.html
2169
2170         * dom/Document.cpp:
2171         (WebCore::Document::Document):
2172         * dom/Document.h:
2173         * html/HTMLDocument.cpp:
2174         (WebCore::HTMLDocument::HTMLDocument):
2175         * html/HTMLDocument.h:
2176         (WebCore::HTMLDocument::create):
2177         * html/HTMLElement.cpp:
2178         (WebCore::createFragmentFromSource):
2179         (WebCore::HTMLElement::setInnerHTML):
2180         * html/parser/HTMLTreeBuilder.cpp:
2181         (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
2182
2183 2010-09-10  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2184
2185         Reviewed by Darin Adler.
2186
2187         Add NetworkingContext to avoid layer violations
2188         https://bugs.webkit.org/show_bug.cgi?id=42292
2189
2190         Activate NetworkingContext:
2191
2192         Since the ResourceHandle::create, ResourceHandle::start and
2193         ResourceHandle::loadResourceSynchronously API's were modified,
2194         having their Frame* parameter substituted by a NetworkingContext*,
2195         all implementations of them were also modified.
2196         This patch also modifies all functions that were calling the above
2197         ones.
2198
2199         * loader/FrameLoader.cpp:
2200         (WebCore::FrameLoader::loadResourceSynchronously):
2201         * loader/FrameLoader.h:
2202         * loader/MainResourceLoader.cpp:
2203         (WebCore::MainResourceLoader::loadNow):
2204         * loader/PingLoader.cpp:
2205         (WebCore::PingLoader::PingLoader):
2206         * loader/ResourceLoader.cpp:
2207         (WebCore::ResourceLoader::load):
2208         * loader/appcache/ApplicationCacheGroup.cpp:
2209         (WebCore::ApplicationCacheGroup::createResourceHandle):
2210         * loader/icon/IconFetcher.cpp:
2211         (WebCore::IconFetcher::loadEntry):
2212         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2213         (webKitWebSrcStart):
2214         * platform/network/ResourceHandle.cpp:
2215         (WebCore::ResourceHandle::create):
2216         * platform/network/ResourceHandle.h:
2217         * platform/network/ResourceHandleInternal.h:
2218         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2219         * platform/network/cf/ResourceHandleCFNet.cpp:
2220         (WebCore::ResourceHandle::start):
2221         (WebCore::ResourceHandle::loadResourceSynchronously):
2222         * platform/network/curl/ResourceHandleCurl.cpp:
2223         (WebCore::ResourceHandle::start):
2224         (WebCore::ResourceHandle::loadResourceSynchronously):
2225         * platform/network/mac/ResourceHandleMac.mm:
2226         (WebCore::ResourceHandle::start):
2227         (WebCore::ResourceHandle::loadResourceSynchronously):
2228         * platform/network/qt/QNetworkReplyHandler.cpp:
2229         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
2230         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2231         (WebCore::QNetworkReplyHandler::start):
2232         * platform/network/qt/ResourceHandleQt.cpp:
2233         (WebCore::ResourceHandle::start):
2234         (WebCore::ResourceHandle::willLoadFromCache):
2235         (WebCore::ResourceHandle::loadResourceSynchronously):
2236         * platform/network/soup/ResourceHandleSoup.cpp:
2237         * platform/network/win/ResourceHandleWin.cpp:
2238         (WebCore::ResourceHandle::start):
2239
2240 2010-09-10  Jer Noble  <jer.noble@apple.com>
2241
2242         No review; build fix only.
2243
2244         <CoreGraphics/CGAffineTransform.h> isn't on the build bots either.  Wrap
2245         all references to m_movieTransform in #if USE(ACCELERATED_COMPOSITING) guards.
2246         
2247         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2248         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext):
2249         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::naturalSize):
2250         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveAndResetMovieTransform):
2251         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
2252
2253 2010-09-10  Jer Noble  <jer.noble@apple.com>
2254
2255         No review; build fix only.
2256
2257         <CoreGraphics/CGFloat.h> does not exist on the build bots.  Replace
2258         instances of CGFAbs() with abs().
2259
2260         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2261         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::naturalSize):
2262
2263 2010-09-10  Dan Bernstein  <mitz@apple.com>
2264
2265         Reviewed by Darin Adler.
2266
2267         <rdar://problem/8414282> Can’t dynamically change first-letter to/from floating
2268
2269         Test: fast/dynamic/first-letter-display-change.html
2270
2271         * rendering/RenderBlock.cpp:
2272         (WebCore::styleForFirstLetter): Factored this helper function out.
2273         (WebCore::RenderBlock::updateFirstLetter): Renamed variables so that the
2274         “update style” and “create new” branches use the same terminology. In the
2275         update case, if the style change requires a new renderer, handle it.
2276         * rendering/RenderTextFragment.h:
2277         (WebCore::toRenderTextFragment): Added.
2278
2279 2010-09-10  Sam Weinig  <sam@webkit.org>
2280
2281         Reviewed by Darin Adler.
2282
2283         Remove unnecessary constraint in WebCore of choosing either text zoom or full page zoom.
2284         Precursor to <rdar://problem/7660657>
2285         https://bugs.webkit.org/show_bug.cgi?id=45522
2286
2287         * GNUmakefile.am:
2288         * WebCore.exp.in:
2289         * WebCore.gypi:
2290         * WebCore.pro:
2291         * WebCore.vcproj/WebCore.vcproj:
2292         * WebCore.xcodeproj/project.pbxproj:
2293         Remove ZoomMode.h
2294
2295         * css/CSSStyleSelector.cpp:
2296         (WebCore::CSSStyleSelector::applyProperty):
2297         (WebCore::CSSStyleSelector::getComputedSizeFromSpecifiedSize):
2298         Remove uses of shouldApplyTextZoom(), it had turned into just a compare to 1.0f.
2299
2300         * html/HTMLBodyElement.cpp:
2301         (WebCore::adjustForZoom):
2302         (WebCore::HTMLBodyElement::setScrollLeft):
2303         (WebCore::HTMLBodyElement::setScrollTop):
2304         Convert these to use the explicit pageZoomFactor() function, it made no sense for text zoom
2305         anyway.
2306
2307         * page/Frame.h:
2308         Remove include of ZoomMode.h
2309
2310         * page/FrameView.cpp:
2311         (WebCore::parentPageZoomFactor):
2312         (WebCore::parentTextZoomFactor):
2313         (WebCore::FrameView::FrameView):
2314         (WebCore::FrameView::setPageZoomFactor):
2315         (WebCore::FrameView::setTextZoomFactor):
2316         (WebCore::FrameView::setPageAndTextZoomFactors):
2317         * page/FrameView.h:
2318         (WebCore::FrameView::pageZoomFactor):
2319         (WebCore::FrameView::textZoomFactor):
2320         Change FrameView to store two values for zoom, one for page zoom and one for text zoom.
2321
2322         * page/Settings.cpp:
2323         (WebCore::Settings::Settings):
2324         * page/Settings.h:
2325         Removed zoom mode.
2326
2327         * page/ZoomMode.h: Removed.
2328
2329         * rendering/RenderView.cpp:
2330         (WebCore::RenderView::zoomFactor):
2331         Remove now unnecessary call to shouldApplyPageZoom since it will be 1 if it should
2332         be ignored.
2333
2334         * svg/SVGSVGElement.cpp:
2335         (WebCore::SVGSVGElement::setCurrentScale):
2336         Use explicit setPageZoomFactor function.
2337
2338 2010-09-10  Ryuan Choi  <ryuan.choi@samsung.com>
2339
2340         Unreviewed build fix for EFL.
2341
2342         [EFL] REGRESSION(67167) build break because of newly added JSBindingState.cpp
2343         https://bugs.webkit.org/show_bug.cgi?id=45537
2344
2345         * CMakeLists.txt:
2346
2347 2010-09-10  Darin Adler  <darin@apple.com>
2348
2349         Reviewed by Sam Weinig.
2350
2351         Move some Dashboard stuff from WebCore to WebKit along with a bit more FrameMac cleanup
2352         https://bugs.webkit.org/show_bug.cgi?id=45582
2353
2354         * WebCore.exp.in: Updated.
2355
2356         * WebCore.xcodeproj/project.pbxproj: Removed WebDashboardRegion.h/m.
2357         * page/mac/WebDashboardRegion.h: Removed.
2358         * page/mac/WebDashboardRegion.m: Removed.
2359
2360         * page/Frame.h: Removed unneeded #if. Removed dashboardRegionsDictionary function, now
2361         handled in WebKit. Removed searchForNSLabelsAboveCell function, which had become dead code.
2362         * page/mac/FrameMac.mm: Ditto. Also tweaked a place that said "int unsigned".
2363
2364 2010-09-10  Peter Kasting  <pkasting@google.com>
2365
2366         Reviewed by Darin Adler.
2367
2368         Make middle clicks not fire DOM onclick events.
2369         https://bugs.webkit.org/show_bug.cgi?id=22382
2370
2371         * html/HTMLAnchorElement.cpp: Explicitly include middle-clicks in the
2372         computation of what constitutes a link click, since they're no longer
2373         implicitly included.
2374         (WebCore::isLinkClick):
2375         * html/HTMLInputElement.cpp: Removed unneeded checks that click events
2376         are coming from the left mouse button, since they all are now.
2377         (WebCore::HTMLInputElement::preDispatchEventHandler):
2378         (WebCore::HTMLInputElement::postDispatchEventHandler):
2379         (WebCore::HTMLInputElement::defaultEventHandler):
2380         * page/EventHandler.cpp: Changed logic to send a click event only for
2381         the left button.
2382         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2383         (WebCore::EventHandler::handleMouseReleaseEvent):
2384
2385 2010-09-10  Adam Barth  <abarth@webkit.org>
2386
2387         Attempted build fix for Qt Minimal.
2388
2389         * dom/Element.cpp:
2390         (WebCore::Element::getBoundingClientRect):
2391
2392 2010-09-10  Dan Bernstein  <mitz@apple.com>
2393
2394         Reviewed by Anders Carlsson.
2395
2396         Pseudostyle resolution corrupts cached child index values
2397         https://bugs.webkit.org/show_bug.cgi?id=45574
2398
2399         Covered by fast/dom/firstline-fixed-crash.html and fast/dom/firstletter-tablecell-crash.html.
2400
2401         RenderBlock::updateFirstLetter() calls getCachedPseudoStyle() passing as the parent style the
2402         style of the parent of the first letter, which is not always the parent of the element for
2403         which we are getting :first-letter style. As a result, style resolution caches childIndex values
2404         in the wrong element’s style.
2405
2406         * css/CSSStyleSelector.cpp:
2407         (WebCore::CSSStyleSelector::pseudoStyleForElement): Create the new style and inherit from
2408         the parent style before matching rules, to avoid corrupting the parent style itself.
2409         (WebCore::CSSStyleSelector::checkSelector): Always pass the element’s parent style as
2410         the parent style here.
2411         * rendering/RenderBlock.cpp:
2412         (WebCore::RenderBlock::updateFirstLetter): Removed the null check that was added
2413         in r67183.
2414         * rendering/RenderBlockLineLayout.cpp:
2415         (WebCore::RenderBlock::findNextLineBreak): Removed the null check that was added
2416         in r67184.
2417
2418 2010-09-10  Jer Noble  <jer.noble@apple.com>
2419
2420         Reviewed by Simon Fraser.
2421
2422         Movies with track or movie matrices don't display in <video> elements (Safari 5/Windows)
2423         https://bugs.webkit.org/show_bug.cgi?id=45333
2424         rdar://problem/81333126
2425         
2426         QuickTime will refuse to decode video frames for movies whose movie and track matrices 
2427         are non-identity.  To work around this problem, extract the movie and track matrices 
2428         from the movie, and set that matrix on the video layer instead.
2429
2430         * WebCore.vcproj/QTMovieWin.vcproj:
2431         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2432         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayoutClient::LayoutClient): Added.
2433         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayoutClient::layoutSublayersOfLayer):
2434             Layout the video layer according to its superlayer's size.
2435         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext):
2436         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::platformLayer):
2437         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::naturalSize):
2438             Apply the m_movieTransform to the size reported by QTMovie.
2439         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::retrieveAndResetMovieTransform):
2440             Calculate m_movieTransform and reset the movie and track matrices in the movie.
2441         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::createLayerForMovie):
2442             Create two nested layers instead of one.
2443         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::destroyLayerForMovie):
2444             Make sure to remove m_qtVideoLayer from any superlayer before dereferencing it.
2445         * platform/graphics/win/QTMovie.cpp:
2446         (QTMovie::videoTracks): Added.
2447         (QTMovie::getTransform): Added.
2448         (QTMovie::setTransform): Added.
2449         (QTMovie::resetTransform): Added.
2450         * platform/graphics/win/QTMovie.h:
2451         * platform/graphics/win/QTTrack.cpp: Added.
2452         * platform/graphics/win/QTTrack.h: Added.
2453         * platform/graphics/win/WKCACFLayer.cpp:
2454         (WebCore::WKCACFLayer::setBounds): Call setNeedsLayout() if a layoutClient is present.
2455         (WebCore::WKCACFLayer::setFrame): Call setNeedsLayout() if a layoutClient is present.
2456
2457 2010-09-10  Jer Noble  <jer.noble@apple.com>
2458
2459         No review; build fix only.
2460
2461         Touch mediaControlsQuickTime in order to trigger the UserAgentStyleSheet.h to be rebuilt.
2462
2463         * css/mediaControlsQuickTime.css:
2464         (audio::-webkit-media-controls-volume-slider-mute-button, video::-webkit-media-controls-volume-slider-mute-button):
2465
2466 2010-09-10  Adam Barth  <abarth@webkit.org>
2467
2468         Reviewed by Darin Fisher.
2469
2470         Move code from WebKit-layer to DocumentLoader
2471         https://bugs.webkit.org/show_bug.cgi?id=45569
2472
2473         There's a bunch of code that's copy/pasted (poorly) across all the
2474         ports that really belongs in WebCore.  This patch moves that logic into
2475         DocumentLoader.  This patch is a step on the path to having
2476         DocumentLoader own DocumentWriter.
2477
2478         * WebCore.exp.in:
2479         * loader/DocumentLoader.cpp:
2480         (WebCore::DocumentLoader::commitData):
2481         * loader/DocumentLoader.h:
2482         * loader/FrameLoader.cpp:
2483         (WebCore::FrameLoader::finishedLoadingDocument):
2484
2485 2010-09-10  Cosmin Truta  <ctruta@chromium.org>
2486
2487         Reviewed by Nikolas Zimmermann.
2488
2489         getBoundingClientRect Broken for SVG Elements
2490         https://bugs.webkit.org/show_bug.cgi?id=42815
2491
2492         Use getBBox to retrieve the bounding rectangle for SVG elements.
2493
2494         Test: svg/dom/getBoundingClientRect.xhtml
2495
2496         * dom/Element.cpp:
2497         (Element::getBoundingClientRect):
2498
2499 2010-09-09  Jer Noble  <jer.noble@apple.com>
2500
2501         Reviewed by Eric Carlson.
2502
2503         Adopt shared control drawing for <video> controls on Windows
2504         https://bugs.webkit.org/show_bug.cgi?id=45490
2505         
2506         * DerivedSources.make: Remove the OS check around mediaControlsQuickTime.css.
2507         * rendering/RenderMediaControls.cpp:
2508         (WebCore::determineState): Use WKMediaControllerThemeState flags instead of SafariTheme ones.
2509         (WebCore::getUnzoomedRectAndAdjustCurrentContext): Added. Copied verbatim from RenderMediaMac.mm.
2510         (WebCore::RenderMediaControls::adjustMediaSliderThumbSize): Use wkMeasureMediaUIPart to adjust the thumb size.
2511         (WebCore::RenderMediaControls::paintMediaControlsPart): Use wkDrawMediaUIPart instead of paintThemePart.
2512         (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton): Added. Copied verbatim from RenderMediaMac.mm.
2513         * rendering/RenderMediaControls.h:
2514         * rendering/RenderThemeWin.cpp:
2515         (WebCore::RenderThemeWin::adjustSliderThumbSize): Adjust both sliders and volume sliders.
2516         (WebCore::RenderThemeWin::extraMediaControlsStyleSheet): Added. Returns the mediaControlsQuickTime sheet.
2517         (WebCore::RenderThemeWin::paintMediaRewindButton): Added. Pass through to RenderMediaControls.
2518         (WebCore::RenderThemeWin::paintMediaControlsBackground): Added. Pass through to RenderMediaControls.
2519         (WebCore::RenderThemeWin::paintMediaVolumeSliderContainer): Added. Pass through to RenderMediaControls.
2520         (WebCore::RenderThemeWin::paintMediaVolumeSliderTrack): Added. Pass through to RenderMediaControls.
2521         (WebCore::RenderThemeWin::paintMediaVolumeSliderThumb): Added.  Pass through to RenderMediaControls.
2522         (WebCore::RenderThemeWin::volumeSliderOffsetFromMuteButton): Added. Pass through to RenderMediaControls.
2523         * rendering/RenderThemeWin.h:
2524
2525 2010-09-10  Peter Kasting  <pkasting@google.com>
2526
2527         Reviewed by Darin Adler.
2528
2529         Cleanup and simplification in advance of making middle clicks not send a
2530         click event.
2531         https://bugs.webkit.org/show_bug.cgi?id=22382
2532
2533         * editing/DeleteButton.cpp:
2534         (WebCore::DeleteButton::defaultEventHandler): Removed unneeded code to
2535         check if the event is a MouseEvent. Any click event will do.
2536         * html/HTMLAnchorElement.cpp:
2537         (WebCore::appendServerMapMousePosition): Added. Factors out the
2538         modifications to the URL to add the mouse position to make the default
2539         event handler function easier to read.
2540         (WebCore::HTMLAnchorElement::defaultEventHandler): Reorganized to make
2541         the enter key logic separate from the link clicking logic and simplify
2542         the function.  This makes minor functional changes like not calling
2543         FrameLoader::urlSelected() for fake "keydown" events constructed from
2544         JavaScript.
2545         (WebCore::HTMLAnchorElement::isLiveLink): Refactored to use new shared
2546         implementation in treatLinkAsLiveForEventType().
2547         (WebCore::eventType): Factors out event type calculation (for
2548         treatLinkAsLiveForEventType()) from the default event handler to make it
2549         easier to read.
2550         (WebCore::HTMLAnchorElement::treatLinkAsLiveForEventType):
2551         Implementation of the portions of isLiveLink() that are common with the
2552         checks defaultEventHandler() wants to do.
2553         (WebCore::isEnterKeyKeydownEvent): Added. Shared by the default
2554         event handlers for all three anchor elements.
2555         (WebCore::isMiddleMouseButtonEvent): Added. Shared by the isLinkClick
2556         function below and some code in SVG. Later we can make this private to
2557         this source file once we remove the unneeded SVG code.
2558         (WebCore::isLinkClick): Added. Shared by the default event handlers for
2559         all three anchor elements.
2560         (WebCore::handleLinkClick): Ditto.
2561         * html/HTMLAnchorElement.h: Added the new functions.
2562         * svg/SVGAElement.cpp:
2563         (WebCore::SVGAElement::defaultEventHandler): Removed lots of unneeded
2564         logic and streamlined the code to more closely match the
2565         HTMLAnchorElement code and share functions with it.
2566         * wml/WMLAElement.cpp:
2567         (WebCore::WMLAElement::defaultEventHandler): Ditto.
2568
2569 2010-09-10  Tony Gentilcore  <tonyg@chromium.org>
2570
2571         Reviewed by Eric Seidel.
2572
2573         Implement HTML5 definition of script for-event neutering
2574         https://bugs.webkit.org/show_bug.cgi?id=45493
2575
2576         * dom/ScriptElement.cpp:
2577         (WebCore::ScriptElementData::shouldExecuteAsJavaScript): Same behavior, but reads more like the spec. Removed obsolete comments about supporting for-event.
2578         * html/parser/HTMLScriptRunner.cpp:
2579         (WebCore::HTMLScriptRunner::executeScript): Moved to runScript.
2580         (WebCore::HTMLScriptRunner::runScript): Checking shouldExecuteAsJavaScript() here means that external scripts which fail the check will never be requested.
2581
2582 2010-09-10  Nat Duca  <nduca@chromium.org>
2583
2584         Reviewed by Darin Fisher.
2585
2586         [chromium] Accelerated Compositing: screen garbage when scrolling
2587         https://bugs.webkit.org/show_bug.cgi?id=45092
2588
2589         Split LayerRenderChromium::drawLayers into several different
2590         functions, responsible for preparing the backbuffer, updating the
2591         root texture, compositing and performing the final
2592         swapbuffers. This are then used by the new
2593         WebViewImpl::composite rendering path.
2594
2595         * platform/graphics/chromium/LayerChromium.cpp:
2596         (WebCore::LayerChromium::setBounds):
2597         (WebCore::LayerChromium::setFrame):
2598         (WebCore::LayerChromium::setNeedsDisplay):
2599         (WebCore::LayerChromium::resetNeedsDisplay):
2600         * platform/graphics/chromium/LayerChromium.h:
2601         (WebCore::LayerChromium::dirtyRect):
2602         * platform/graphics/chromium/LayerRendererChromium.cpp:
2603         (WebCore::LayerRendererChromium::prepareToDrawLayers):
2604         (WebCore::LayerRendererChromium::updateRootLayerTextureRect):
2605         (WebCore::LayerRendererChromium::drawLayers):
2606         (WebCore::LayerRendererChromium::present):
2607         * platform/graphics/chromium/LayerRendererChromium.h:
2608
2609 2010-09-10  David Holloway  <dhollowa@chromium.org>
2610
2611         Reviewed by Adam Barth.
2612
2613         Replace WebCore::HTMLFormElement::submissionTrigger with WebCore::HTMLFormElement::submittedByUserGesture.
2614         Chromium AutoFill feature semantics changed with respect to what we mean by "user submitted" form.  A
2615         more accurate measure of the user manually submitting a form is via user gesture.
2616         https://bugs.webkit.org/show_bug.cgi?id=45128
2617
2618         No new tests as this is only used by the Chromium WebKit API.
2619
2620         * html/HTMLFormElement.cpp:
2621         (WebCore::HTMLFormElement::HTMLFormElement):
2622         (WebCore::HTMLFormElement::prepareSubmit):
2623         (WebCore::HTMLFormElement::submit):
2624         (WebCore::HTMLFormElement::submittedByUserGesture):
2625         * html/HTMLFormElement.h:
2626
2627 2010-09-10  Adam Barth  <abarth@webkit.org>
2628
2629         Reviewed by Eric Seidel.
2630
2631         Remove mention of "part" from Document.cpp
2632         https://bugs.webkit.org/show_bug.cgi?id=45566
2633
2634         This is an old KHTML name that's lingering around.
2635
2636         * dom/Document.cpp:
2637         (WebCore::Document::parentDocument):
2638
2639 2010-09-09  Darin Adler  <darin@apple.com>
2640
2641         Reviewed by Adam Barth.
2642
2643         Move functions from Frame to SelectionController as planned
2644         https://bugs.webkit.org/show_bug.cgi?id=45508
2645
2646         Also removed Frame::dragCaretController since it just called Page::dragCaretController.
2647
2648         * editing/SelectionController.cpp:
2649         (WebCore::SelectionController::setSelection):
2650         (WebCore::SelectionController::modify):
2651         (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
2652         (WebCore::SelectionController::selectAll):
2653         (WebCore::SelectionController::focusedOrActiveStateChanged):
2654         (WebCore::SelectionController::notifyRendererOfSelectionChange):
2655         (WebCore::isFrameElement):
2656         (WebCore::SelectionController::setFocusedNodeIfNeeded):
2657         (WebCore::SelectionController::paintDragCaret):
2658         (WebCore::SelectionController::shouldDeleteSelection):
2659         (WebCore::SelectionController::selectionBounds):
2660         (WebCore::SelectionController::selectionTextRects):
2661         (WebCore::scanForForm):
2662         (WebCore::SelectionController::currentForm):
2663         (WebCore::SelectionController::revealSelection):
2664         (WebCore::SelectionController::setSelectionFromNone):
2665         (WebCore::SelectionController::shouldChangeSelection):
2666         * editing/SelectionController.h:
2667         Moved functions here from Frame.
2668
2669         * page/Frame.cpp:
2670         * page/Frame.h:
2671         Moved functions to SelectionController.
2672         Reorganized header to be easier to read and a bit more logical.
2673
2674         * WebCore.exp.in: Updated.
2675
2676         * dom/Document.cpp:
2677         (WebCore::Document::nodeChildrenWillBeRemoved):
2678         (WebCore::Document::nodeWillBeRemoved):
2679         Call Page::dragCaretController directly.
2680
2681         * dom/Element.cpp:
2682         (WebCore::Element::updateFocusAppearance):
2683         * dom/InputElement.cpp:
2684         (WebCore::InputElement::updateFocusAppearance):
2685         * editing/ApplyStyleCommand.cpp:
2686         (WebCore::ApplyStyleCommand::editingStyleAtPosition):
2687         * editing/DeleteSelectionCommand.cpp:
2688         (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
2689         * editing/Editor.cpp:
2690         (WebCore::Editor::canSmartCopyOrDelete):
2691         (WebCore::Editor::textDirectionForSelection):
2692         (WebCore::Editor::appliedEditing):
2693         (WebCore::Editor::insertTextWithoutSendingTextEvent):
2694         (WebCore::Editor::advanceToNextMisspelling):
2695         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
2696         (WebCore::Editor::revealSelectionAfterEditingOperation):
2697         (WebCore::Editor::transpose):
2698         (WebCore::Editor::changeSelectionAfterCommand):
2699         (WebCore::Editor::computeAndSetTypingStyle):
2700         (WebCore::Editor::selectionComputedStyle):
2701         (WebCore::Editor::styleForSelectionStart):
2702         (WebCore::Editor::findString):
2703         * editing/EditorCommand.cpp:
2704         (WebCore::executeDelete):
2705         * editing/InsertLineBreakCommand.cpp:
2706         (WebCore::InsertLineBreakCommand::doApply):
2707         * editing/InsertTextCommand.cpp:
2708         (WebCore::InsertTextCommand::input):
2709         * editing/RemoveFormatCommand.cpp:
2710         (WebCore::RemoveFormatCommand::doApply):
2711         * editing/ReplaceSelectionCommand.cpp:
2712         (WebCore::ReplaceSelectionCommand::doApply):
2713         * editing/TypingCommand.cpp:
2714         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
2715         (WebCore::TypingCommand::deleteKeyPressed):
2716         (WebCore::TypingCommand::forwardDeleteKeyPressed):
2717         * html/HTMLTextAreaElement.cpp:
2718         (WebCore::HTMLTextAreaElement::updateFocusAppearance):
2719         * page/ContextMenuController.cpp:
2720         (WebCore::ContextMenuController::contextMenuItemSelected):
2721         * page/DragController.cpp:
2722         (WebCore::DragController::concludeEditDrag):
2723         (WebCore::dragLocForSelectionDrag):
2724         * page/EventHandler.cpp:
2725         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
2726         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
2727         (WebCore::EventHandler::handleMousePressEventTripleClick):
2728         (WebCore::EventHandler::handleMousePressEventSingleClick):
2729         (WebCore::EventHandler::updateSelectionForMouseDrag):
2730         (WebCore::EventHandler::handleMouseReleaseEvent):
2731         * page/FocusController.cpp:
2732         (WebCore::FocusController::advanceFocusInDocumentOrder):
2733         * page/chromium/EventHandlerChromium.cpp:
2734         (WebCore::EventHandler::passMousePressEventToSubframe):
2735         * page/chromium/FrameChromium.cpp:
2736         (WebCore::Frame::dragImageForSelection):
2737         * page/mac/FrameMac.mm:
2738         (WebCore::Frame::selectionImage):
2739         * platform/mac/ClipboardMac.mm:
2740         (WebCore::ClipboardMac::writeRange):
2741         * rendering/RenderBlock.cpp:
2742         (WebCore::RenderBlock::paintCaret):
2743         Call functions on selection().
2744
2745 2010-09-10  Justin Schuh  <jschuh@chromium.org>
2746
2747         Reviewed by Darin Adler.
2748
2749         SVGGElement::rendererIsNeeded should return false when parent isn't SVG
2750         https://bugs.webkit.org/show_bug.cgi?id=45562
2751
2752         Test: svg/custom/g-outside-svg.html
2753
2754         * svg/SVGGElement.cpp:
2755         (WebCore::SVGGElement::rendererIsNeeded):
2756         * svg/SVGGElement.h:
2757
2758 2010-09-10  Adam Barth  <abarth@webkit.org>
2759
2760         Reviewed by Darin Adler.
2761
2762         REGRESSION (HTML Parser): CNN's Money site is not formatted correctly with AdBlock installed
2763         https://bugs.webkit.org/show_bug.cgi?id=41371
2764
2765         Drop support for closing comments with "-- >".  This was an attempt to
2766         be more IE-like in comment parsing, but it turns out to cause problems
2767         for some high-profile sites.  Firefox 4 is dropping support as well.
2768         We expect the spec to change soon too.
2769
2770         * html/parser/HTMLTokenizer.cpp:
2771         (WebCore::HTMLTokenizer::nextToken):
2772         * html/parser/HTMLTokenizer.h:
2773
2774 2010-09-10  Chris Marrin  <cmarrin@apple.com>
2775
2776         Unreviewed.
2777
2778         Adding file that should have been in http://trac.webkit.org/changeset/67226 but 
2779         I forgot to svn add.
2780         
2781         * platform/graphics/opengl: Added.
2782         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Copied from platform/graphics/mac/GraphicsContext3DMac.mm.
2783
2784 2010-09-10  Paul Sawaya  <psawaya@apple.com>
2785
2786         Reviewed by Chris Marrin.
2787
2788         Refactored non-Mac specific code into GraphicsContext3DOpenGL.
2789         
2790         Moving this file into platform/graphics/opengl and only building on Mac for now.
2791         
2792         https://bugs.webkit.org/show_bug.cgi?id=30625
2793
2794         * WebCore.xcodeproj/project.pbxproj:
2795         * platform/graphics/mac/GraphicsContext3DMac.mm:
2796         (WebCore::GraphicsContext3D::makeContextCurrent):
2797         (WebCore::GraphicsContext3D::isErrorGeneratedOnOutOfBoundsAccesses):
2798         * platform/graphics/opengl: Added.
2799         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: Copied from platform/graphics/mac/GraphicsContext3DMac.mm.
2800         (WebCore::GraphicsContext3D::prepareTexture):
2801         (WebCore::GraphicsContext3D::activeTexture):
2802         (WebCore::GraphicsContext3D::attachShader):
2803         (WebCore::GraphicsContext3D::bindAttribLocation):
2804         (WebCore::GraphicsContext3D::bindBuffer):
2805         (WebCore::GraphicsContext3D::bindFramebuffer):
2806         (WebCore::GraphicsContext3D::bindRenderbuffer):
2807         (WebCore::GraphicsContext3D::bindTexture):
2808         (WebCore::GraphicsContext3D::blendColor):
2809         (WebCore::GraphicsContext3D::blendEquation):
2810         (WebCore::GraphicsContext3D::blendEquationSeparate):
2811         (WebCore::GraphicsContext3D::blendFunc):
2812         (WebCore::GraphicsContext3D::blendFuncSeparate):
2813         (WebCore::GraphicsContext3D::bufferData):
2814         (WebCore::GraphicsContext3D::bufferSubData):
2815         (WebCore::GraphicsContext3D::checkFramebufferStatus):
2816         (WebCore::GraphicsContext3D::clearColor):
2817         (WebCore::GraphicsContext3D::clear):
2818         (WebCore::GraphicsContext3D::clearDepth):
2819         (WebCore::GraphicsContext3D::clearStencil):
2820         (WebCore::GraphicsContext3D::colorMask):
2821         (WebCore::GraphicsContext3D::compileShader):
2822         (WebCore::GraphicsContext3D::copyTexImage2D):
2823         (WebCore::GraphicsContext3D::copyTexSubImage2D):
2824         (WebCore::GraphicsContext3D::cullFace):
2825         (WebCore::GraphicsContext3D::depthFunc):
2826         (WebCore::GraphicsContext3D::depthMask):
2827         (WebCore::GraphicsContext3D::depthRange):
2828         (WebCore::GraphicsContext3D::detachShader):
2829         (WebCore::GraphicsContext3D::disable):
2830         (WebCore::GraphicsContext3D::disableVertexAttribArray):
2831         (WebCore::GraphicsContext3D::drawArrays):
2832         (WebCore::GraphicsContext3D::drawElements):
2833         (WebCore::GraphicsContext3D::enable):
2834         (WebCore::GraphicsContext3D::enableVertexAttribArray):
2835         (WebCore::GraphicsContext3D::finish):
2836         (WebCore::GraphicsContext3D::flush):
2837         (WebCore::GraphicsContext3D::framebufferRenderbuffer):
2838         (WebCore::GraphicsContext3D::framebufferTexture2D):
2839         (WebCore::GraphicsContext3D::frontFace):
2840         (WebCore::GraphicsContext3D::generateMipmap):
2841         (WebCore::GraphicsContext3D::getActiveAttrib):
2842         (WebCore::GraphicsContext3D::getActiveUniform):
2843         (WebCore::GraphicsContext3D::getAttachedShaders):
2844         (WebCore::GraphicsContext3D::getAttribLocation):
2845         (WebCore::GraphicsContext3D::getError):
2846         (WebCore::GraphicsContext3D::getString):
2847         (WebCore::GraphicsContext3D::hint):
2848         (WebCore::GraphicsContext3D::isBuffer):
2849         (WebCore::GraphicsContext3D::isEnabled):
2850         (WebCore::GraphicsContext3D::isFramebuffer):
2851         (WebCore::GraphicsContext3D::isProgram):
2852         (WebCore::GraphicsContext3D::isRenderbuffer):
2853         (WebCore::GraphicsContext3D::isShader):
2854         (WebCore::GraphicsContext3D::isTexture):
2855         (WebCore::GraphicsContext3D::lineWidth):
2856         (WebCore::GraphicsContext3D::linkProgram):
2857         (WebCore::GraphicsContext3D::pixelStorei):
2858         (WebCore::GraphicsContext3D::polygonOffset):
2859         (WebCore::GraphicsContext3D::readPixels):
2860         (WebCore::GraphicsContext3D::releaseShaderCompiler):
2861         (WebCore::GraphicsContext3D::renderbufferStorage):
2862         (WebCore::GraphicsContext3D::sampleCoverage):
2863         (WebCore::GraphicsContext3D::scissor):
2864         (WebCore::GraphicsContext3D::shaderSource):
2865         (WebCore::GraphicsContext3D::stencilFunc):
2866         (WebCore::GraphicsContext3D::stencilFuncSeparate):
2867         (WebCore::GraphicsContext3D::stencilMask):
2868         (WebCore::GraphicsContext3D::stencilMaskSeparate):
2869         (WebCore::GraphicsContext3D::stencilOp):
2870         (WebCore::GraphicsContext3D::stencilOpSeparate):
2871         (WebCore::GraphicsContext3D::texParameterf):
2872         (WebCore::GraphicsContext3D::texParameteri):
2873         (WebCore::GraphicsContext3D::uniform1f):
2874         (WebCore::GraphicsContext3D::uniform1fv):
2875         (WebCore::GraphicsContext3D::uniform2f):
2876         (WebCore::GraphicsContext3D::uniform2fv):
2877         (WebCore::GraphicsContext3D::uniform3f):
2878         (WebCore::GraphicsContext3D::uniform3fv):
2879         (WebCore::GraphicsContext3D::uniform4f):
2880         (WebCore::GraphicsContext3D::uniform4fv):
2881         (WebCore::GraphicsContext3D::uniform1i):
2882         (WebCore::GraphicsContext3D::uniform1iv):
2883         (WebCore::GraphicsContext3D::uniform2i):
2884         (WebCore::GraphicsContext3D::uniform2iv):
2885         (WebCore::GraphicsContext3D::uniform3i):
2886         (WebCore::GraphicsContext3D::uniform3iv):
2887         (WebCore::GraphicsContext3D::uniform4i):
2888         (WebCore::GraphicsContext3D::uniform4iv):
2889         (WebCore::GraphicsContext3D::uniformMatrix2fv):
2890         (WebCore::GraphicsContext3D::uniformMatrix3fv):
2891         (WebCore::GraphicsContext3D::uniformMatrix4fv):
2892         (WebCore::GraphicsContext3D::useProgram):
2893         (WebCore::GraphicsContext3D::validateProgram):
2894         (WebCore::GraphicsContext3D::vertexAttrib1f):
2895         (WebCore::GraphicsContext3D::vertexAttrib1fv):
2896         (WebCore::GraphicsContext3D::vertexAttrib2f):
2897         (WebCore::GraphicsContext3D::vertexAttrib2fv):
2898         (WebCore::GraphicsContext3D::vertexAttrib3f):
2899         (WebCore::GraphicsContext3D::vertexAttrib3fv):
2900         (WebCore::GraphicsContext3D::vertexAttrib4f):
2901         (WebCore::GraphicsContext3D::vertexAttrib4fv):
2902         (WebCore::GraphicsContext3D::vertexAttribPointer):
2903         (WebCore::GraphicsContext3D::viewport):
2904         (WebCore::GraphicsContext3D::getBooleanv):
2905         (WebCore::GraphicsContext3D::getBufferParameteriv):
2906         (WebCore::GraphicsContext3D::getFloatv):
2907         (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
2908         (WebCore::GraphicsContext3D::getIntegerv):
2909         (WebCore::GraphicsContext3D::getProgramiv):
2910         (WebCore::GraphicsContext3D::getProgramInfoLog):
2911         (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
2912         (WebCore::GraphicsContext3D::getShaderiv):
2913         (WebCore::GraphicsContext3D::getShaderInfoLog):
2914         (WebCore::GraphicsContext3D::getShaderSource):
2915         (WebCore::GraphicsContext3D::getTexParameterfv):
2916         (WebCore::GraphicsContext3D::getTexParameteriv):
2917         (WebCore::GraphicsContext3D::getUniformfv):
2918         (WebCore::GraphicsContext3D::getUniformiv):
2919         (WebCore::GraphicsContext3D::getUniformLocation):
2920         (WebCore::GraphicsContext3D::getVertexAttribfv):
2921         (WebCore::GraphicsContext3D::getVertexAttribiv):
2922         (WebCore::GraphicsContext3D::getVertexAttribOffset):
2923         (WebCore::GraphicsContext3D::texImage2D):
2924         (WebCore::GraphicsContext3D::texSubImage2D):
2925         (WebCore::GraphicsContext3D::createBuffer):
2926         (WebCore::GraphicsContext3D::createFramebuffer):
2927         (WebCore::GraphicsContext3D::createProgram):
2928         (WebCore::GraphicsContext3D::createRenderbuffer):
2929         (WebCore::GraphicsContext3D::createShader):
2930         (WebCore::GraphicsContext3D::createTexture):
2931         (WebCore::GraphicsContext3D::deleteBuffer):
2932         (WebCore::GraphicsContext3D::deleteFramebuffer):
2933         (WebCore::GraphicsContext3D::deleteProgram):
2934         (WebCore::GraphicsContext3D::deleteRenderbuffer):
2935         (WebCore::GraphicsContext3D::deleteShader):
2936         (WebCore::GraphicsContext3D::deleteTexture):
2937
2938 2010-09-10  Oliver Hunt  <oliver@apple.com>
2939
2940         Qt build fix.
2941
2942         * bindings/js/SerializedScriptValue.cpp:
2943         (WebCore::CloneDeserializer::deserialize):
2944
2945 2010-09-10  Adam Barth  <abarth@webkit.org>
2946
2947         Reviewed by Darin Adler.
2948
2949         Remove useless FrameLoader method
2950         https://bugs.webkit.org/show_bug.cgi?id=45492
2951
2952         This method has one caller, and that caller already has a more direct
2953         way of accessing the correct DocumentLoader.
2954
2955         * loader/FrameLoader.cpp:
2956         * loader/FrameLoader.h:
2957         * loader/MainResourceLoader.cpp:
2958         (WebCore::MainResourceLoader::addData):
2959
2960 2010-09-10  Adam Barth  <abarth@webkit.org>
2961
2962         Reviewed by Eric Seidel.
2963
2964         Main resource bytes shouldn't bounce through FrameLoader
2965         https://bugs.webkit.org/show_bug.cgi?id=45496
2966
2967         After the MainResourceLoader hands the bytes for the main resource to
2968         the DocumentLoader, the DocumentLoader hands the bytes to the
2969         FrameLoaderClient.  The FrameLoaderClient, in turn, returns the bytes
2970         to WebCore.  Prior to this patch, the FrameLoaderClient returned the
2971         bytes to the FrameLoader.  However, the FrameLoader was actually adding
2972         any value.
2973
2974         In this patch, we change the FrameLoaderClient to return the bytes to
2975         the DocumentLoader directly.  In a future patch, we'll cut out the
2976         FrameLoaderClient middleman and handle the bytes internally in the
2977         DocumentLoader.
2978
2979         * WebCore.exp.in:
2980         * loader/DocumentLoader.cpp:
2981         (WebCore::DocumentLoader::addData):
2982         * loader/DocumentLoader.h:
2983         * loader/FrameLoader.cpp:
2984         (WebCore::FrameLoader::finishedLoadingDocument):
2985         * loader/FrameLoader.h:
2986
2987 2010-09-10  Oliver Hunt  <oliver@apple.com>
2988
2989         Reviewed by Darin Adler.
2990
2991         Speed up deserialisation of strings
2992         https://bugs.webkit.org/show_bug.cgi?id=45555
2993
2994         Rather than building a list of Identifiers for the string pool
2995         we now build a list of a tuple of UString and JSString*.  This
2996         doesn't hurt the property name case as ustring->identifier conversion
2997         is essentially free if the ustring has already been converted to
2998         an Identifier, but saves an unnecessary Identifier creation for
2999         strings we only ever use to create JSStrings.  We also reduce
3000         GC pressure for duplicate strings by caching the JSStrings.
3001
3002         * bindings/js/SerializedScriptValue.cpp:
3003         (WebCore::CloneDeserializer::CachedString::CachedString):
3004         (WebCore::CloneDeserializer::CachedString::jsString):
3005         (WebCore::CloneDeserializer::CachedString::ustring):
3006         (WebCore::CloneDeserializer::readStringData):
3007         (WebCore::CloneDeserializer::putProperty):
3008         (WebCore::CloneDeserializer::readFile):
3009         (WebCore::CloneDeserializer::readTerminal):
3010         (WebCore::CloneDeserializer::deserialize):
3011
3012 2010-09-10  Ryosuke Niwa  <rniwa@webkit.org>
3013
3014         Reviewed by Antonio Gomes.
3015
3016         REGRESSION(r67176): editing/selection/doubleclick-inline-first-last-contenteditable.html crashes
3017         https://bugs.webkit.org/show_bug.cgi?id=45525
3018
3019         The crash was caused by ancestorToRetainStructureAndAppearance not taking into consideration
3020         the case where there is no common block ancestor. Fixed this by adding a null check.
3021
3022         Test: editing/pasteboard/copy-without-common-block-crash.html
3023
3024         * editing/markup.cpp:
3025         (WebCore::ancestorToRetainStructureAndAppearance): Added a null check.
3026
3027 2010-09-09  Kinuko Yasuda  <kinuko@chromium.org>
3028
3029         Reviewed by Dumitru Daniliuc.
3030
3031         [FileSystem] Do not call EntriesCallback more than once if there're no entries.
3032         https://bugs.webkit.org/show_bug.cgi?id=45498
3033
3034         No new tests, layout-tests that confirm the behavior will be added in later patches.
3035
3036         * fileapi/FileSystemCallbacks.cpp:
3037         (WebCore::EntriesCallbacks::EntriesCallbacks):
3038         (WebCore::EntriesCallbacks::didReadDirectoryEntry):
3039         (WebCore::EntriesCallbacks::didReadDirectoryEntries):
3040
3041 2010-09-10  Patrick Gansterer  <paroga@paroga.com>
3042
3043         Reviewed by Darin Adler.
3044
3045         Use String::fromUTF8 instead of UTF8Encoding().decode
3046         in the libxml XMLDocumentParser
3047         https://bugs.webkit.org/show_bug.cgi?id=45488
3048
3049         * dom/XMLDocumentParserLibxml2.cpp:
3050         (WebCore::toString):
3051
3052 2010-09-10  Chris Fleizach  <cfleizach@apple.com>
3053
3054         Reviewed by David Kilzer.
3055
3056         AX: accessibility not returning strings when visibility is hidden
3057         https://bugs.webkit.org/show_bug.cgi?id=45116
3058
3059         AX code uses plainText() in TextIterator to get the text for a node.
3060         However, when that node is not visible, no text is returned because TextIterator ignores
3061         clipped nodes and other hidden elements.
3062
3063         Solution is to add a new text iterator behavior for ignoring style visiblity. This allows
3064         for text to allows be returned for accessibility purposes.
3065
3066         Test: platform/mac/accessibility/clipped-text-under-element.html
3067
3068         * WebCore.exp.in:
3069         * accessibility/AccessibilityRenderObject.cpp:
3070         (WebCore::AccessibilityRenderObject::textUnderElement):
3071         (WebCore::AccessibilityRenderObject::stringValue):
3072            Use the new flag for plainText
3073         * editing/TextIterator.cpp:
3074         (WebCore::TextIterator::TextIterator):
3075         (WebCore::TextIterator::handleTextNode):
3076         (WebCore::TextIterator::handleTextBox):
3077         (WebCore::TextIterator::handleTextNodeFirstLetter):
3078         (WebCore::TextIterator::handleReplacedElement):
3079            Use the new flag to NOT skip hidden elements.
3080         (WebCore::plainTextToMallocAllocatedBuffer):
3081         (WebCore::plainText):
3082         * editing/TextIterator.h:
3083            Add the new text iterator behavior.
3084
3085 2010-09-10  Chris Fleizach  <cfleizach@apple.com>
3086
3087         Reviewed by David Kilzer.
3088
3089         Mail crashes with searching for next misspelled word with VoiceOver
3090         https://bugs.webkit.org/show_bug.cgi?id=45501
3091
3092         Test: platform/mac/accessibility/crash-in-element-for-text-marker.html
3093
3094         * accessibility/mac/AccessibilityObjectWrapper.mm:
3095         (-[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3096             Check that the AX object is not nil before asking for the wrapper().
3097
3098 2010-09-10  Michael Nordman  <michaeln@google.com>
3099
3100         Reviewed by Dumitru Daniliuc.
3101
3102         Decouple Blob from ScriptExecutionContext.
3103         https://bugs.webkit.org/show_bug.cgi?id=45410
3104
3105         - Removed ScriptExecutionContext pointers from Blob and File constructors.
3106         - Removed ScriptExecutionContext's collection of Blobs instance in that context.
3107         - Refactored BlobURL to make a distinction between 'public' blob urls and 'internal'
3108           urls that are used solely as identifiers. The former requires a SecurityOrigin to
3109           to manufacture, the latter does not.
3110         - Added a constant and accessor for the blob protocol scheme on the BlobURL class.
3111
3112         No new tests are added since this is a cleanup.
3113
3114         * bindings/js/SerializedScriptValue.cpp:
3115         (WebCore::CloneDeserializer::readFile):
3116         (WebCore::CloneDeserializer::readTerminal):
3117         * bindings/v8/SerializedScriptValue.cpp:
3118         (WebCore::ZigZag::Reader::readBlob):
3119         (WebCore::ZigZag::Reader::readFile):
3120         (WebCore::ZigZag::Reader::readFileList):
3121         * dom/ScriptExecutionContext.cpp:
3122         (WebCore::ScriptExecutionContext::~ScriptExecutionContext):
3123         (WebCore::ScriptExecutionContext::createPublicBlobURL):
3124         (WebCore::ScriptExecutionContext::revokePublicBlobURL):
3125         * dom/ScriptExecutionContext.h:
3126         * fileapi/Blob.cpp:
3127         (WebCore::Blob::Blob):
3128         (WebCore::Blob::~Blob):
3129         (WebCore::Blob::slice):
3130         * fileapi/Blob.h:
3131         (WebCore::Blob::create):
3132         (WebCore::Blob::url):
3133         * fileapi/Blob.idl:
3134         * fileapi/BlobBuilder.cpp:
3135         (WebCore::BlobBuilder::getBlob):
3136         * fileapi/BlobBuilder.h:
3137         * fileapi/BlobBuilder.idl:
3138         * fileapi/BlobURL.cpp:
3139         (WebCore::BlobURL::createPublicURL):
3140         (WebCore::BlobURL::createInternalURL):
3141         (WebCore::BlobURL::getOrigin):
3142         (WebCore::BlobURL::getIdentifier):
3143         (WebCore::BlobURL::createBlobURL):
3144         * fileapi/BlobURL.h:
3145         (WebCore::BlobURL::blobProtocol):
3146         (WebCore::BlobURL::BlobURL):
3147         * fileapi/File.cpp:
3148         (WebCore::File::File):
3149         * fileapi/File.h:
3150         (WebCore::File::create):
3151         * fileapi/FileReader.cpp: Register a public url to perform the read.
3152         (WebCore::FileReader::cleanup):
3153         (WebCore::FileReader::start):
3154         (WebCore::FileReader::didFinishLoading):
3155         (WebCore::FileReader::failed):
3156         * fileapi/FileReader.h: Added m_urlForReading data member.
3157         * fileapi/FileReaderSync.cpp:
3158         (WebCore::FileReaderSync::read): Register a public url to perform the read.
3159         * fileapi/ThreadableBlobRegistry.cpp:
3160         (WebCore::ThreadableBlobRegistry::registerBlobURL):
3161         (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
3162         * fileapi/ThreadableBlobRegistry.h:
3163         * html/HTMLInputElement.cpp:
3164         (WebCore::HTMLInputElement::appendFormData):
3165         (WebCore::HTMLInputElement::setFileListFromRenderer):
3166         * page/SecurityOrigin.cpp: Use BlobURL.blobProtocol().
3167         (WebCore::SecurityOrigin::create):
3168         (WebCore::SecurityOrigin::canRequest):
3169         (WebCore::SecurityOrigin::canDisplay):
3170         * platform/chromium/ClipboardChromium.cpp:
3171         (WebCore::ClipboardChromium::files):
3172         * platform/gtk/ClipboardGtk.cpp:
3173         (WebCore::ClipboardGtk::files):
3174         * platform/mac/ClipboardMac.mm:
3175         (WebCore::ClipboardMac::files):
3176         * platform/win/ClipboardWin.cpp:
3177         (WebCore::ClipboardWin::files):
3178
3179 2010-09-10  Xan Lopez  <xlopez@igalia.com>
3180
3181         Reviewed by Martin Robinson.
3182
3183         GDK_DISPLAY was removed in GTK+ 3.x, re-declare it when built
3184         against that.
3185
3186         * platform/gtk/GtkVersioning.h:
3187
3188 2010-09-10  Xan Lopez  <xlopez@igalia.com>
3189
3190         Reviewed by Martin Robinson.
3191
3192         Fix compilation with GTK+ 3.x.
3193
3194         GDK key macros were renamed from GDK_FOO to GDK_KEY_FOO, we need
3195         to include the compat header provided if we want to keep using the
3196         old names.
3197
3198         * platform/gtk/GtkVersioning.h: add the compatibility header.
3199         * platform/gtk/KeyEventGtk.cpp: include GtkVersioning.h
3200
3201 2010-09-09  Tony Gentilcore  <tonyg@chromium.org>
3202
3203         Reviewed by Eric Seidel.
3204
3205         Factor out the NestingLevelIncrementer
3206         https://bugs.webkit.org/show_bug.cgi?id=45471
3207
3208         No new tests because no new functionality.
3209
3210         * GNUmakefile.am:
3211         * WebCore.gypi:
3212         * WebCore.vcproj/WebCore.vcproj:
3213         * WebCore.xcodeproj/project.pbxproj:
3214         * html/parser/HTMLDocumentParser.cpp:
3215         * html/parser/HTMLDocumentParser.h:
3216         * html/parser/HTMLScriptRunner.cpp:
3217         * html/parser/NestingLevelIncrementer.h: Added.
3218         (WebCore::NestingLevelIncrementer::NestingLevelIncrementer):
3219         (WebCore::NestingLevelIncrementer::~NestingLevelIncrementer):
3220
3221 2010-09-10  Nikolas Zimmermann  <nzimmermann@rim.com>
3222
3223         Reviewed by Dirk Schulze.
3224
3225         SVG text chunk concept needs to be integrated in the InlineBox structure
3226         https://bugs.webkit.org/show_bug.cgi?id=45533
3227
3228         Begin rewriting the SVG text layout code. As first step move the text chunk concept right into the inline box structure.
3229         This obsoletes the whole text chunk part concept (see SVGTextChunkLayoutInfo.h for details), and will soon simplify the
3230         whole layout code a lot. Previously we hacked around the fact that a single InlineTextBox could contain multiple text chunks
3231         For example: <text x="20 30 40">ABC</text> only led to the creation of one InlineTextBox containing three chunks. When
3232         painting such an InlineTextBox, we had to do nasty hacks (same for text selection etc.)
3233         
3234         This is finally fixed by incorporating the knownledge about text chunks into the line layout algorithm.
3235         Note, this has no impact on HTML at all, no worries.
3236
3237         It's even required to do it this way as BiDi reordering shouldn't happen across text chunks.
3238         These are only the first bits, and currently slows down text layouting. Follow-up patches will remove the old layout
3239         algorithm, and will rely on the stored SVGTextLayoutAttributes in the RenerSVGInlineText renderers (instead of computing again).
3240
3241         * Android.mk: Add rendering/svg/SVGTextLayoutAttributes.* & rendering/svg/SVGTextLayoutBuilder.* to build.
3242         * CMakeLists.txt: Ditto.
3243         * GNUmakefile.am: Ditto.
3244         * WebCore.gyp/WebCore.gyp: Ditto.
3245         * WebCore.gypi: Ditto.
3246         * WebCore.pro: Ditto.
3247         * WebCore.vcproj/WebCore.vcproj: Ditto.
3248         * WebCore.vcproj/WebCoreCommon.vsprops: Ditto. (Recognize new rendering/svg directory.)
3249         * WebCore.vcproj/copyForwardingHeaders.cmd: Ditto. (Copy forwarding headers from rendering/svg directory.)
3250         * WebCore.xcodeproj/project.pbxproj: Ditto.
3251         * rendering/RenderBlockLineLayout.cpp: This is the key of the new concept, take text chunks into account when building the InlineBox structure.
3252         (WebCore::RenderBlock::findNextLineBreak): Split midpointState, if we encounter the beginning of a new text chunk.
3253         * rendering/RenderObject.h:
3254         (WebCore::RenderObject::isSVGInline): New method, which will be used to identify RenderSVGInline objects.
3255         * rendering/RenderSVGInline.h:
3256         (WebCore::RenderSVGInline::isSVGInline): Return true.
3257         * rendering/RenderSVGInlineText.cpp:
3258         (WebCore::RenderSVGInlineText::linesBoundingBox): Overriden, to simplify the calculations for SVG.
3259         (WebCore::RenderSVGInlineText::characterStartsNewTextChunk): Determines wheter the given position starts a new text chunk.
3260         * rendering/RenderSVGInlineText.h:
3261         (WebCore::RenderSVGInlineText::storeLayoutAttributes): Stores the layout attributes calculated in the text layout process (will be used everywhere in follow-up patches).
3262         * rendering/RenderSVGText.cpp:
3263         (WebCore::RenderSVGText::layout): Invoke SVGTextLayoutBuilder before creating the inline box tree, so we can decide which characters start new text chunks.
3264         * rendering/RenderText.h: Made linesBoundingBox() virtual so RenderSVGInlineText can override it.
3265         * rendering/svg: Added.
3266         * rendering/svg/SVGTextLayoutAttributes.cpp: Added. Holds x/y/dx/dy/rotate values and all kerning/ligature information used during layout.
3267         * rendering/svg/SVGTextLayoutAttributes.h: Added.
3268         * rendering/svg/SVGTextLayoutBuilder.cpp: Added.
3269         * rendering/svg/SVGTextLayoutBuilder.h: Added.
3270
3271 2010-09-10  Csaba Osztrogonác  <ossy@webkit.org>
3272
3273         Unreviewed fix after r67085.
3274
3275         * WebCore.pro: Fix previously moved filenames.
3276
3277 2010-09-10  Adam Barth  <abarth@webkit.org>
3278
3279         Reviewed by Eric Seidel.
3280
3281         Inline FrameLoader::committedLoad into its one caller
3282         https://bugs.webkit.org/show_bug.cgi?id=45481
3283
3284         This saves one round-trip through the FrameLoader when loading
3285         documents.
3286
3287         * loader/DocumentLoader.cpp:
3288         (WebCore::DocumentLoader::commitLoad):
3289         * loader/FrameLoader.cpp:
3290         * loader/FrameLoader.h:
3291
3292 2010-09-10  Patrick Gansterer  <paroga@paroga.com>
3293
3294         Reviewed by Adam Roben.
3295
3296         [WINCE] Remove ImageBuffer::toDataURL implementation
3297         https://bugs.webkit.org/show_bug.cgi?id=45478
3298
3299         At the moment ImageBuffer::toDataURL uses JPEGEncoder.h and PNGEncoder.h.
3300         Both files are not in the repository. So remove the implementation for now.
3301
3302         * platform/graphics/wince/ImageBufferWince.cpp:
3303         (WebCore::ImageBuffer::toDataURL):
3304
3305 2010-09-10  Andreas Kling  <andreas.kling@nokia.com>
3306
3307         Reviewed by Antonio Gomes.
3308
3309         WebGL: Fix GCC warnings about suggested parentheses around && within ||
3310         https://bugs.webkit.org/show_bug.cgi?id=45534
3311
3312         * html/canvas/WebGLRenderingContext.cpp:
3313         (WebCore::WebGLRenderingContext::getVertexAttrib):
3314         (WebCore::WebGLRenderingContext::readPixels):
3315         (WebCore::WebGLRenderingContext::texParameter):
3316         (WebCore::WebGLRenderingContext::handleNPOTTextures):
3317
3318 2010-09-09  Alexander Pavlov  <apavlov@chromium.org>
3319
3320         Reviewed by Yury Semikhatsky.
3321
3322         Web Inspector: Add navigation items into the Elements panel context menu.
3323
3324         For all anchors that have the class of "webkit-html-resource-link" or "webkit-html-external-link",
3325         a custom context menu with the items "Open Link in New Window" (invokes InspectorBackend.openInInspectedWindow() with
3326         the related URL) and "Open Link in Resources Panel" (opens the related resource in the Resources panel) is shown
3327         (the latter item is displayed only if the corresponding resource is known to the Web Inspector).
3328         https://bugs.webkit.org/show_bug.cgi?id=34250
3329
3330         * English.lproj/localizedStrings.js:
3331         * inspector/front-end/ElementsPanel.js:
3332         (WebInspector.ElementsPanel.prototype.populateHrefContextMenu):
3333         * inspector/front-end/ElementsTreeOutline.js:
3334         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
3335         (WebInspector.ElementsTreeElement.prototype._attributeHTML):
3336         * inspector/front-end/StylesSidebarPane.js:
3337         (WebInspector.StylesSidebarPane.prototype._contextMenuEventFired):
3338         * inspector/front-end/inspector.js:
3339         (WebInspector.openResource):
3340         (WebInspector.resourceURLForRelatedNode):
3341
3342 2010-09-10  Kwang Yul Seo  <skyul@company100.net>
3343
3344         Reviewed by James Robinson.
3345
3346         Make sure skia is not Chromium specific
3347         https://bugs.webkit.org/show_bug.cgi?id=39672
3348
3349         Move Image::loadPlatformResource to platform/graphics/chromium/ImageChromium.cpp.
3350         Other ports can use ImageSkia.cpp.
3351
3352         No new tests because this is pure refacotring.
3353
3354         * WebCore.gyp/WebCore.gyp:
3355         * WebCore.gypi:
3356         * platform/graphics/chromium/ImageChromium.cpp: Added.
3357         (WebCore::Image::loadPlatformResource):
3358         * platform/graphics/skia/ImageSkia.cpp:
3359
3360 2010-09-09  Ilya Tikhonovsky  <loislo@chromium.org>
3361
3362         Reviewed by Joseph Pecoraro.
3363
3364         WebInspector: Selecting 'inspect element' always shows body in inspector instead of clicked element.
3365
3366         1. Open any page
3367         2. Right-click on any element, select "Inspect Element"
3368         3. Web Inspector is opened but the <body> element (for HTML) is focused rather than the selected element
3369         4. Inspect the Web Inspector. An error message is logged in the console.
3370
3371         The regression was introduced in http://trac.webkit.org/changeset/66012 - focusNode() is invoked in
3372         InspectorController::populateScriptObjects() before the main document is set for the InspectorDOMAgent
3373         instance (which makes focusNode() bail out prematurely).
3374
3375         https://bugs.webkit.org/show_bug.cgi?id=45374
3376
3377         * inspector/InspectorController.cpp:
3378         (WebCore::InspectorController::populateScriptObjects):
3379
3380 2010-09-10  Cris Neckar  <cdn@chromium.org>
3381
3382         Reviewed by Chris Fleizach.
3383
3384         Null deref in RenderBlock::updateFirstLetter(). Check for null psuedo style.
3385         https://bugs.webkit.org/show_bug.cgi?id=45404
3386
3387         Test: fast/dom/firstletter-tablecell-crash.html
3388
3389         * rendering/RenderBlock.cpp:
3390         (WebCore::RenderBlock::updateFirstLetter):
3391
3392 2010-09-10  Cris Neckar  <cdn@chromium.org>
3393
3394         Reviewed by Chris Fleizach.
3395
3396         Null deref in RenderBlock::findNextLineBreak(). Check for null style with
3397         first-line style and fixed position.
3398         https://bugs.webkit.org/show_bug.cgi?id=45350
3399
3400         Test: fast/dom/firstline-fixed-crash.html
3401
3402         * rendering/RenderBlockLineLayout.cpp:
3403         (WebCore::RenderBlock::findNextLineBreak):
3404
3405 2010-09-10  Eric Seidel  <eric@webkit.org>
3406
3407         Reviewed by Dimitri Glazkov.
3408
3409         Remove support for non-lazy attach and fix frames to load from insertedIntoDocument instead of attach
3410         https://bugs.webkit.org/show_bug.cgi?id=45365
3411
3412         This change is the last piece of the puzzle which was preventing us from
3413         removing all eager-attach logic and moving WebCore to using an entirely
3414         recalcStyle-driven, on-demand renderer creation system, instead of every
3415         element being synchronously attached during parsing, regardless of whether
3416         it was ever going to be displayed or not.
3417
3418         This does not change the places we call lazyAttach vs. attach.  This only
3419         changes the behavior of frame/plugin elements when lazyAttach is called.
3420         Previously lazyAttach would eager-attach those elements (and their ancestors)
3421         because they were marked as canLazyAttach() { return false; }.
3422
3423         This is a very tricky change, please review carefully.
3424
3425         Mostly I'm moving logic which used to be in attach() into
3426         insertedIntoDocument.  Once it was there, there was no longer any reason
3427         why frame elements couldn't lazyAttach, thus removing the need
3428         for the non-lazy attach code path entirely.
3429         We've not yet converted all callsites over to using lazyAttach() instead
3430         of attach() however.
3431
3432         In order to move frame loading logic into insertedIntoDocument
3433         instead of attach, I needed to make sure that any javascript calls
3434         during the load would see an attached element.  Thus I needed to mark
3435         the element as needing style resolve so that it would attach itself
3436         if needed.
3437
3438         I was not able to just call lazyAttach() from insertedIntoDocument directly
3439         due to two conflicting assumptions in the rendering tree:
3440          1. ContainerNode::attach() assumes its "safe" to call attach on all children
3441             without checking first if the child is already attached.  This seems sane
3442             since its strange to think of a subtree as being attached w/o ancestors
3443             already being attached.  Although it is a hard rule that subtrees may not
3444             have renderers w/o ancestors also having renderers, I do not believe it's
3445             a hard rule that subtrees may not be attached.  Remember, attached() does
3446             not imply renderer()!  It's possible ContainerNode::attach()'s assumption is wrong here.
3447          2. Node::attach() asserts !attached().  This makes sense and I would not
3448             want to remove this assert, however it means that if insertedIntoDocument
3449             were to call lazyAttach() (thus marking the element as attached()) then
3450             all callers would need to check if the element was already attached after
3451             insertedIntoDocument (called by appendChild, parserAppendChild, etc.)
3452             before calling attach or lazyAttach().  The following example:
3453             element.innerHTML = "<span><iframe></span>" is one case where this
3454             ASSERT would be hit if insertedIntoDocument called lazyAttach, since
3455             ContainerNode::attach() (called on the span by in appendChild(DocumentFragment) code)
3456             does not check if iframe is already attached.
3457
3458         Note: One subtle change here is that synchronous javascript which results
3459         from javascript: or beforeload is now run as part of insertedIntoDocument
3460         (thus any insert/append call *even* parserAddChild) instead of being
3461         run during attach (technically in the post-attach callbacks).
3462
3463         This is covered by numerous layout tests.
3464
3465         * dom/ContainerNode.cpp:
3466         (WebCore::willRemoveChild):
3467         (WebCore::willRemoveChildren):
3468          - Since insertedIntoDocument starts a load and yet does not mark the
3469            element as attached, we need to always call willRemove().
3470            See note above as to why we don't just mark attached() in insertedIntoDocument.
3471         * dom/Node.cpp:
3472         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc):
3473          - Share some code between lazyAttach and setNeedsStyleRecalc.
3474         (WebCore::Node::setNeedsStyleRecalc):
3475          - Use the new markAncestorsWithChildNeedsStyleRecalc
3476         (WebCore::Node::lazyAttach):
3477          - Remove the non-lazy code path, and use markAncestorsWithChildNeedsStyleRecalc.
3478          - Add an option to lazyAttach without marking attached(), used by HTMLFrameElementBase::insertedIntoDocument.
3479         * dom/Node.h:
3480         * html/HTMLFrameElementBase.cpp:
3481          - m_shouldOpenURLAfterAttach is no longer needed, yay!
3482          - m_checkAttachedTimer no longer has anything to do with attached(), so renamed it.
3483            I also documented that the newly named m_checkInDocumentTimer is all about the
3484            "magic iframe" performance quirk.  (Which is actually speced in HTML5).
3485            I was initially baffled by this code, so I documented it.
3486         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase)
3487         (WebCore::HTMLFrameElementBase::insertedIntoDocument):
3488          - This is the meat of this change, see discussion above.
3489         (WebCore::HTMLFrameElementBase::attach):
3490          - Code deleted or moved to insertedIntoDocument.
3491         (WebCore::HTMLFrameElementBase::width):
3492          - Fixed a bug in height()/width() which was probably causing crashes
3493            and was causing incorrect behavior after this change.
3494            renderBox() is not necessarily valid unless layout is up to date.
3495            Updating layout, can cause renderBox() to go invalid, thus this
3496            could have been a null-pointer crash.
3497         (WebCore::HTMLFrameElementBase::height): see width()
3498         (WebCore::HTMLFrameElementBase::setRemainsAliveOnRemovalFromTree): Timer rename.
3499         (WebCore::HTMLFrameElementBase::checkInDocumentTimerFired): Timer rename.
3500         * html/HTMLFrameElementBase.h:
3501         * html/HTMLFrameOwnerElement.cpp:
3502         (WebCore::HTMLFrameOwnerElement::willRemove):
3503          - Disconnecting the owner element removes the frame from the frame tree.
3504            frameDetached() calls Page::frameCount which expects that the frame is
3505            already gone at this point and asserts when it's not.  It's unclear how
3506            this worked before, except that the frame removal was likely done in the
3507            post-attach callback, so the frameCount was wrong (too high) during
3508            frameDetached(), but was fixed up in the post-detach callback.
3509         * html/parser/HTMLConstructionSite.cpp:
3510         (WebCore::HTMLConstructionSite::attachAtSite):
3511           - Simplified this code, and added a check for the case when the node was already removed.
3512             Since the load logic is now run during insertedIntoDocument instead of attach(),
3513             synchronous javascript is now running during insertedIntoDocument and we need to
3514             make sure that the child is still in the tree.
3515
3516 2010-09-10  Dirk Pranke  <dpranke@chromium.org>
3517
3518         Unreviewed, rolling out r67178.
3519         http://trac.webkit.org/changeset/67178
3520         https://bugs.webkit.org/show_bug.cgi?id=45524
3521
3522         re-roll-out patch to put original changes back in
3523
3524         * html/HTMLObjectElement.cpp:
3525         (WebCore::HTMLObjectElement::parametersForPlugin):
3526         (WebCore::HTMLObjectElement::updateWidget):
3527         * loader/SubframeLoader.cpp:
3528         (WebCore::SubframeLoader::resourceWillUsePlugin):
3529         * loader/SubframeLoader.h:
3530
3531 2010-09-10  Dirk Pranke  <dpranke@chromium.org>
3532
3533         Reviewed by Kent Tamura.
3534
3535         roll out r66992 and r66997 - possibly introduced a perf slowdown in chromium tests
3536         https://bugs.webkit.org/show_bug.cgi?id=45524
3537
3538         * html/HTMLObjectElement.cpp:
3539         (WebCore::HTMLObjectElement::parametersForPlugin):
3540         (WebCore::HTMLObjectElement::updateWidget):
3541         * loader/SubframeLoader.cpp:
3542         (WebCore::SubframeLoader::requestFrame):
3543         * loader/SubframeLoader.h:
3544
3545 2010-09-10  Ryosuke Niwa  <rniwa@webkit.org>
3546
3547         Reviewed by Tony Chang.
3548
3549         Extract the code to find special ancestors in createMarkup into a function
3550         https://bugs.webkit.org/show_bug.cgi?id=45449
3551
3552         Extracted the code to find special common ancestors in createMarkup as highestAncestorToWrapMarkup.
3553         Also isolated the code to find ancestors required to retain structure and appearance into
3554         ancestorToRetainStructureAndAppearance.
3555
3556         No new tests are added since this is a cleanup.
3557
3558         * editing/markup.cpp:
3559         (WebCore::ancestorToRetainStructureAndAppearance): Added.
3560         (WebCore::propertyMissingOrEqualToNone): Moved.
3561         (WebCore::isElementPresentational):&n