2010-10-19 Hayato Ito <hayato@chromium.org>
[WebKit-https.git] / WebCore / ChangeLog
1 2010-10-19  Hayato Ito  <hayato@chromium.org>
2
3         Reviewed by Darin Adler.
4
5         Make CSS style selector non-recursive.
6         https://bugs.webkit.org/show_bug.cgi?id=43783
7
8         This change is one of the required changes to fix the following master bug:
9         https://bugs.webkit.org/show_bug.cgi?id=42806
10
11         To avoid recursion, we prepare a call stack and maintain a list of
12         function call state by ourselves and try matching iteratively.
13
14         Test: fast/css/long-css-selector-matches.html
15
16         * css/CSSStyleSelector.cpp:
17         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
18         (WebCore::CSSStyleSelector::checkSelector):
19         * css/CSSStyleSelector.h:
20
21 2010-10-19  Sheriff Bot  <webkit.review.bot@gmail.com>
22
23         Unreviewed, rolling out r70034.
24         http://trac.webkit.org/changeset/70034
25         https://bugs.webkit.org/show_bug.cgi?id=47889
26
27         "Gustavo's bot is lame" (Requested by xan_ on #webkit).
28
29         * platform/network/soup/CookieJarSoup.cpp:
30         (WebCore::defaultCookieJar):
31         (WebCore::setCookies):
32         * platform/network/soup/ResourceHandleSoup.cpp:
33         (WebCore::ResourceHandle::prepareForURL):
34         (WebCore::restartedCallback):
35         (WebCore::startHttp):
36         * platform/network/soup/ResourceRequestSoup.cpp:
37         (WebCore::ResourceRequest::toSoupMessage):
38         (WebCore::ResourceRequest::updateFromSoupMessage):
39
40 2010-10-19  Xan Lopez  <xlopez@igalia.com>
41
42         Reviewed by Martin Robinson.
43
44         [GTK] Bump minimum requirement for libsoup to 2.30
45         https://bugs.webkit.org/show_bug.cgi?id=46176
46
47         Bump minimum required libsoup version to 2.30.
48
49         * platform/network/soup/CookieJarSoup.cpp:
50         (WebCore::defaultCookieJar):
51         (WebCore::setCookies):
52         * platform/network/soup/ResourceHandleSoup.cpp:
53         (WebCore::ResourceHandle::prepareForURL):
54         (WebCore::restartedCallback):
55         (WebCore::startHttp):
56         * platform/network/soup/ResourceRequestSoup.cpp:
57         (WebCore::ResourceRequest::toSoupMessage):
58         (WebCore::ResourceRequest::updateFromSoupMessage):
59
60 2010-10-19  Xan Lopez  <xlopez@igalia.com>
61
62         Reviewed by Martin Robinson.
63
64         Fix distcheck, take 2.
65
66         * GNUmakefile.am: also move the generated CSS hash files to the
67         build dir.
68
69 2010-10-18  Kent Tamura  <tkent@chromium.org>
70
71         Reviewed by Dimitri Glazkov.
72
73         Should not save state of a detached form control.
74         https://bugs.webkit.org/show_bug.cgi?id=47811
75
76         Test: fast/forms/state-save-of-detached-control.html
77
78         * html/HTMLFormControlElement.cpp:
79         (WebCore::HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState):
80           If the node is detached, don't save the state.
81
82 2010-10-18  Xan Lopez  <xlopez@igalia.com>
83
84         Reviewed by Martin Robinson.
85
86         * GNUmakefile.am: add missing files.
87
88 2010-10-18  Oliver Hunt  <oliver@apple.com>
89
90         Reviewed by Sam Weinig.
91
92         REGRESSION: Feedly extension crashes Webkit
93         https://bugs.webkit.org/show_bug.cgi?id=45811
94
95         The basic problem was the deserializer was holding a pointer into
96         the constant pool, but if you were sufficiently unlucky then the
97         constant pool would be moved while still relying on the pointer,
98         which leads to badness.
99
100         I looked at just making all the sites this could happen extract the
101         right string/jsstring before any possible allocations, but it seemed
102         too fragile so i've gone for a forwarding object as the solution.
103
104         * bindings/js/SerializedScriptValue.cpp:
105         (WebCore::CloneDeserializer::CachedStringRef::CachedStringRef):
106         (WebCore::CloneDeserializer::CachedStringRef::operator->):
107         (WebCore::CloneDeserializer::readStringData):
108         (WebCore::CloneDeserializer::readFile):
109         (WebCore::CloneDeserializer::readTerminal):
110         (WebCore::CloneDeserializer::deserialize):
111
112 2010-10-18  Chris Rogers  <crogers@google.com>
113
114         Reviewed by Chris Fleizach.
115
116         Add AudioResampler files
117         https://bugs.webkit.org/show_bug.cgi?id=47623
118
119         No new tests since audio API is not yet implemented.
120
121         * platform/audio/AudioResampler.cpp: Added.
122         (WebCore::AudioResampler::AudioResampler):
123         (WebCore::AudioResampler::configureChannels):
124         (WebCore::AudioResampler::process):
125         (WebCore::AudioResampler::setRate):
126         (WebCore::AudioResampler::reset):
127         * platform/audio/AudioResampler.h: Added.
128         (WebCore::AudioResampler::~AudioResampler):
129         (WebCore::AudioResampler::rate):
130
131 2010-10-18  Vangelis Kokkevis  <vangelis@chromium.org>
132
133         Reviewed by James Robinson.
134
135         [chromium] Prevent the creation of very large textures for layers by switching
136         to "large layer" mode when a texture is larger than some fixed reasonable size
137         (set to 2000 pixels for now).
138         https://bugs.webkit.org/show_bug.cgi?id=47751
139
140         The code also changes the large layer logic to use the current scissor rect used
141         by the compositor instead of the visible rect to determine how to clip large layers.
142         This will provide additional texture savings. In addition, the various layer rects
143         have been converted to use integers instead of floats to preserve uniformity in the code.
144         
145         Tests: Existing large layer layout tests including huge-layer and huge-layer-img
146
147         * platform/graphics/chromium/ContentLayerChromium.cpp:
148         (WebCore::ContentLayerChromium::requiresClippedUpdateRect):
149         (WebCore::ContentLayerChromium::calculateClippedUpdateRect):
150         * platform/graphics/chromium/LayerChromium.cpp:
151         (WebCore::LayerChromium::getDrawRect):
152         * platform/graphics/chromium/LayerChromium.h:
153         * platform/graphics/chromium/LayerRendererChromium.cpp:
154         (WebCore::LayerRendererChromium::drawLayers):
155         (WebCore::LayerRendererChromium::drawLayersRecursive):
156         (WebCore::LayerRendererChromium::scissorToRect):
157         * platform/graphics/chromium/LayerRendererChromium.h:
158         (WebCore::LayerRendererChromium::currentScissorRect):
159
160 2010-10-18  Jia Pu  <jpu@apple.com>
161
162         Reviewed by Stephanie Lewis.
163
164         Correct the description of manual test: autocorrection-cancelled-by-typing-1.html
165         https://bugs.webkit.org/show_bug.cgi?id=47722
166         <rdar://problem/8556206>
167
168         * manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html: Update description
169           to match the test content.
170
171 2010-10-18  Martin Robinson  <mrobinson@igalia.com>
172
173         Build fix for newer versions of GTK+ 2.0. Instead of using GDK_DISPLAY()
174         use GDK_DRAWABLE_XDISPLAY(gdk_display_get_default()). GDK_DISPLAY() was
175         recently deprecated and the latter method has been available since GTK+
176         2.2.
177
178         * plugins/gtk/PluginViewGtk.cpp:
179         (WebCore::PluginView::updatePluginWidget):
180         (WebCore::PluginView::paint):
181         (WebCore::PluginView::initXEvent):
182         (WebCore::PluginView::platformGetValue):
183         (WebCore::getVisualAndColormap):
184         (WebCore::PluginView::platformStart):
185         (WebCore::PluginView::platformDestroy):
186
187 2010-10-18  Ryosuke Niwa  <rniwa@webkit.org>
188
189         Reviewed by Adam Barth.
190
191         elementCannotHaveEndTag should be a member function of MarkupAccumulator
192         https://bugs.webkit.org/show_bug.cgi?id=47846
193
194         Moved elementCannotHaveEndTag into MarkupAccumulator.
195
196         No new tests are added since this is a cleanup.
197
198         * editing/MarkupAccumulator.cpp:
199         (WebCore::MarkupAccumulator::elementCannotHaveEndTag): Added.
200         * editing/MarkupAccumulator.h: Added MarkupAccumulator::elementCannotHaveEndTag.
201         * editing/markup.cpp: Removed elementCannotHaveEndTag.
202         * editing/markup.h: Removed elementCannotHaveEndTag.
203
204 2010-10-18  Johnny Ding  <jnd@chromium.org>
205
206         Reviewed by Adam Barth.
207
208         Set the right referent sourceURL for the script with force user gesture.
209         https://bugs.webkit.org/show_bug.cgi?id=37138
210
211         Because empty sourceURL indicates running script with force user gesture,
212         make WebKit use document.url() as referent sourceURL (Since it uses blank
213         URL instead empty if the input URL is empty) if WebKit isn't running the
214         script from a hyper-link.
215
216         Test: fast/events/popup-blocked-from-window-open.html
217
218         * bindings/ScriptControllerBase.cpp:
219         (WebCore::ScriptController::executeScript):
220         * bindings/js/ScriptController.cpp:
221         (WebCore::ScriptController::executeScriptInWorld):
222
223 2010-10-18  Darin Adler  <darin@apple.com>
224
225         * dom/Node.h: Fix ancient typo in just-modified comment.
226
227 2010-10-18  Darin Adler  <darin@apple.com>
228
229         Reviewed by Alexey Proskuryakov.
230
231         Remove some functions from class Node and make a few others non-virtual
232         https://bugs.webkit.org/show_bug.cgi?id=47735
233
234         Refactoring. No new tests.
235
236         * bindings/js/JSNodeCustom.cpp:
237         (WebCore::JSNode::markChildren): Added a FIXME about the use of the virtual
238         ownerDocument function.
239
240         * dom/ContainerNode.cpp:
241         (WebCore::ContainerNode::removeChildren): Removed the unused return value.
242
243         * dom/ContainerNode.h: Made insertBefore, replaceChild, removeChild, and
244         appendChild non-virtual for clarity and performance. Made removeChildren
245         non-virtual and removed its return value. Moved the inline Node functions
246         that call through to ContainerNode into this file since the old way involved
247         an extra level of inline function but otherwise had no advantages.
248
249         * dom/Element.h: Moved isMathMLElement here because there is no call site
250         that needs to call it on a Node*. We can always move it back if we need to,
251         but it's better to have less in the Node class.
252
253         * dom/Node.cpp:
254         (WebCore::Node::insertBefore): Added an isContainerNode check so this can
255         be non-virtual. There are very few callers who call this function on Node.
256         If we want to optimize them further we can make the isContainerNode check
257         inline in the future.
258         (WebCore::Node::replaceChild): Ditto.
259         (WebCore::Node::removeChild): Ditto.
260         (WebCore::Node::appendChild): Ditto.
261         (WebCore::Node::remove): Removed unneeded ref/unref because
262         ContainerNode::removeChild already does this.
263         (WebCore::Node::createRendererIfNeeded): Removed #if around call to
264         childShouldCreateRenderer since it's needed even without SVG and XHTMLMP.
265
266         * dom/Node.h: Moved definitions of inline functions that depend on
267         ContainerNode to the ContainerNode.h header. They already required inclusion
268         of that header, so there is no functional change. Made insertBefore,
269         replaceChild, removeChild, and appendChild non-virtual. There are very few
270         callers of these functions on this class. Moved isMathMLElement to Element.
271         Added a FIXME about the name of eventAncestors. Fixed comment formatting.
272         Eliminated unused isEditableBlock function. Moved the body of the
273         enclosingInlineElement function to the editing file that was the only
274         call site. Removed the previousEditable and nextEditable functions,
275         incorporating their bodies into the one place they were called.
276         Took the childShouldCreateRenderer function out of #if since it's
277         now used by the implementation of the <noscript> element.
278
279         * dom/Position.cpp:
280         (WebCore::nextRenderedEditable): Rewrote the function to use nextLeafNode
281         instead of nextEditable.
282         (WebCore::previousRenderedEditable): Rewrote the function to use
283         previousLeafNode instead of previousEditable.
284
285         * editing/ReplaceSelectionCommand.cpp:
286         (WebCore::enclosingInline): Moved function here from the Node class. Also
287         fixed an incorrect cast this function did, which assumed the function
288         result was always an element, which the function does not guarantee.
289         (WebCore::ReplaceSelectionCommand::doApply): Call the function above.
290
291         * history/HistoryItem.cpp: Added include of MathExtras.h.
292
293 2010-10-18  Yongjun Zhang  <yongjun_zhang@apple.com>
294
295         Reviewed by Darin Adler.
296
297         Missing support for document.createEvent("OrientationEvent")
298         https://bugs.webkit.org/show_bug.cgi?id=32492
299
300         Add support for document.createEvent("OrientationEvent") to help unit testing of
301         onOrientationChange event.
302
303         Test: fast/dom/DeviceOrientation/create-event-onorientationchange.html
304
305         * dom/Document.cpp:
306         (WebCore::Document::createEvent):
307
308 2010-10-18  Jeremy Orlow  <jorlow@chromium.org>
309
310         Reviewed by Darin Adler.
311
312         DOMStringList should return null if the index is out of range
313         https://bugs.webkit.org/show_bug.cgi?id=47829
314
315         When item() returns a null string, it needs to be passed to JS as
316         null. The indexed getter will then magically do the right thing.
317         So all that's left is having DOMStringList::item() return null when
318         the index is out of bounds.
319
320         * dom/DOMStringList.cpp:
321         (WebCore::DOMStringList::item):
322         * dom/DOMStringList.h:
323         * dom/DOMStringList.idl:
324
325 2010-10-18  Girish Ramakrishnan  <girish@forwardbias.in>
326
327         Reviewed by Ariya Hidayat.
328
329         [Qt] Implement Accelerated Composition for NPAPI Plugins.
330
331         https://bugs.webkit.org/show_bug.cgi?id=35524
332
333         * plugins/PluginView.h:
334         (WebCore::PluginView::platformLayer):
335         * plugins/qt/PluginViewQt.cpp:
336         (WebCore::PluginGraphicsLayerQt::PluginGraphicsLayerQt):
337         (WebCore::PluginGraphicsLayerQt::~PluginGraphicsLayerQt):
338         (WebCore::PluginGraphicsLayerQt::paint):
339         (WebCore::PluginView::updatePluginWidget):
340         (WebCore::PluginView::paint):
341         (WebCore::PluginView::invalidateRect):
342         (WebCore::PluginView::invalidateRegion):
343         (WebCore::PluginView::platformStart):
344         (WebCore::PluginView::platformLayer):
345
346 2010-10-18  Stuart Morgan  <stuartmorgan@chromium.org>
347
348         Reviewed by Eric Seidel.
349
350         Switch to using the new Carbon NPAPI event declarations, and remove
351         the old ones.
352
353         https://bugs.webkit.org/show_bug.cgi?id=40784
354
355         * bridge/npapi.h:
356         * plugins/mac/PluginViewMac.mm:
357         (WebCore::PluginView::setFocus):
358         (WebCore::PluginView::handleMouseEvent):
359
360 2010-10-18  Pavel Feldman  <pfeldman@chromium.org>
361
362         Reviewed by Yury Semikhatsky.
363
364         Web Inspector: comment out resource manager instantiation on front-end side.
365         https://bugs.webkit.org/show_bug.cgi?id=47823
366
367         * inspector/front-end/inspector.js:
368
369 2010-10-18  Andrei Popescu  <andreip@google.com>
370
371         Reviewed by Jeremy Orlow.
372
373         The description parameter of IDBFactory::open() should be mandatory.
374         https://bugs.webkit.org/show_bug.cgi?id=47835
375
376         Makes the description parameter mandatory, as per the IndexedDatabase specification.
377         Modified existing tests to cover this change.
378
379         * storage/IDBDatabaseBackendImpl.cpp:
380         (WebCore::extractMetaData):
381         (WebCore::setMetaData):
382         (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
383         * storage/IDBFactory.cpp:
384         (WebCore::IDBFactory::open):
385         * storage/IDBFactory.h:
386         * storage/IDBFactory.idl:
387
388 2010-10-18  Xiaomei Ji  <xji@chromium.org>
389
390         Reviewed by David Levin.
391
392         Code cleanup: Move most function members in TextRunWorker from inlined.
393         https://bugs.webkit.org/show_bug.cgi?id=47732
394
395         No functionality change, so no tests added.
396
397         * platform/graphics/chromium/FontLinux.cpp:
398         (WebCore::TextRunWalker::setWordSpacingAdjustment):
399         (WebCore::TextRunWalker::setLetterSpacingAdjustment):
400         (WebCore::TextRunWalker::setXOffsetToZero):
401         (WebCore::TextRunWalker::rtl):
402         (WebCore::TextRunWalker::glyphs):
403         (WebCore::TextRunWalker::length):
404         (WebCore::TextRunWalker::xPositions):
405         (WebCore::TextRunWalker::advances):
406         (WebCore::TextRunWalker::width):
407         (WebCore::TextRunWalker::logClusters):
408         (WebCore::TextRunWalker::numCodePoints):
409         (WebCore::TextRunWalker::fontPlatformDataForScriptRun):
410         (WebCore::TextRunWalker::isCodepointSpace):
411         (WebCore::TextRunWalker::TextRunWalker):
412         (WebCore::TextRunWalker::~TextRunWalker):
413         (WebCore::TextRunWalker::isWordBreak):
414         (WebCore::TextRunWalker::setPadding):
415         (WebCore::TextRunWalker::reset):
416         (WebCore::TextRunWalker::setBackwardsIteration):
417         (WebCore::TextRunWalker::nextScriptRun):
418         (WebCore::TextRunWalker::widthOfFullRun):
419         (WebCore::TextRunWalker::getTextRun):
420         (WebCore::TextRunWalker::getNormalizedTextRun):
421         (WebCore::TextRunWalker::setupFontForScriptRun):
422         (WebCore::TextRunWalker::allocHarfbuzzFont):
423         (WebCore::TextRunWalker::deleteGlyphArrays):
424         (WebCore::TextRunWalker::createGlyphArrays):
425         (WebCore::TextRunWalker::resetGlyphArrays):
426         (WebCore::TextRunWalker::shapeGlyphs):
427         (WebCore::TextRunWalker::setGlyphXPositions):
428         (WebCore::TextRunWalker::mirrorCharacters):
429
430 2010-10-18  No'am Rosenthal  <noam.rosenthal@nokia.com>
431
432         Reviewed by Andreas Kling.
433
434         [Qt] AC rendering bugs
435         There were a few missing connections in Qt AC between GraphicsLayer and plugins, like changing the plugin's geometry to the layer's
436         contentsRect, and making sure media layers handle ParentChange events and setContentsNeedsDisplay. Now media layers behave correctly.
437
438         https://bugs.webkit.org/show_bug.cgi?id=47571
439
440         No new tests. This is in preparation for fixing AC+plugins, which already has tests that don't work yet with Qt.
441
442         * platform/graphics/qt/GraphicsLayerQt.cpp:
443         (WebCore::GraphicsLayerQtImpl::flushChanges):
444         (WebCore::GraphicsLayerQt::setContentsNeedsDisplay):
445         * platform/graphics/qt/GraphicsLayerQt.h:
446
447 2010-10-18  Pavel Feldman  <pfeldman@chromium.org>
448
449         Reviewed by Simon Fraser.
450
451         Web Inspector: [crash] when Inspector Open in CSSStyleSelector::loadPendingImages().
452         https://bugs.webkit.org/show_bug.cgi?id=46224
453
454         * CMakeLists.txt:
455         * GNUmakefile.am:
456         * WebCore.gypi:
457         * WebCore.pro:
458         * WebCore.vcproj/WebCore.vcproj:
459         * WebCore.xcodeproj/project.pbxproj:
460         * inspector/InspectorClient.cpp: Added.
461         (WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
462         * inspector/InspectorClient.h:
463         (WebCore::InspectorClient::InspectorClient):
464
465 2010-10-18  Andrei Popescu  <andreip@google.com>
466
467         Reviewed by Jeremy Orlow.
468
469         IDBKeyTree.h is no longer used.
470         https://bugs.webkit.org/show_bug.cgi?id=47824
471
472         No new tests, just removing unused files.
473
474         * WebCore.gypi:
475         * WebCore.xcodeproj/project.pbxproj:
476         * storage/IDBKeyTree.h: Removed.
477
478 2010-10-18  Andreas Kling  <kling@webkit.org>
479
480         Unreviewed buildfix for Qt + V8.
481         Add missing <wtf/text/CString.h> include.
482
483         * inspector/InspectorInstrumentation.cpp:
484
485 2010-10-18  Ilya Tikhonovsky  <loislo@chromium.org>
486
487         Reviewed by Yury Semikhatsky.
488
489         Web Inspector: toJSON serialization for Numbers should be fixed.
490         DecimalNumber is used instead of printf.
491
492         https://bugs.webkit.org/show_bug.cgi?id=43832
493
494         * inspector/InspectorValues.cpp:
495         (WebCore::InspectorBasicValue::writeJSON):
496
497 2010-10-18  Ilya Tikhonovsky  <loislo@chromium.org>
498
499         Reviewed by Yury Semikhatsky.
500
501         Web Inspector: [REGRESSION] Inspector window visible during run-webkit-tests.
502         The initial state of an inspector setting should stay untouched
503         if the profile has no value for it.
504
505         https://bugs.webkit.org/show_bug.cgi?id=47785
506
507         * inspector/InspectorState.cpp:
508         (WebCore::InspectorState::loadFromSettings):
509
510 2010-10-18  Pavel Feldman  <pfeldman@chromium.org>
511
512         Reviewed by Yury Semikhatsky.
513
514         Web Inspector: tab headers on resource panel are 1px off on Mac.
515         https://bugs.webkit.org/show_bug.cgi?id=47798
516
517         * inspector/front-end/inspector.css:
518         (.tabbed-pane-header li):
519
520 2010-10-18  Pavel Feldman  <pfeldman@chromium.org>
521
522         Not reviewed. Build fix.
523
524         * inspector/InspectorResourceAgent.cpp:
525         (WebCore::cachedResourceTypeString):
526
527 2010-10-17  Pavel Feldman  <pfeldman@chromium.org>
528
529         Reviewed by Yury Semikhatsky.
530
531         Web Inspector: Introduce InspectorResourceAgent.h/cpp and ResourceManager.js to
532         fill network panel with data.
533         https://bugs.webkit.org/show_bug.cgi?id=47779
534         
535         InspectorResourceAgent instance / JS part are introduced in this patch. Agent's lifetime is equal
536         to the front-end's. This new resource agent does not have state, instead it covers two functions:
537          1) forwards loader client messages to the front-end 2) is capable of building a tree of cached resources.
538         (1) feeds network panel with data, (2) shows the resource tree in the new ResourcesPanel concept.
539         This bug is for extracting this new InspectorResourceAgent class and its javascript counterpart.
540         Once resources panel is refactored for the new concept, InspectorResource, InspectorController's
541         resource-related routines, inspector.js's code dealing with resources, they all will be gone.
542
543         * WebCore.gypi:
544         * WebCore.vcproj/WebCore.vcproj:
545         * inspector/CodeGeneratorInspector.pm:
546         * inspector/Inspector.idl:
547         * inspector/InspectorApplicationCacheAgent.cpp:
548         (WebCore::InspectorApplicationCacheAgent::didReceiveManifestResponse):
549         * inspector/InspectorController.cpp:
550         (WebCore::InspectorController::connectFrontend):
551         (WebCore::InspectorController::releaseFrontendLifetimeAgents):
552         (WebCore::InspectorController::didCommitLoad):
553         (WebCore::InspectorController::frameDetachedFromParent):
554         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
555         (WebCore::InspectorController::identifierForInitialRequest):
556         (WebCore::InspectorController::willSendRequest):
557         (WebCore::InspectorController::markResourceAsCached):
558         (WebCore::InspectorController::didReceiveResponse):
559         (WebCore::InspectorController::didReceiveContentLength):
560         (WebCore::InspectorController::didFinishLoading):
561         (WebCore::InspectorController::didFailLoading):
562         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
563         (WebCore::InspectorController::scriptImported):
564         (WebCore::InspectorController::didCreateWebSocket):
565         (WebCore::InspectorController::willSendWebSocketHandshakeRequest):
566         (WebCore::InspectorController::didReceiveWebSocketHandshakeResponse):
567         (WebCore::InspectorController::didCloseWebSocket):
568         * inspector/InspectorController.h:
569         * inspector/InspectorResource.cpp:
570         (WebCore::InspectorResource::updateResponse):
571         (WebCore::cachedResourceType):
572         (WebCore::InspectorResource::type):
573         (WebCore::InspectorResource::sourceString):
574         (WebCore::InspectorResource::sourceBytes):
575         (WebCore::InspectorResource::endTiming):
576         * inspector/InspectorResourceAgent.cpp:
577         (WebCore::InspectorResourceAgent::resourceContent):
578         (WebCore::InspectorResourceAgent::resourceContentBase64):
579         (WebCore::InspectorResourceAgent::resourceData):
580         (WebCore::InspectorResourceAgent::cachedResource):
581         (WebCore::buildObjectForHeaders):
582         (WebCore::buildObjectForTiming):
583         (WebCore::buildObjectForResourceRequest):
584         (WebCore::buildObjectForResourceResponse):
585         (WebCore::buildObjectForMainResource):
586         (WebCore::cachedResourceTypeString):
587         (WebCore::buildObjectForCachedResource):
588         (WebCore::buildObjectForFrameResources):
589         (WebCore::InspectorResourceAgent::~InspectorResourceAgent):
590         (WebCore::InspectorResourceAgent::identifierForInitialRequest):
591         (WebCore::InspectorResourceAgent::willSendRequest):
592         (WebCore::InspectorResourceAgent::markResourceAsCached):
593         (WebCore::InspectorResourceAgent::didReceiveResponse):
594         (WebCore::InspectorResourceAgent::didReceiveContentLength):
595         (WebCore::InspectorResourceAgent::didFinishLoading):
596         (WebCore::InspectorResourceAgent::didFailLoading):
597         (WebCore::InspectorResourceAgent::didLoadResourceFromMemoryCache):
598         (WebCore::InspectorResourceAgent::setOverrideContent):
599         (WebCore::InspectorResourceAgent::didCommitLoad):
600         (WebCore::InspectorResourceAgent::frameDetachedFromParent):
601         (WebCore::createReadableStringFromBinary):
602         (WebCore::InspectorResourceAgent::didCreateWebSocket):
603         (WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
604         (WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
605         (WebCore::InspectorResourceAgent::didCloseWebSocket):
606         (WebCore::InspectorResourceAgent::cachedResources):
607         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
608         * inspector/InspectorResourceAgent.h:
609         (WebCore::InspectorResourceAgent::create):
610         * inspector/InspectorStyleSheet.cpp:
611         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
612         * inspector/front-end/ExtensionServer.js:
613         (WebInspector.ExtensionServer.prototype._onRevealAndSelectResource):
614         (WebInspector.ExtensionServer.prototype._onGetResourceContent):
615         * inspector/front-end/Resource.js:
616         (WebInspector.Resource.prototype.get responseReceivedTime):
617         (WebInspector.Resource.prototype.set endTime):
618         * inspector/front-end/Settings.js:
619         * inspector/front-end/SourceView.js:
620         (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded):
621         * inspector/front-end/WebKit.qrc:
622         * inspector/front-end/inspector.css:
623         (.tabbed-pane-header li):
624         * inspector/front-end/inspector.html:
625         * inspector/front-end/inspector.js:
626         (WebInspector.updateResource):
627         * loader/ResourceLoadNotifier.cpp:
628         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
629         * loader/appcache/ApplicationCacheGroup.cpp:
630         (WebCore::ApplicationCacheGroup::didReceiveResponse):
631
632 2010-10-16  Pavel Feldman  <pfeldman@chromium.org>
633
634         Reviewed by Yury Semikhatsky.
635
636         Web Inspector: brush up URL parsing on the front-end.
637         https://bugs.webkit.org/show_bug.cgi?id=47772
638
639         * inspector/InspectorResource.cpp:
640         (WebCore::InspectorResource::updateScriptObject):
641         * inspector/front-end/AuditRules.js:
642         (WebInspector.AuditRules.getDomainToResourcesMap):
643         (WebInspector.AuditRules.CombineExternalResourcesRule.prototype.doRun):
644         (WebInspector.AuditRules.MinimizeDnsLookupsRule.prototype.doRun):
645         (WebInspector.AuditRules.ParallelizeDownloadRule.prototype.doRun):
646         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
647         (WebInspector.AuditRules.CookieSizeRule.prototype.processCookies):
648         (WebInspector.AuditRules.StaticCookielessRule.prototype.processCookies):
649         * inspector/front-end/CookieItemsView.js:
650         (WebInspector.CookieItemsView.prototype._filterCookiesForDomain):
651         * inspector/front-end/DOMAgent.js:
652         (WebInspector.Cookies.cookieMatchesResourceURL):
653         * inspector/front-end/Resource.js:
654         (WebInspector.Resource):
655         (WebInspector.Resource.prototype.set url):
656         (WebInspector.Resource.prototype.get displayName):
657         * inspector/front-end/ResourceCategory.js:
658         (WebInspector.ResourceCategory.prototype.addResource):
659         * inspector/front-end/ResourceView.js:
660         (WebInspector.ResourceView):
661         * inspector/front-end/inspector.js:
662         (WebInspector.documentClick.followLink):
663         (WebInspector.documentClick):
664         (WebInspector.updateResource):
665         (WebInspector.linkifyStringAsFragment):
666         (WebInspector.resourceURLForRelatedNode):
667         (WebInspector.completeURL):
668         * inspector/front-end/utilities.js:
669         (String.prototype.asParsedURL):
670
671 2010-10-17  Andreas Kling  <kling@webkit.org>
672
673         Reviewed by Kenneth Rohde Christiansen.
674
675         [Qt] Support custom open() verbs/methods in XMLHttpRequest
676         https://bugs.webkit.org/show_bug.cgi?id=40476
677
678         Fall back to QNetworkAccessManager::CustomOperation for any HTTP verb
679         that's not specifically supported by QNetworkAccessManager.
680
681         This prevents the infinite loop that otherwise occurs after sending
682         an UnknownOperation request.
683
684         This change is covered by existing (skipped) tests that will be
685         unskipped once the Qt bots are running Qt 4.7.
686
687         * platform/network/qt/QNetworkReplyHandler.cpp:
688         (WebCore::QNetworkReplyHandler::httpMethod):
689         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
690         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
691         * platform/network/qt/QNetworkReplyHandler.h:
692
693 2010-10-17  Adam Barth  <abarth@webkit.org>
694
695         Reviewed by Dimitri Glazkov.
696
697         Remove explicit passing of user gesture in NavigationScheduler
698         https://bugs.webkit.org/show_bug.cgi?id=47786
699
700         As requested by Mr. Glazkov, remove more explicit passing of the user
701         gesture state.  We now use a static to pass this information around.
702
703         * bindings/generic/BindingFrame.h:
704         (WebCore::::navigateIfAllowed):
705         * bindings/js/JSDOMWindowCustom.cpp:
706         (WebCore::JSDOMWindow::setLocation):
707         * bindings/js/JSLocationCustom.cpp:
708         (WebCore::JSLocation::reload):
709         * bindings/v8/custom/V8LocationCustom.cpp:
710         (WebCore::V8Location::reloadCallback):
711         * inspector/InspectorController.cpp:
712         (WebCore::InspectorController::setResourceTrackingEnabled):
713         (WebCore::InspectorController::reloadPage):
714         * loader/NavigationScheduler.cpp:
715         (WebCore::ScheduledNavigation::ScheduledNavigation):
716         (WebCore::ScheduledURLNavigation::ScheduledURLNavigation):
717         (WebCore::ScheduledRedirect::ScheduledRedirect):
718         (WebCore::ScheduledLocationChange::ScheduledLocationChange):
719         (WebCore::ScheduledRefresh::ScheduledRefresh):
720         (WebCore::ScheduledHistoryNavigation::ScheduledHistoryNavigation):
721         (WebCore::ScheduledFormSubmission::ScheduledFormSubmission):
722         (WebCore::NavigationScheduler::scheduleRedirect):
723         (WebCore::NavigationScheduler::mustLockBackForwardList):
724         (WebCore::NavigationScheduler::scheduleLocationChange):
725         (WebCore::NavigationScheduler::scheduleFormSubmission):
726         (WebCore::NavigationScheduler::scheduleRefresh):
727         (WebCore::NavigationScheduler::scheduleHistoryNavigation):
728         * loader/NavigationScheduler.h:
729         * loader/SubframeLoader.cpp:
730         (WebCore::SubframeLoader::loadOrRedirectSubframe):
731
732 2010-10-17  Julien Chaffraix  <jchaffraix@codeaurora.org>
733
734         Reviewed by Andreas Kling.
735
736         'transparent' should be a valid color
737         https://bugs.webkit.org/show_bug.cgi?id=45482
738
739         Test: svg/animations/svg-animate-color-transparent.svg
740
741         Based on previous work by Jan Erik Hanssen  <jhanssen@codeaurora.org>
742
743         * platform/ColorData.gperf: Added 'transparent' to the list of colors.
744         Added the alpha to all the colors as it was needed to support the new color.
745
746         * platform/graphics/Color.cpp:
747         (WebCore::Color::Color):
748         (WebCore::Color::setNamedColor): Avoid setting the alpha as now it is not
749         always 0xFF.
750
751 2010-10-17  Justin Schuh  <jschuh@chromium.org>
752
753         Reviewed by Nikolas Zimmermann.
754
755         Duplicate use element children in shadow tree.
756         https://bugs.webkit.org/show_bug.cgi?id=47561
757
758         Test: svg/custom/use-nested-children.svg
759
760         * svg/SVGUseElement.cpp:
761         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
762
763 2010-10-17  Hyung Song  <beergun@company100.net>
764
765         Reviewed by David Levin.
766
767         Add !SINGLE_THREADED guard.
768         https://bugs.webkit.org/show_bug.cgi?id=47608
769
770         For SINGLE_THREADED ports LockingMutex.tryLock() returns false.
771         This will prevent interrupt() from falling into infinite loop.
772
773         * platform/sql/SQLiteDatabase.cpp:
774         (WebCore::SQLiteDatabase::interrupt):
775
776 2010-10-17  Simon Fraser  <simon.fraser@apple.com>
777
778         Reviewed by Nikolas Zimmermann.
779
780         Very large and small numbers fail to round-trip through CSS
781         https://bugs.webkit.org/show_bug.cgi?id=20674
782         
783         Use the new DecimalNumber functionality to convert CSS numberic values to strings
784         using decimal notation, rather than %g (which can output scientific notation).
785
786         Test: fast/css/round-trip-values.html
787
788         * css/CSSPrimitiveValue.cpp:
789         (WebCore::formatNumber):
790         (WebCore::CSSPrimitiveValue::cssText):
791
792 2010-10-17  Cosmin Truta  <ctruta@chromium.org>
793
794         Reviewed by Nikolas Zimmermann.
795
796         Crash while processing ill-formed SVG with cycles
797         https://bugs.webkit.org/show_bug.cgi?id=47498
798
799         Test: svg/custom/invalid-paint-shape-mask.svg
800
801         * rendering/SVGResources.cpp:
802         (paintingResourceFromSVGPaint): Ensured that the painting resource is
803         either a pattern resource or a gradient resource.
804         (SVGResources::setClipper):
805         (SVGResources::setFilter):
806         (SVGResources::setMarkerStart):
807         (SVGResources::setMarkerMid):
808         (SVGResources::setMarkerEnd):
809         (SVGResources::setMasker):
810         (SVGResources::setFill):
811         (SVGResources::setStroke): Added ASSERT statements for previously-unchecked
812         preconditions.
813
814 2010-10-17  Alex Milowski  <alex@milowski.com>
815
816         Reviewed by Kenneth Rohde Christiansen.
817
818         Fixed extra whitespace above operators when they aren't stretched
819         yet the stretch height is large.  Also, the baseline alignment
820         was changed so that rows and operators interact appropriately now
821         that operators don't have the extra white space.
822
823         * mathml/RenderMathMLOperator.cpp:
824         * mathml/RenderMathMLRow.cpp:
825
826 2010-10-17  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
827
828         Reviewed by Antonio Gomes.
829
830         [Qt] Fix focusing of control elements on mouse click.
831         Brings GTK fix to Qt platform.
832         https://bugs.webkit.org/show_bug.cgi?id=40641
833                         
834         Test: fast/events/click-focus-control.html
835
836         * html/HTMLFormControlElement.cpp:
837         (WebCore::HTMLFormControlElement::isMouseFocusable):
838
839 2010-10-17  Adam Barth  <abarth@webkit.org>
840
841         Reviewed by Dimitri Glazkov.
842
843         FrameLoader doesn't need an explicit userGesture parameter
844         https://bugs.webkit.org/show_bug.cgi?id=47777
845
846         We used to pass around the user gesture state explicitly.  Now we use
847         static state.  Explicitly passing the user gesture state to FrameLoader
848         in these methods is pretty out-dated.
849
850         * bindings/ScriptControllerBase.cpp:
851         (WebCore::ScriptController::executeIfJavaScriptURL):
852         * bindings/generic/BindingDOMWindow.h:
853         (WebCore::::createWindow):
854         (WebCore::::open):
855         * bindings/js/JSDOMWindowCustom.cpp:
856         (WebCore::createWindow):
857         (WebCore::JSDOMWindow::open):
858         * bindings/js/JSDocumentCustom.cpp:
859         (WebCore::JSDocument::setLocation):
860         * bindings/js/ScriptController.h:
861         * bindings/v8/ScriptController.h:
862         * html/HTMLAnchorElement.cpp:
863         (WebCore::handleLinkClick):
864         * inspector/InspectorController.cpp:
865         (WebCore::InspectorController::openInInspectedWindow):
866         * loader/FrameLoader.cpp:
867         (WebCore::FrameLoader::changeLocation):
868         (WebCore::FrameLoader::urlSelected):
869         (WebCore::FrameLoader::submitForm):
870         * loader/FrameLoader.h:
871         * loader/NavigationScheduler.cpp:
872         (WebCore::ScheduledURLNavigation::fire):
873         (WebCore::ScheduledRefresh::fire):
874         (WebCore::ScheduledHistoryNavigation::fire):
875         (WebCore::NavigationScheduler::scheduleLocationChange):
876
877 2010-10-17  Sergey A. Sukiyazov  <sergey.sukiyazov@gmail.com>
878
879         Reviewed by Andreas Kling
880
881         [Qt] Hovering the mouse over links produce a trail of underlined links (X11 paint engine)
882         https://bugs.webkit.org/show_bug.cgi?id=42248
883
884         The problem will appear because coordinates of points may increase by 0.05f (if line width is odd) inside
885         method GraphicsContext::adjustLineToPixelBoundaries(...) and become outside of text bounding rect htere,
886         then the new point coordinates will be passed to Qt graphics engine.
887
888         The solution decreases Y cordinates of points inside drawLineForText(...) method only if Qt graphics engine
889         is X11. The Y coordinates will be increase by 0.5f inside method adjustLineToPixelBoundaries(...),  which
890         called from drawLine(...), and then inside Qt painting engine will be rounded to next greater integer value.
891
892         NOTE: This changes will affect only Qt X11 verision and if only X11 Painting Engine will be used.
893
894         No new tests.
895
896         * platform/graphics/qt/GraphicsContextQt.cpp:
897         (WebCore::GraphicsContext::drawLineForText):
898
899 2010-10-17  Rob Buis  <rwlbuis@gmail.com>
900
901         Reviewed by Dirk Schulze.
902
903         Text under nested link dropped
904         https://bugs.webkit.org/show_bug.cgi?id=46460
905
906         Allow links inside of tspan and textPath elements.
907
908         * svg/SVGTSpanElement.cpp:
909         (WebCore::SVGTSpanElement::childShouldCreateRenderer):
910         * svg/SVGTextPathElement.cpp:
911         (WebCore::SVGTextPathElement::childShouldCreateRenderer):
912
913 2010-10-16  Kwang Yul Seo  <skyul@company100.net>
914
915         Reviewed by Kent Tamura.
916
917         [BREWMP] Port TextCodec
918         https://bugs.webkit.org/show_bug.cgi?id=45797
919
920         Implement TextCodec with Brew MP's ICharsetConv.
921         Only UTF-8 is supported for now.
922
923         * platform/text/TextEncoding.cpp:
924         (WebCore::TextEncoding::encode):
925         * platform/text/TextEncodingRegistry.cpp:
926         (WebCore::buildBaseTextCodecMaps):
927         * platform/text/brew/TextCodecBrew.cpp: Added.
928         (WebCore::newTextCodecBrew):
929         (WebCore::TextCodecBrew::registerBaseEncodingNames):
930         (WebCore::TextCodecBrew::registerBaseCodecs):
931         (WebCore::TextCodecBrew::registerExtendedEncodingNames):
932         (WebCore::TextCodecBrew::registerExtendedCodecs):
933         (WebCore::TextCodecBrew::TextCodecBrew):
934         (WebCore::TextCodecBrew::~TextCodecBrew):
935         (WebCore::TextCodecBrew::decode):
936         (WebCore::TextCodecBrew::encode):
937         * platform/text/brew/TextCodecBrew.h: Added.
938
939 2010-10-16  Patrick Gansterer  <paroga@webkit.org>
940
941         Unreviewed.
942
943         Build fix for !ENABLE(INSPECTOR) after r69844.
944
945         * inspector/InspectorState.h: Added ENABLE(INSPECTOR) guard.
946
947 2010-10-16  Patrick Gansterer  <paroga@webkit.org>
948
949         Unreviewed, build fix.
950
951         WinCE build fix for r69798.
952
953         * platform/text/wince/TextCodecWinCE.cpp: Added missing include.
954
955 2010-10-16  Johnny Ding  <jnd@chromium.org>
956
957         Reviewed by Adam Barth.
958
959         Requires a user gesture when opening file choose dialog.
960         https://bugs.webkit.org/show_bug.cgi?id=47593
961
962         Test: fast/forms/input-file-not-open-without-gesture.html
963
964         * rendering/RenderFileUploadControl.cpp:
965         (WebCore::RenderFileUploadControl::click):
966
967 2010-10-16  Alex Milowski  <alex@milowski.com>
968
969         Reviewed by Kenneth Rohde Christiansen.
970
971         Changed the vertical alignment within mfenced to baseline to
972         match the rest of the containers (e.g. mrow) and adjusted the
973         operator spacing to 0.1em.
974
975         Test: mathml/presentation/fenced-mi.xhtml
976
977         * css/mathml.css:
978         * mathml/RenderMathMLFenced.cpp:
979
980 2010-10-16  Patrick Gansterer  <paroga@webkit.org>
981
982         Reviewed by Adam Barth.
983
984         Rename StringHasherFunctions.h to StringHasher.h
985         https://bugs.webkit.org/show_bug.cgi?id=47200
986
987         * ForwardingHeaders/wtf/StringHashFunctions.h: Removed.
988         * ForwardingHeaders/wtf/StringHasher.h: Copied from WebCore/ForwardingHeaders/wtf/StringHashFunctions.h. 
989  
990 2010-10-15  Ryosuke Niwa  <rniwa@webkit.org>
991
992         Reviewed by Darin Adler.
993
994         unlink removes inline style of anchor elements
995         https://bugs.webkit.org/show_bug.cgi?id=47424
996
997         The bug was caused by our not extracting styles when the anchor element is removed by removeInlineStyle.
998         Because we removed the element without pushing its inline style down, we lost style information.
999
1000         Fixed the bug by pushing down styles in removeInlineStyle as done in pushDownInlineStyleAroundNode.
1001         Also fixed a bug in addInlineStyleIfNeeded where StyleChange incorrectly removed styles of the container
1002         node as supposed to that of startNode from the style to apply when startNode is not an element.
1003
1004         Test: editing/execCommand/toggle-unlink.html
1005
1006         * editing/ApplyStyleCommand.cpp:
1007         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): To prevent a similar bug in the future,
1008         added an assert that extractedStyle is specified whenever we're removing a styled element.
1009         (WebCore::ApplyStyleCommand::removeInlineStyle):
1010         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
1011
1012 2010-10-15  Ryosuke Niwa  <rniwa@webkit.org>
1013
1014         Reviewed by Tony Chang.
1015
1016         serializeNodesWithNamespaces should be in MarkupAccumulator
1017         https://bugs.webkit.org/show_bug.cgi?id=47749
1018
1019         Moved serializeNodesWithNamespaces to MarkupAccumulator, and renamed it to serializeNodes.
1020         MarkupAccumulator::serializeNode now returns the resultant string instead of having a separate takeResults().
1021         Added several helper functions to MarkupAccumulator.
1022
1023         No new tests are added since this is a cleanup.
1024
1025         * editing/MarkupAccumulator.cpp:
1026         (WebCore::MarkupAccumulator::serializeNodes): Wrapper for serializeNodes and concatenateMarkup.
1027         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces): Moved from markup.cpp
1028         (WebCore::MarkupAccumulator::appendStartTag): Calls appendString instead of appending into m_succeedingMarkup directly.
1029         (WebCore::MarkupAccumulator::appendEndTag): Ditto.
1030         (WebCore::MarkupAccumulator::totalLength): Added; extracted from takeResults.
1031         (WebCore::MarkupAccumulator::concatenateMarkup): Ditto.
1032         * editing/MarkupAccumulator.h:
1033         (WebCore::MarkupAccumulator::length): Added; calls totalLength.
1034         * editing/markup.cpp:
1035         (WebCore::StyledMarkupAccumulator::appendString): Added; calls MarkupAccumulator's appendString.
1036         (WebCore::StyledMarkupAccumulator::wrapWithStyleNode): Calls appendString.
1037         (WebCore::StyledMarkupAccumulator::takeResults): Calls length, totalLength, and concatenateMarkup.
1038         (WebCore::StyledMarkupAccumulator::serializeNodes): Became a member function.
1039         (WebCore::createMarkup): Uses MarkupAccumulator.
1040
1041 2010-10-15  Kinuko Yasuda  <kinuko@google.com>
1042
1043         Reviewed by Jian Li.
1044
1045         Implement FileEntrySync.file() in FileSystem API
1046         https://bugs.webkit.org/show_bug.cgi?id=47310
1047
1048         Tests: fast/filesystem/workers/file-from-file-entry-sync.html
1049                fast/filesystem/workers/file-from-file-entry.html
1050
1051         * fileapi/DOMFileSystem.cpp:
1052         (WebCore::DOMFileSystem::createFile): Added.
1053         * fileapi/DOMFileSystem.h:
1054         * fileapi/DOMFileSystemSync.cpp:
1055         (WebCore::DOMFileSystemSync::createFile): Added.
1056         * fileapi/DOMFileSystemSync.h:
1057         * fileapi/DirectoryReaderBase.h: Added 'virtual path' comment.
1058         * fileapi/EntryBase.h: Added 'virtual path' comment.
1059         * fileapi/FileEntry.cpp:
1060         (WebCore::FileEntry::file): Changed to use DOMFileSystem::createFile.
1061         * fileapi/FileEntrySync.cpp:
1062         (WebCore::FileEntrySync::file): Implemented.
1063         * fileapi/FileEntrySync.h:
1064         * fileapi/FileEntrySync.idl: Added file().
1065
1066 2010-10-15  Nico Weber  <thakis@chromium.org>
1067
1068         Reviewed by Eric Carlson.
1069
1070         Make sure to update the current graphics context when calling out to AppKit.
1071         https://bugs.webkit.org/show_bug.cgi?id=47757
1072
1073         Like r57741, but for the spellchecking highlight
1074
1075         * platform/graphics/mac/GraphicsContextMac.mm:
1076         (WebCore::GraphicsContext::drawLineForTextChecking):
1077
1078 2010-10-15  Brian Weinstein  <bweinstein@apple.com>
1079
1080         Reviewed by Sam Weinig.
1081
1082         REGRESSION(r69850) Loading apple.com/startpage in WebKit on Windows gets a bad request.
1083         https://bugs.webkit.org/show_bug.cgi?id=47753
1084         <rdar://problem/8558242>
1085         
1086         r69850 switched over to a different way of concatenating WebCore strings, but ran into an issue
1087         where some Windows calls were returning null terminated strings, and this breaks the new
1088         method of concatenation.
1089         
1090         GetLocaleInfo returns a null-terminated string, but WebCore strings are non-null terminated,
1091         so once we create our WebCore string, we want to trim off the null terminating character before
1092         we return the localeInfo.
1093
1094         Test: fast/dom/navigator-userAgent.html
1095
1096         * platform/win/Language.cpp:
1097         (WebCore::localeInfo):
1098
1099 2010-10-15  Alexey Proskuryakov  <ap@apple.com>
1100
1101         Trying to fix crashes on Leopard buildbot.
1102
1103         * loader/loader.cpp:
1104         (WebCore::Loader::Host::didFinishLoading):
1105         (WebCore::Loader::Host::didFail):
1106         Moved logging higher in the function - it seems that CachedResource can be already destroyed.
1107
1108         * platform/Logging.cpp: (WebCore::getChannelFromName):
1109         * platform/mac/LoggingMac.mm: (WebCore::InitializeLoggingChannelsIfNecessary):
1110         Initialize the new channel (oops).
1111
1112 2010-10-15  Mike Lawther  <mikelawther@chromium.org>
1113
1114         Reviewed by James Robinson.
1115
1116         Prevent scrollbars from appearing in iframes with scrolling=no
1117         when the embedded content has overflow:scroll set on the html
1118         or body tags.
1119
1120         iframes keep getting scrollbars with scrolling="no"
1121         https://bugs.webkit.org/show_bug.cgi?id=29240
1122
1123         Test: fast/frames/iframe-scrolling-attribute-overflowscroll.html
1124
1125         * page/FrameView.cpp:
1126         (WebCore::FrameView::calculateScrollbarModesForLayout)
1127         (WebCore::FrameView::updateCanHaveScrollbars):
1128         (WebCore::FrameView::layout):
1129         * page/FrameView.h:
1130         (WebCore::FrameView::calculateScrollbarModesForLayout)
1131
1132 2010-10-15  Dan Bernstein  <mitz@apple.com>
1133
1134         Reviewed by Adele Peterson.
1135
1136         Clean up RenderFlexibleBox::applyLineClamp()
1137         https://bugs.webkit.org/show_bug.cgi?id=47743
1138
1139         * rendering/RenderFlexibleBox.cpp:
1140         (WebCore::RenderFlexibleBox::applyLineClamp):
1141
1142 2010-10-15  Alexey Proskuryakov  <ap@apple.com>
1143
1144         Reviewed by Darin Adler.
1145
1146         https://bugs.webkit.org/show_bug.cgi?id=47736
1147         <rdar://problem/8429396> WebCore cache gets corrupted if revalidation request starts at an inopportune time
1148
1149         Test: http/tests/cache/stopped-revalidation.html
1150
1151         * loader/loader.cpp: (WebCore::Loader::Host::servePendingRequests): Copied logic for
1152         revalidation requests from didFail().
1153
1154 2010-10-15  Alexey Proskuryakov  <ap@apple.com>
1155
1156         Reviewed by Darin Adler in <https://bugs.webkit.org/show_bug.cgi?id=47736>.
1157
1158         Add a logging channel for WebCore cache and resource loading.
1159
1160         Test: http/tests/cache/stopped-revalidation.html
1161
1162         * platform/Logging.cpp:
1163         * platform/Logging.h:
1164         Added a logging channel for Cache and Loader.
1165
1166         * loader/Cache.cpp:
1167         (WebCore::Cache::requestResource):
1168         (WebCore::Cache::revalidateResource):
1169         (WebCore::Cache::revalidationFailed):
1170         (WebCore::Cache::evict):
1171         * loader/CachedResource.cpp:
1172         (WebCore::CachedResource::setResourceToRevalidate):
1173         (WebCore::CachedResource::switchClientsToRevalidatedResource):
1174         (WebCore::CachedResource::mustRevalidate):
1175         Added logging.
1176
1177         * loader/loader.cpp:
1178         (WebCore::Loader::load): Added logging.
1179         (WebCore::Loader::scheduleServePendingRequests): Ditto.
1180         (WebCore::Loader::requestTimerFired): Ditto.
1181         (WebCore::Loader::servePendingRequests): Ditto.
1182         (WebCore::Loader::Host::servePendingRequests):  Changed logging to use the new channel.
1183         (WebCore::Loader::Host::didFinishLoading): Changed logging to use the new channel.
1184         (WebCore::Loader::Host::didFail): Added logging.
1185
1186 2010-10-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
1187
1188         Reviewed by Simon Fraser.
1189
1190         Add public functions to serialize TransformOperations.
1191         https://bugs.webkit.org/show_bug.cgi?id=47728
1192
1193         Added public accessors to the internal data of the TransformOperations.
1194
1195         No new tests. These functions are enablers for WebKit2.
1196
1197         * platform/graphics/transforms/Matrix3DTransformOperation.h:
1198         (WebCore::Matrix3DTransformOperation::matrix):
1199         * platform/graphics/transforms/MatrixTransformOperation.h:
1200         (WebCore::MatrixTransformOperation::matrix):
1201         * platform/graphics/transforms/PerspectiveTransformOperation.h:
1202         (WebCore::PerspectiveTransformOperation::perspective):
1203         * platform/graphics/transforms/RotateTransformOperation.h:
1204         (WebCore::RotateTransformOperation::x):
1205         (WebCore::RotateTransformOperation::y):
1206         (WebCore::RotateTransformOperation::z):
1207         * platform/graphics/transforms/SkewTransformOperation.h:
1208         (WebCore::SkewTransformOperation::angleX):
1209         (WebCore::SkewTransformOperation::angleY):
1210         * platform/graphics/transforms/TranslateTransformOperation.h:
1211         (WebCore::TranslateTransformOperation::x):
1212         (WebCore::TranslateTransformOperation::y):
1213         (WebCore::TranslateTransformOperation::z):
1214
1215 2010-10-15  Jian Li  <jianli@chromium.org>
1216
1217         Reviewed by Dmitry Titov.
1218
1219         FileReader.readAsDataURL should take Blob object
1220         https://bugs.webkit.org/show_bug.cgi?id=47679
1221
1222         Test cases have been added into read-blob-test-cases.js.
1223
1224         * fileapi/FileReader.idl: Update per the latest File API spec.
1225
1226 2010-10-15  Adam Barth  <abarth@webkit.org>
1227
1228         Reviewed by Eric Seidel.
1229
1230         Move MarkupAccumulator from markup.cpp to its own file
1231         https://bugs.webkit.org/show_bug.cgi?id=47734
1232
1233         This patch moves the MarkupAccumulator class into its own file.
1234         There's a lot of clean up left to do, but this patch is a step in the
1235         right direction.
1236
1237         No behavior change.
1238
1239         * Android.mk:
1240         * CMakeLists.txt:
1241         * GNUmakefile.am:
1242         * WebCore.gypi:
1243         * WebCore.pro:
1244         * WebCore.vcproj/WebCore.vcproj:
1245         * WebCore.xcodeproj/project.pbxproj:
1246         * editing/markup.cpp:
1247         (WebCore::elementCannotHaveEndTag):
1248         * editing/markup.h:
1249         * editing/MarkupAccumulator.h: Added.
1250         * editing/MarkupAccumulator.cpp: Added.
1251
1252 2010-10-15  Ryosuke Niwa  <rniwa@webkit.org>
1253
1254         Reviewed by Darin Adler.
1255
1256         Match the elements supported by execCommand('formatBlock') and queryCommandValue('formatBlock')
1257         https://bugs.webkit.org/show_bug.cgi?id=47712
1258
1259         Extended queryCommandValue('formatBlock', false, null) to support article, aside, blockquote, dd, dl,
1260         div, dl, dt, dl, footer, header, hgroup, nav, and section. Because this makes isElementForFormatBlockCommand
1261         in Editor.cpp and FormatBlockCommand::isElementToApplyInFormatBlockCommand identical, they are merged and moved
1262         to FormatBlockCommand.cpp
1263
1264         Tests are added to editing/execCommand/query-format-block.html
1265
1266         * editing/Editor.cpp: Removed isElementForFormatBlockCommand and Editor::elementForFormatBlockCommand.
1267         * editing/Editor.h:
1268         * editing/EditorCommand.cpp:
1269         (WebCore::executeFormatBlock): Removed the check of tag name; the check is moved into FormatBlockCommand.
1270         (WebCore::valueFormatBlock): Calls FormatBlockCommand::elementForFormatBlockCommand.
1271         * editing/FormatBlockCommand.cpp:
1272         (WebCore::isElementForFormatBlock):
1273         (WebCore::FormatBlockCommand::FormatBlockCommand):
1274         (WebCore::FormatBlockCommand::formatSelection): Added to check the tag name. Exit early if the specified tag name
1275         is not what FormatBlock should apply. Set m_didApply true if m_didApply did apply the element.
1276         (WebCore::FormatBlockCommand::formatRange): Moved from Editor.cpp.  Takes Range* instead of accessing selection directly.
1277         (WebCore::FormatBlockCommand::elementForFormatBlockCommand): Moved from Editor.cpp
1278         (WebCore::enclosingBlockToSplitTreeTo): Calls isElementForFormatBlock.
1279         * editing/FormatBlockCommand.h:
1280         (WebCore::FormatBlockCommand::didApply): Added.
1281
1282 2010-10-15  Dirk Schulze  <krit@webkit.org>
1283
1284         Reviewed by Nikolas Zimmermann.
1285
1286         carto.net Dock example redraws *way* too often
1287         https://bugs.webkit.org/show_bug.cgi?id=16090
1288
1289         Setting the attributes x, y, width or height shouldn't cause a repaint if the image boundaries don't change.
1290         Added updateFromElement() to RenderSVGImage that checks if the old boundaries match the new boundaries after
1291         setting one of the attributes of above. Mark renderer for layout (and therefore repaint) if the boundaries
1292         differ, do nothing if not.
1293         Also added caching of the repaint rect to avoid multiple calculations.
1294
1295         Test: svg/custom/repaint-on-constant-size-change.svg
1296
1297         * rendering/RenderSVGImage.cpp:
1298         (WebCore::RenderSVGImage::RenderSVGImage):
1299         (WebCore::RenderSVGImage::layout): Update repaint rect on layout.
1300         (WebCore::RenderSVGImage::updateFromElement): Check SVGImageElement for boundaries update.
1301         * rendering/RenderSVGImage.h:
1302         (WebCore::RenderSVGImage::repaintRectInLocalCoordinates): Return the cached repaint rect.
1303         * svg/SVGImageElement.cpp:
1304         (WebCore::SVGImageElement::svgAttributeChanged): Call updateFromElement() on changes to x, y, width or height.
1305
1306 2010-10-15  Martin Robinson  <mrobinson@igalia.com>
1307
1308         Build fix for GTK+.
1309
1310         * platform/network/soup/cache/webkit/soup-cache.h: Do not use PLATFORM(...) macro
1311         in a file that does not include config.h
1312
1313 2010-10-15  Anders Carlsson  <andersca@apple.com>
1314
1315         Reviewed by Sam Weinig.
1316
1317         Add FindIndicatorWindow class
1318         https://bugs.webkit.org/show_bug.cgi?id=47731
1319
1320         Export symbols needed by the FindIndicator in WebKit2.
1321
1322         * WebCore.exp.in:
1323
1324 2010-10-15  Leandro Pereira  <leandro@profusion.mobi>
1325
1326         [EFL] Unreviewed. Build fix.
1327
1328         Add new files needed by the Soup network backend, and #ifdef a
1329         GTK+-port only include in soup-cache.h.
1330
1331         * CMakeListsEfl.txt:
1332         * platform/network/soup/cache/webkit/soup-cache.h:
1333
1334 2010-10-14  Darin Adler  <darin@apple.com>
1335
1336         Reviewed by Alexey Proskuryakov.
1337
1338         Use more specific types for node pointers, especially when calling node insertion and removal functions
1339         https://bugs.webkit.org/show_bug.cgi?id=47702
1340
1341         Refactoring. No new tests.
1342
1343         While developing this patch I temporarily removed the node insertion and
1344         removal member functions from the Node class and fixed almost all call sites
1345         so they call it directly on the ContainerNode class, which will be important
1346         once we make the functions non-virtual.
1347
1348         * css/CSSStyleSelector.cpp:
1349         (WebCore::CSSStyleSelector::SelectorChecker::checkSelector):
1350         * dom/ContainerNode.cpp:
1351         (WebCore::ContainerNode::insertBefore):
1352         (WebCore::ContainerNode::replaceChild):
1353         (WebCore::ContainerNode::appendChild):
1354         * dom/Document.cpp:
1355         (WebCore::Document::caretRangeFromPoint):
1356         * dom/DynamicNodeList.cpp:
1357         (WebCore::DynamicNodeList::itemWithName):
1358         * dom/Position.cpp:
1359         (WebCore::Position::previous):
1360         (WebCore::Position::next):
1361         * dom/Text.cpp:
1362         (WebCore::Text::replaceWholeText):
1363         * dom/TreeWalker.cpp:
1364         (WebCore::TreeWalker::firstChild):
1365         (WebCore::TreeWalker::lastChild):
1366         (WebCore::TreeWalker::previousNode):
1367         * dom/XMLDocumentParserLibxml2.cpp:
1368         (WebCore::XMLDocumentParser::XMLDocumentParser):
1369         * editing/BreakBlockquoteCommand.cpp:
1370         (WebCore::BreakBlockquoteCommand::doApply):
1371         * editing/CompositeEditCommand.h:
1372         * editing/DeleteButtonController.cpp:
1373         (WebCore::isDeletableElement):
1374         * editing/IndentOutdentCommand.cpp:
1375         (WebCore::IndentOutdentCommand::outdentParagraph):
1376         * editing/InsertNodeBeforeCommand.cpp:
1377         (WebCore::InsertNodeBeforeCommand::doApply):
1378         * editing/JoinTextNodesCommand.cpp:
1379         (WebCore::JoinTextNodesCommand::doApply):
1380         (WebCore::JoinTextNodesCommand::doUnapply):
1381         * editing/MergeIdenticalElementsCommand.cpp:
1382         (WebCore::MergeIdenticalElementsCommand::doUnapply):
1383         * editing/RemoveNodeCommand.cpp:
1384         (WebCore::RemoveNodeCommand::doApply):
1385         (WebCore::RemoveNodeCommand::doUnapply):
1386         * editing/RemoveNodeCommand.h:
1387         * editing/SplitElementCommand.cpp:
1388         (WebCore::SplitElementCommand::executeApply):
1389         * editing/SplitTextNodeCommand.cpp:
1390         (WebCore::SplitTextNodeCommand::doApply):
1391         (WebCore::SplitTextNodeCommand::doReapply):
1392         * editing/TextIterator.cpp:
1393         (WebCore::parentCrossingShadowBoundaries):
1394         * editing/htmlediting.cpp:
1395         (WebCore::enclosingList):
1396         * editing/markup.cpp:
1397         (WebCore::serializeNodes):
1398         (WebCore::ancestorToRetainStructureAndAppearance):
1399         (WebCore::createMarkup):
1400         * html/HTMLAreaElement.cpp:
1401         (WebCore::HTMLAreaElement::updateFocusAppearance):
1402         * html/HTMLEmbedElement.cpp:
1403         (WebCore::HTMLEmbedElement::rendererIsNeeded):
1404         * html/HTMLFormElement.cpp:
1405         (WebCore::HTMLFormElement::rendererIsNeeded):
1406         * html/HTMLFrameSetElement.cpp:
1407         (WebCore::HTMLFrameSetElement::attach):
1408         * html/HTMLImageElement.cpp:
1409         (WebCore::HTMLImageElement::insertedIntoTree):
1410         * html/HTMLLegendElement.cpp:
1411         (WebCore::HTMLLegendElement::associatedControl):
1412         * html/HTMLOptGroupElement.cpp:
1413         (WebCore::HTMLOptGroupElement::recalcSelectOptions):
1414         (WebCore::HTMLOptGroupElement::ownerSelectElement):
1415         * html/HTMLOptionElement.cpp:
1416         (WebCore::HTMLOptionElement::ownerSelectElement):
1417         * html/HTMLTableCellElement.cpp:
1418         (WebCore::HTMLTableCellElement::additionalAttributeStyleDecls):
1419         * html/HTMLTableColElement.cpp:
1420         (WebCore::HTMLTableColElement::additionalAttributeStyleDecls):
1421         * html/HTMLTableElement.cpp:
1422         (WebCore::HTMLTableElement::insertRow):
1423         * html/HTMLTableRowElement.cpp:
1424         (WebCore::HTMLTableRowElement::rowIndex):
1425         * html/HTMLTableSectionElement.cpp:
1426         (WebCore::HTMLTableSectionElement::additionalAttributeStyleDecls):
1427         * page/DOMSelection.cpp:
1428         (WebCore::DOMSelection::getRangeAt):
1429         (WebCore::DOMSelection::containsNode):
1430         * rendering/RenderSVGGradientStop.cpp:
1431         (WebCore::RenderSVGGradientStop::gradientElement):
1432         * svg/SVGElement.cpp:
1433         (WebCore::SVGElement::ownerSVGElement):
1434         (WebCore::SVGElement::viewportElement):
1435         * svg/SVGFELightElement.cpp:
1436         (WebCore::SVGFELightElement::svgAttributeChanged):
1437         (WebCore::SVGFELightElement::childrenChanged):
1438         * svg/SVGFEMergeNodeElement.cpp:
1439         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged):
1440         * svg/SVGFontFaceFormatElement.cpp:
1441         (WebCore::SVGFontFaceFormatElement::childrenChanged):
1442         * svg/SVGFontFaceUriElement.cpp:
1443         (WebCore::SVGFontFaceUriElement::childrenChanged):
1444         * svg/SVGGlyphElement.cpp:
1445         (WebCore::SVGGlyphElement::invalidateGlyphCache):
1446         * svg/SVGHKernElement.cpp:
1447         (WebCore::SVGHKernElement::insertedIntoDocument):
1448         (WebCore::SVGHKernElement::removedFromDocument):
1449         * svg/SVGLocatable.cpp:
1450         (WebCore::SVGLocatable::nearestViewportElement):
1451         (WebCore::SVGLocatable::farthestViewportElement):
1452         * svg/SVGUseElement.cpp:
1453         (WebCore::SVGUseElement::updateContainerOffsets):
1454         * svg/SVGVKernElement.cpp:
1455         (WebCore::SVGVKernElement::insertedIntoDocument):
1456         (WebCore::SVGVKernElement::removedFromDocument):
1457         * svg/animation/SVGSMILElement.cpp:
1458         (WebCore::SVGSMILElement::targetElement):
1459         * wml/WMLDoElement.cpp:
1460         (WebCore::WMLDoElement::insertedIntoDocument):
1461         (WebCore::WMLDoElement::removedFromDocument):
1462         * wml/WMLNoopElement.cpp:
1463         (WebCore::WMLNoopElement::insertedIntoDocument):
1464         * wml/WMLOptionElement.cpp:
1465         (WebCore::ownerSelectElement):
1466         * wml/WMLPostfieldElement.cpp:
1467         (WebCore::WMLPostfieldElement::insertedIntoDocument):
1468         (WebCore::WMLPostfieldElement::removedFromDocument):
1469         * wml/WMLSetvarElement.cpp:
1470         (WebCore::WMLSetvarElement::insertedIntoDocument):
1471         (WebCore::WMLSetvarElement::removedFromDocument):
1472         * wml/WMLTaskElement.cpp:
1473         (WebCore::WMLTaskElement::insertedIntoDocument):
1474         (WebCore::WMLTaskElement::removedFromDocument):
1475         * wml/WMLTimerElement.cpp:
1476         (WebCore::WMLTimerElement::insertedIntoDocument):
1477         (WebCore::WMLTimerElement::removedFromDocument):
1478         * xml/XPathStep.cpp:
1479         (WebCore::XPath::Step::nodesInAxis):
1480         Use ContainerNode* for the result of the parentNode function now that
1481         it returns a ContainerNode*. In the past it used to return just Node*.
1482
1483         * dom/ContainerNode.h: Added toContainerNode.
1484
1485         * dom/Element.h: Use ContainerNode*. Added toElement.
1486
1487         * dom/Element.cpp:
1488         (WebCore::Element::deprecatedCreateContextualFragment): Explcitly
1489         cast to HTMLElement* in the case that handles <html> and <body>
1490         elements.
1491         (WebCore::Element::baseURI): Use ContainerNode*.
1492
1493         * dom/Node.cpp:
1494         (WebCore::Node::markAncestorsWithChildNeedsStyleRecalc): Use ContainerNode*.
1495         (WebCore::Node::isDescendantOf): Ditto.
1496         (WebCore::Node::createRendererIfNeeded): Ditto.
1497         (WebCore::Node::setTextContent): Use already-typecast pointer in a call to
1498         appendChild.
1499         (WebCore::Node::ancestorElement): Use ContainerNode*.
1500
1501         * dom/Range.cpp:
1502         (WebCore::Range::compareNode): Use ContainerNode*.
1503         (WebCore::Range::intersectsNode): Ditto.
1504         (WebCore::Range::processContents): Cast to ContainerNode* in a couple cases
1505         where we previously checked that the node in question has a child. Any node
1506         that returns a non-zero value for firstChild is a ContainerNode.
1507         (WebCore::Range::checkNodeBA): Ditto.
1508         (WebCore::Range::selectNode): Ditto.
1509         (WebCore::Range::surroundContents): Ditto.
1510
1511         * dom/XMLDocumentParser.cpp:
1512         (WebCore::XMLDocumentParser::insertErrorMessageBlock): Rewrote code to use
1513         more specific types, document instead of doc, and paragraph instead of par.
1514
1515         * editing/ApplyStyleCommand.cpp:
1516         (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle):
1517         Use ContainerNode*.
1518         (WebCore::ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes):
1519         Use replaceElementWithSpanPreservingChildrenAndAttributes; the old function
1520         took a Node argument and had Node in its name.
1521
1522         * editing/CompositeEditCommand.cpp:
1523         (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Use ContainerNode.
1524         (WebCore::CompositeEditCommand::replaceElementWithSpanPreservingChildrenAndAttributes):
1525         Renamed and changed to take HTMLElement. Also use ContainerNode.
1526         (WebCore::CompositeEditCommand::prune): Ditto.
1527         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Ditto.
1528         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph): Ditto.
1529
1530         * editing/ReplaceNodeWithSpanCommand.cpp:
1531         (WebCore::ReplaceNodeWithSpanCommand::ReplaceNodeWithSpanCommand): Take an
1532         HTMLElement instead of a Node. Call it m_elementToReplace instead of m_node.
1533         (WebCore::swapInNodePreservingAttributesAndChildren): Take HTMLElement.
1534         (WebCore::ReplaceNodeWithSpanCommand::doApply): Updated for name changes.
1535         (WebCore::ReplaceNodeWithSpanCommand::doUnapply): Ditto.
1536         * editing/ReplaceNodeWithSpanCommand.h: Ditto.
1537
1538         * editing/ReplaceSelectionCommand.cpp:
1539         (WebCore::ReplacementFragment::ReplacementFragment): Use StyledElement for result
1540         of insertFragmentForTestRendering since that's what it returns.
1541         (WebCore::ReplacementFragment::removeNode): Use ContainerNode.
1542         (WebCore::ReplacementFragment::insertNodeBefore): Ditto.
1543         (WebCore::ReplacementFragment::insertFragmentForTestRendering): Return StyledElement.
1544         Use HTMLElement for body.
1545         (WebCore::ReplacementFragment::restoreTestRenderingNodesToFragment): Take
1546         StyledElement.
1547         (WebCore::ReplaceSelectionCommand::handleStyleSpans): Use ContainerNode.
1548         (WebCore::ReplaceSelectionCommand::copyStyleToChildren): Use HTMLElement for
1549         the cloned span, since the clone will be a sspan too.
1550         (WebCore::ReplaceSelectionCommand::insertAsListItems): Use ContainerNode since
1551         the list item has a child, and that proves it is a ContainerNode.
1552
1553         * editing/SelectionController.cpp:
1554         (WebCore::SelectionController::selectFrameElementInParentIfFullySelected):
1555         Use ContainerNode and also removed an unnneded local variable.
1556
1557         * html/HTMLElement.cpp:
1558         (WebCore::HTMLElement::setOuterText): Use ContainerNode.
1559         (WebCore::HTMLElement::insertAdjacent): Use ContainerNode and also use && to make
1560         the logic a little simpler.
1561         (WebCore::contextElementForInsertion): Use ContainerNode.
1562         (WebCore::HTMLElement::findFormAncestor): Ditto.
1563
1564         * inspector/InspectorDOMAgent.cpp:
1565         (WebCore::InspectorDOMAgent::removeNode): Use ContainerNode.
1566         (WebCore::InspectorDOMAgent::changeTagName): Ditto.
1567         (WebCore::InspectorDOMAgent::setOuterHTML): Ditto.
1568         (WebCore::InspectorDOMAgent::innerParentNode): Use isDocumentNode instead of
1569         nodeType. We should almost never use nodeType inside the engine.
1570         (WebCore::InspectorDOMAgent::didInsertDOMNode): Use ContainerNode.
1571         (WebCore::InspectorDOMAgent::didRemoveDOMNode): Ditto.
1572
1573         * wml/WMLOptGroupElement.cpp: Removed unneeded overrides of insertBefore,
1574         replaceChild, removeChild, appendChild, and removeChildren functions.
1575         Ths already overrides childrenChanged, that is called by all of the above,
1576         and it does the same thing these functions did.
1577         (WebCore::ownerSelectElement): Use ContainerNode.
1578         * wml/WMLOptGroupElement.h: Ditto.
1579
1580 2010-10-15  Ryosuke Niwa  <rniwa@webkit.org>
1581
1582         Reviewed by Darin Adler.
1583
1584         Crash in WebCore::ApplyStyleCommand::applyBlockStyle
1585         https://bugs.webkit.org/show_bug.cgi?id=47699
1586
1587         The crash was caused by applyBlockStyle's invalidly assuming that visibleStart and visibleEnd always exist.
1588         Added an early exit to the function when either visibleStart or visibleEnd is null or orphaned.
1589
1590         Test: editing/style/block-style-progress-crash.html
1591
1592         * editing/ApplyStyleCommand.cpp:
1593         (WebCore::ApplyStyleCommand::applyBlockStyle):
1594
1595 2010-10-13  Anders Carlsson  <andersca@apple.com>
1596
1597         Reviewed by Sam Weinig.
1598
1599         Add a FindIndicator class
1600         https://bugs.webkit.org/show_bug.cgi?id=47635
1601
1602         Make Gradient.h and Generator.h private headers; they're used by WebKit2.
1603
1604         * WebCore.xcodeproj/project.pbxproj:
1605
1606 2010-10-15  Sergio Villar Senin  <svillar@igalia.com>
1607
1608         Reviewed by Gustavo Noronha Silva.
1609
1610         [Soup] Should not ignore body for redirection responses
1611         https://bugs.webkit.org/show_bug.cgi?id=29299
1612
1613         Body is now provided to WebKitGtk+ in some redirections (like 302)
1614         because it could be used by servers to perform clunky redirections
1615         for example using http-equiv=REFRESH
1616
1617         Test: http/tests/navigation/redirect302-metaredirect.html
1618
1619         * platform/network/soup/ResourceHandleSoup.cpp:
1620         (WebCore::gotHeadersCallback):
1621         (WebCore::finishedCallback):
1622
1623 2010-10-15  Sergio Villar Senin  <svillar@igalia.com>
1624
1625         Reviewed by Martin Robinson.
1626
1627         [GTK] Fix introspection support
1628         https://bugs.webkit.org/show_bug.cgi?id=47723
1629
1630         WebKitSoupCacheType was incorrectly registered twice. Renamed to
1631         WebKitSoupCacheTypeType for the enumerated type.
1632
1633         * platform/network/soup/cache/webkit/soup-cache.c:
1634         (webkit_soup_cache_type_get_type):
1635
1636 2010-10-15  Ilya Tikhonovsky  <loislo@chromium.org>
1637
1638         Reviewed by Yury Semikhatsky.
1639
1640         Web Inspector: extract consoleMessages related stuff from populateScriptObjects into separate function.
1641
1642         This is a part of Inspector protocol sanitization activity.
1643         We want to populate console messages only if it is required by frontend.
1644
1645         https://bugs.webkit.org/show_bug.cgi?id=46802
1646
1647         * inspector/Inspector.idl:
1648         * inspector/InspectorController.cpp:
1649         (WebCore::InspectorController::setConsoleMessagesEnabled):
1650         (WebCore::InspectorController::addConsoleMessage):
1651         (WebCore::InspectorController::disconnectFrontend):
1652         (WebCore::InspectorController::populateScriptObjects):
1653         * inspector/InspectorController.h:
1654         * inspector/InspectorState.cpp:
1655         (WebCore::InspectorState::InspectorState):
1656         * inspector/InspectorState.h:
1657         * inspector/front-end/inspector.js:
1658         (WebInspector.doLoadedDone):
1659
1660 2010-10-15  Ryuan Choi  <ryuan.choi@samsung.com>
1661
1662         Reviewed by Nikolas Zimmermann.
1663
1664         [EFL] REGRESSION(69798) UCHAR can't be converted to String.
1665         https://bugs.webkit.org/show_bug.cgi?id=47698
1666
1667         Create String value using String(const char*, 1) instead of operator[].
1668
1669         No tests. No functionality changed.
1670
1671         * platform/efl/PlatformKeyboardEventEfl.cpp:
1672         (WebCore::createWindowsKeyMap):
1673
1674 2010-10-15  Sergio Villar Senin  <svillar@igalia.com>
1675
1676         Reviewed by Xan Lopez.
1677
1678         [GTK] Do a stricter check for invalid base64 dataURLs
1679         https://bugs.webkit.org/show_bug.cgi?id=47717
1680
1681         Restore the strict base64 decoding we added in
1682         https://bugs.webkit.org/show_bug.cgi?id=44261 and then rolled back
1683         in https://bugs.webkit.org/show_bug.cgi?id=47666 due to a failing
1684         test. The actual issue was that we were not finishing the load of
1685         the resource gracefully when an error happened.
1686
1687         Loading invalid base64-encoded data:// URLs are now handled
1688         properly.
1689
1690         * platform/network/soup/ResourceHandleSoup.cpp:
1691         (WebCore::parseDataUrl):
1692         * platform/network/soup/cache/soup-request-data.c:
1693         (webkit_soup_request_data_send):
1694
1695 2010-10-15  Alejandro G. Castro  <alex@igalia.com>
1696
1697         Reviewed by Martin Robinson.
1698
1699         compile fail with gtk >= 2.22
1700         https://bugs.webkit.org/show_bug.cgi?id=47483
1701
1702         * platform/graphics/gtk/FontGtk.cpp: Removed the shrink operation,
1703         it was added long time ago and currently it is not adding any real
1704         area to the clip vertically, actually the gtk3 shrink version did
1705         not work.
1706         (WebCore::Font::drawComplexText):
1707         * platform/gtk/gtk2drawing.c: Undef the deprecation flags, this
1708         file is full of gtk2 stuff, and it does not seem interesting to
1709         upgrade because we are already creating a new version of the file
1710         for gtk3.
1711
1712 2010-10-14  Ilya Tikhonovsky  <loislo@chromium.org>
1713
1714         Reviewed by Pavel Feldman.
1715
1716         Web Inspector: inspector settings/properties/states management
1717         should be extracted into separate class.
1718
1719         We have a lot of flags/values in InspectorController.
1720         Some flags are persisting into profile.
1721         Others are part of inspector state for frontend.
1722         All these flags should keep their values after navigation.
1723         It'd be better to extract these flags/values into separate
1724         class which will care about theirs lifetime.
1725
1726         https://bugs.webkit.org/show_bug.cgi?id=47275
1727
1728         * CMakeLists.txt:
1729         * GNUmakefile.am:
1730         * WebCore.exp.in:
1731         * WebCore.gypi:
1732         * WebCore.pro:
1733         * WebCore.vcproj/WebCore.vcproj:
1734         * WebCore.xcodeproj/project.pbxproj:
1735         * inspector/InspectorController.cpp:
1736         (WebCore::InspectorController::InspectorController):
1737         (WebCore::InspectorController::inspectorStartsAttached):
1738         (WebCore::InspectorController::setInspectorStartsAttached):
1739         (WebCore::InspectorController::setInspectorAttachedHeight):
1740         (WebCore::InspectorController::inspectorAttachedHeight):
1741         (WebCore::InspectorController::searchingForNodeInPage):
1742         (WebCore::InspectorController::resourceTrackingEnabled):
1743         (WebCore::InspectorController::saveApplicationSettings):
1744         (WebCore::InspectorController::getInspectorState):
1745         (WebCore::InspectorController::restoreInspectorStateFromCookie):
1746         (WebCore::InspectorController::getSettings):
1747         (WebCore::InspectorController::storeLastActivePanel):
1748         (WebCore::InspectorController::mouseDidMoveOverElement):
1749         (WebCore::InspectorController::handleMousePress):
1750         (WebCore::InspectorController::setSearchingForNode):
1751         (WebCore::InspectorController::setMonitoringXHREnabled):
1752         (WebCore::InspectorController::showPanel):
1753         (WebCore::InspectorController::disconnectFrontend):
1754         (WebCore::InspectorController::populateScriptObjects):
1755         (WebCore::InspectorController::restoreDebugger):
1756         (WebCore::InspectorController::restoreProfiler):
1757         (WebCore::InspectorController::getTrackedResource):
1758         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
1759         (WebCore::InspectorController::identifierForInitialRequest):
1760         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
1761         (WebCore::InspectorController::scriptImported):
1762         (WebCore::InspectorController::setResourceTrackingEnabled):
1763         (WebCore::InspectorController::ensureSettingsLoaded):
1764         (WebCore::InspectorController::startTimelineProfiler):
1765         (WebCore::InspectorController::stopTimelineProfiler):
1766         (WebCore::InspectorController::enableProfiler):
1767         (WebCore::InspectorController::disableProfiler):
1768         (WebCore::InspectorController::enableDebuggerFromFrontend):
1769         (WebCore::InspectorController::disableDebugger):
1770         (WebCore::InspectorController::loadBreakpoints):
1771         (WebCore::InspectorController::saveBreakpoints):
1772         * inspector/InspectorController.h:
1773         * inspector/InspectorFrontendClientLocal.cpp:
1774         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight):
1775         (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight):
1776         * inspector/InspectorState.cpp: Added.
1777         (WebCore::InspectorState::InspectorState):
1778         (WebCore::InspectorState::restoreFromInspectorCookie):
1779         (WebCore::InspectorState::generateStateObjectForFrontend):
1780         (WebCore::InspectorState::loadFromSettings):
1781         (WebCore::InspectorState::updateCookie):
1782         (WebCore::InspectorState::setValue):
1783         (WebCore::InspectorState::getBoolean):
1784         (WebCore::InspectorState::getString):
1785         (WebCore::InspectorState::getLong):
1786         (WebCore::InspectorState::registerBoolean):
1787         (WebCore::InspectorState::registerString):
1788         (WebCore::InspectorState::registerLong):
1789         (WebCore::InspectorState::Property::create):
1790         * inspector/InspectorState.h: Added.
1791         (WebCore::InspectorState::setBoolean):
1792         (WebCore::InspectorState::setString):
1793         (WebCore::InspectorState::setLong):
1794
1795 2010-10-14  Jia Pu  <jpu@apple.com>
1796
1797         Reviewed by Adele Peterson.
1798
1799         REGRESSION (r69548): Autocorrections are applied even after typing further characters in the word
1800         https://bugs.webkit.org/show_bug.cgi?id=47689
1801         <rdar://problem/8552250>
1802
1803         The test requires using setTimeout(). So we put it in manual-tests.
1804
1805         * editing/Editor.cpp:
1806         (WebCore::Editor::markMisspellingsAfterTypingToPosition): Relpace release() with clear().
1807         (WebCore::Editor::startCorrectionPanelTimer): Release previously set correction range before
1808           start timer for next autocorrection check.
1809         * manual-tests/autocorrection: Added.
1810         * manual-tests/autocorrection/autocorrection-cancelled-by-typing-1.html: Added.
1811
1812 2010-10-14  Ryosuke Niwa  <rniwa@webkit.org>
1813
1814         Reviewed by Tony Chang and Darin Adler.
1815
1816         execCommand FormatBlock creates lots of blockquotes
1817         https://bugs.webkit.org/show_bug.cgi?id=19795
1818
1819         The bug was caused by WebKit's not reusing the block node added by previous iteration
1820         and its inserting block node at wrong places.
1821
1822         Fixed the bug by rewriting FormatBlockCommand::formatRange.  New code resembles that of
1823         IndentOutdentCommand::indentIntoBlockquote.  The difference between two is that formatRange
1824         avoids the existing block elements when replacing blocks and it also adds a placeholder
1825         when removing the existing block caused paragraphs to collapse.
1826
1827         Also fixed a bug in moveParagraphWithClones where erroneous br is added to the start of
1828         the block element to which the paragraph is moved if the block element is the start of a paragraph
1829         and not the end of a paragraph.
1830
1831         Tests: editing/execCommand/format-block-multiple-paragraphs.html
1832                editing/execCommand/format-block-table.html
1833
1834         * editing/CompositeEditCommand.cpp:
1835         (WebCore::CompositeEditCommand::moveParagraphWithClones): No longer adds erroneous br.
1836         * editing/EditorCommand.cpp:
1837         (WebCore::executeFormatBlock):
1838         * editing/FormatBlockCommand.cpp:
1839         (WebCore::FormatBlockCommand::formatRange): Rewritten; see above.
1840         (WebCore::FormatBlockCommand::isElementToApplyInFormatBlockCommand): Renamed from validBlockElement
1841         and moved from htmlediting.cpp.
1842         (WebCore::enclosingBlockToSplitTreeTo): Added.
1843         * editing/FormatBlockCommand.h:
1844         * editing/VisiblePosition.cpp:
1845         (WebCore::enclosingBlockFlowElement): Changed the return type to Element*
1846         * editing/VisiblePosition.h:
1847
1848 2010-10-14  Justin Schuh  <jschuh@chromium.org>
1849
1850         Reviewed by James Robinson.
1851
1852         Crash in HTMLTextFormControlElement::selection()
1853         https://bugs.webkit.org/show_bug.cgi?id=47522
1854
1855         Patch by Ryosuke Niwa  <rniwa@webkit.org>
1856
1857         The bug was caused by our triggering layout inside RenderTextControl::selection.
1858         Fixed it by changing the return type of RenderTextControl::selection to PassRefPtr<Range> from VisibleSelection.
1859
1860         Test: fast/forms/render-text-crash.html
1861
1862         * editing/Editor.cpp:
1863         (WebCore::Editor::selectionForCommand): Calls HTMLTextFormControlElement::selection.
1864         * html/HTMLFormControlElement.cpp:
1865         (WebCore::HTMLTextFormControlElement::selection): Calls RenderTextControl::selection.
1866         * html/HTMLFormControlElement.h:
1867         * rendering/RenderTextControl.cpp:
1868         (WebCore::RenderTextControl::selection): Changed the return type.
1869         * rendering/RenderTextControl.h:
1870
1871 2010-10-14  James Robinson  <jamesr@chromium.org>
1872
1873         Reviewed by Simon Fraser.
1874
1875         SelectElement should check if its renderer exists after calling Element::focus()
1876         https://bugs.webkit.org/show_bug.cgi?id=47696
1877
1878         Adds null checks for element->renderer() after calling element->focus(), since focus()
1879         can dispatch an event and run arbitrary javascript that may cause the select element
1880         to lose its renderer.
1881
1882         Test: fast/forms/select-listbox-focus-displaynone.html
1883
1884         * dom/SelectElement.cpp:
1885         (WebCore::SelectElement::menuListDefaultEventHandler):
1886         (WebCore::SelectElement::listBoxDefaultEventHandler):
1887
1888 2010-10-14  Beth Dakin  <bdakin@apple.com>
1889
1890         Reviewed by Dave Hyatt.
1891
1892         This patch lays the groundwork for 
1893         https://bugs.webkit.org/show_bug.cgi?id=47514 CSS transforms should 
1894         affect scrolling
1895         by adding topmostPosition().
1896
1897         * rendering/RenderBlock.cpp:
1898         (WebCore::RenderBlock::topmostPosition):
1899         * rendering/RenderBlock.h:
1900         * rendering/RenderBox.cpp:
1901         (WebCore::RenderBox::topmostPosition):
1902         * rendering/RenderBox.h:
1903         * rendering/RenderMedia.cpp:
1904         (WebCore::RenderMedia::topmostPosition):
1905         * rendering/RenderMedia.h:
1906         * rendering/RenderTableSection.cpp:
1907         (WebCore::RenderTableSection::topmostPosition):
1908         * rendering/RenderTableSection.h:
1909
1910 2010-10-14  Sergio Villar Senin  <svillar@igalia.com>
1911
1912         Reviewed by Martin Robinson.
1913
1914         [GTK] fix compilation warnings in imported libsoup code
1915         https://bugs.webkit.org/show_bug.cgi?id=47674
1916
1917         Fixed some warnings caused by comparisons between signed and
1918         unsigned integer expressions
1919
1920         * platform/network/soup/cache/soup-directory-input-stream.c:
1921         (webkit_soup_directory_input_stream_read):
1922         * platform/network/soup/cache/soup-request-data.c:
1923         (webkit_soup_request_data_send):
1924         * platform/network/soup/cache/soup-request-file.c:
1925         (webkit_soup_request_file_ensure_file):
1926         * platform/network/soup/cache/webkit/soup-cache.c:
1927         (webkit_soup_cache_entry_is_fresh_enough):
1928         (webkit_soup_cache_has_response):
1929
1930 2010-10-14  Andreas Kling  <kling@webkit.org>
1931
1932         Unreviewed buildfix, RetainPtr is a mac thing..
1933
1934         * platform/network/soup/ProxyServerSoup.cpp:
1935
1936 2010-10-08  Martin Robinson  <mrobinson@igalia.com>
1937
1938         Reviewed by Xan Lopez.
1939
1940         [GTK] Form controls do not respect GTK+ font size
1941         https://bugs.webkit.org/show_bug.cgi?id=47134
1942
1943         Have form controls use the font specified in GtkSettings. This font is
1944         the default control font in GTK+ applications and Firefox. We need to
1945         pass the string through Pango to get a valid font name and size.
1946
1947         * platform/gtk/RenderThemeGtk.cpp:
1948         (WebCore::getScreenDPI): A helper function which returns
1949         the DPI of the default screen or 96 as a fallback.
1950         (WebCore::RenderThemeGtk::systemFont): Calculate the system font
1951         by looking at the GtkSettings value and pushing it through Pango
1952         to get the font family and font size.
1953
1954 2010-10-14  Andreas Kling  <kling@webkit.org>
1955
1956         Soup buildfix for r69808: add ProxyServer stub.
1957
1958         * GNUmakefile.am:
1959         * platform/network/soup/ProxyServerSoup.cpp: Added.
1960         (WebCore::proxyServersForURL):
1961
1962 2010-10-14  Andreas Kling  <kling@webkit.org>
1963
1964         Fix GTK+ build after r69808.
1965
1966         * GNUmakefile.am:
1967         * platform/network/curl/ProxyServerCurl.cpp:
1968         (WebCore::proxyServersForURL):
1969
1970 2010-10-14  Simon Fraser  <simon.fraser@apple.com>
1971
1972         Another build fix. Export FrameLoader::networkingContext()
1973
1974         * WebCore.exp.in:
1975
1976 2010-10-14  Simon Fraser  <simon.fraser@apple.com>
1977
1978         Fix the build after r69808.
1979         
1980         * WebCore.xcodeproj/project.pbxproj:
1981         * platform/network/cf/ProxyServerCFNet.cpp:
1982         (WebCore::proxyServersForURL):
1983
1984 2010-10-14  Gavin Barraclough  <barraclough@apple.com>
1985
1986         Windows build fix following r69806.
1987
1988         * platform/win/ClipboardUtilitiesWin.cpp:
1989         (WebCore::markupToCFHTML):
1990
1991 2010-10-14  Dawit Alemayehu  <adawit@kde.org>
1992
1993         Reviewed by Andreas Kling
1994
1995         Implemented NPN_GetValueForURL and NPN_SetValueForURL and NPN_GetAuthenticationInfo.
1996         https://bugs.webkit.org/show_bug.cgi?id=34539
1997
1998         These missing NPN functions cause Java applets to crash in ports such
1999         as QtWebkit that rely on webkit for Java applet support.
2000
2001         * plugins/PluginDebug.cpp:
2002         (WebCore::prettyNameForNPNURLVariable):
2003         * plugins/PluginDebug.h:
2004         * plugins/PluginPackage.cpp:
2005         (WebCore::PluginPackage::initializeBrowserFuncs):
2006         * plugins/PluginView.cpp:
2007         (WebCore::PluginView::getValueForURL):
2008         (WebCore::PluginView::setValueForURL):
2009         (WebCore::PluginView::getAuthenticationInfo):
2010         * plugins/PluginView.h:
2011         * plugins/npapi.cpp:
2012         (NPN_GetValueForURL):
2013         (NPN_SetValueForURL):
2014         (NPN_GetAuthenticationInfo):
2015         * platform/network/ProxyServer.h:
2016         * platform/network/cf/ProxyServerCFNet.cpp:
2017         (WebCore::proxyServersForURL):
2018         * platform/network/qt/ProxyServerQt.cpp:
2019         (WebCore::proxyServersForURL):
2020  
2021 2010-10-14  Gavin Barraclough  <barraclough@apple.com>
2022
2023         Windows build fix following r69806.
2024
2025         * platform/win/ClipboardUtilitiesWin.cpp:
2026         (WebCore::markupToCFHTML):
2027
2028 2010-10-14  Zhenyao Mo  <zmo@google.com>
2029
2030         Reviewed by Kenneth Russell.
2031
2032         Cache link status at linkProgram and use it in useProgram instead of querying GPU
2033         https://bugs.webkit.org/show_bug.cgi?id=47685
2034
2035         * html/canvas/WebGLProgram.cpp: Always cache link status at linkStatus and use it upon query.
2036         (WebCore::WebGLProgram::WebGLProgram):
2037         * html/canvas/WebGLProgram.h: Ditto.
2038         (WebCore::WebGLProgram::getLinkStatus):
2039         (WebCore::WebGLProgram::setLinkStatus):
2040         * html/canvas/WebGLRenderingContext.cpp: Ditto.
2041         (WebCore::WebGLRenderingContext::getProgramParameter):
2042         (WebCore::WebGLRenderingContext::linkProgram):
2043         (WebCore::WebGLRenderingContext::useProgram):
2044
2045 2010-10-14  Justin Schuh  <jschuh@chromium.org>
2046
2047         Reviewed by James Robinson.
2048
2049         Style fix for r69735
2050         https://bugs.webkit.org/show_bug.cgi?id=47684
2051
2052         No logic change. Existing tests apply.
2053
2054         * rendering/RootInlineBox.cpp:
2055         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
2056
2057 2010-10-14  Yury Semikhatsky  <yurys@chromium.org>
2058
2059         Reviewed by Pavel Feldman.
2060
2061         Web Inspector: encapsulate ScriptState into ConsoleMessage instead of passing it as additional parameter
2062         https://bugs.webkit.org/show_bug.cgi?id=47675
2063
2064         No new tests. This refactoring is covered by existing inspector tests.
2065
2066         * bindings/js/JSConsoleCustom.cpp:
2067         * bindings/js/ScriptCallFrame.cpp:
2068         * bindings/js/ScriptCallFrame.h:
2069         (WebCore::ScriptCallFrame::functionName):
2070         (WebCore::ScriptCallFrame::sourceURL):
2071         (WebCore::ScriptCallFrame::lineNumber):
2072         (WebCore::ScriptCallFrame::argumentCount):
2073         * inspector/ConsoleMessage.cpp:
2074         (WebCore::ConsoleMessage::isEqual):
2075         * inspector/ConsoleMessage.h:
2076         * inspector/InspectorController.cpp:
2077         (WebCore::InspectorController::addMessageToConsole):
2078         (WebCore::InspectorController::addConsoleMessage):
2079         (WebCore::InspectorController::startGroup):
2080         (WebCore::InspectorController::endGroup):
2081         * inspector/InspectorController.h:
2082
2083 2010-10-14  Nikolas Zimmermann  <nzimmermann@rim.com>
2084
2085         Reviewed by Gavin Barraclough.
2086
2087         Replace lots of String::format() usages by StringConcatenate
2088         https://bugs.webkit.org/show_bug.cgi?id=47664
2089
2090         * ForwardingHeaders/wtf/text/StringConcatenate.h: Added.
2091         * bindings/js/JSDOMWindowBase.cpp:
2092         (WebCore::JSDOMWindowBase::crossDomainAccessErrorMessage):
2093         * bindings/v8/V8Proxy.cpp:
2094         (WebCore::V8Proxy::reportUnsafeAccessTo):
2095         * dom/ExceptionBase.cpp:
2096         (WebCore::ExceptionBase::ExceptionBase):
2097         * dom/XMLDocumentParser.cpp:
2098         (WebCore::XMLDocumentParser::handleError):
2099         * history/PageCache.cpp:
2100         (WebCore::logCanCacheFrameDecision):
2101         * html/FTPDirectoryDocument.cpp:
2102         (WebCore::processFileDateString):
2103         * inspector/CodeGeneratorInspector.pm:
2104         * inspector/InspectorController.cpp:
2105         (WebCore::InspectorController::didReceiveResponse):
2106         (WebCore::InspectorController::count):
2107         * inspector/InspectorDOMAgent.cpp:
2108         (WebCore::InspectorDOMAgent::createBreakpointId):
2109         * inspector/InspectorDebuggerAgent.cpp:
2110         (WebCore::formatBreakpointId):
2111         * inspector/InspectorProfilerAgent.cpp:
2112         (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole):
2113         (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole):
2114         (WebCore::InspectorProfilerAgent::getCurrentUserInitiatedProfileName):
2115         (WebCore::InspectorProfilerAgent::takeHeapSnapshot):
2116         * loader/CachedResourceLoader.cpp:
2117         (WebCore::CachedResourceLoader::printAccessDeniedMessage):
2118         * loader/FrameLoader.cpp:
2119         (WebCore::FrameLoader::checkIfDisplayInsecureContent):
2120         (WebCore::FrameLoader::checkIfRunInsecureContent):
2121         (WebCore::FrameLoader::shouldAllowNavigation):
2122         * loader/archive/cf/LegacyWebArchive.cpp:
2123         (WebCore::LegacyWebArchive::createFromSelection):
2124         * page/DOMWindow.cpp:
2125         (WebCore::DOMWindow::postMessageTimerFired):
2126         * page/PrintContext.cpp:
2127         (WebCore::PrintContext::pageProperty):
2128         (WebCore::PrintContext::pageSizeAndMarginsInPixels):
2129         * page/XSSAuditor.cpp:
2130         (WebCore::XSSAuditor::canLoadObject):
2131         * platform/efl/PlatformKeyboardEventEfl.cpp:
2132         (WebCore::createKeyMap):
2133         (WebCore::createWindowsKeyMap):
2134         * platform/graphics/GraphicsLayer.cpp:
2135         (WebCore::GraphicsLayer::animationNameForTransition):
2136         * platform/graphics/brew/ImageBrew.cpp:
2137         (WebCore::Image::loadPlatformResource):
2138         * platform/graphics/cg/ImageBufferCG.cpp:
2139         (WebCore::ImageBuffer::toDataURL):
2140         * platform/graphics/efl/ImageEfl.cpp:
2141         (WebCore::loadResourceSharedBuffer):
2142         * platform/graphics/gtk/ImageBufferGtk.cpp:
2143         (WebCore::ImageBuffer::toDataURL):
2144         * platform/graphics/haiku/ImageBufferHaiku.cpp:
2145         (WebCore::ImageBuffer::toDataURL):
2146         * platform/graphics/mac/GraphicsLayerCA.mm:
2147         (WebCore::animationIdentifier):
2148         * platform/graphics/qt/ImageBufferQt.cpp:
2149         (WebCore::ImageBuffer::toDataURL):
2150         * platform/graphics/skia/ImageBufferSkia.cpp:
2151         (WebCore::ImageBuffer::toDataURL):
2152         * platform/graphics/win/WebLayer.cpp:
2153         (WebCore::WebLayer::drawInContext):
2154         * platform/network/CredentialStorage.cpp:
2155         (WebCore::originStringFromURL):
2156         * platform/sql/SQLiteDatabase.cpp:
2157         (WebCore::SQLiteDatabase::setSynchronous):
2158         * platform/text/wince/TextCodecWinCE.cpp:
2159         (WebCore::LanguageManager::LanguageManager):
2160         * platform/win/ClipboardUtilitiesWin.cpp:
2161         (WebCore::markupToCFHTML):
2162         * platform/win/Language.cpp:
2163         (WebCore::defaultLanguage):
2164         * plugins/PluginStream.cpp:
2165         (WebCore::PluginStream::startStream):
2166         * svg/SVGUseElement.cpp:
2167         (WebCore::dumpInstanceTree):
2168         * websockets/WebSocket.cpp:
2169         (WebCore::WebSocket::connect):
2170         * websockets/WebSocketChannel.cpp:
2171         (WebCore::WebSocketChannel::appendToBuffer):
2172         * websockets/WebSocketHandshake.cpp:
2173         (WebCore::WebSocketHandshake::readServerHandshake):
2174
2175 2010-10-14  Xan Lopez  <xlopez@igalia.com>
2176
2177         Reviewed by Martin Robinson.
2178
2179         [GTK] Small cleanup in PluginViewGtk
2180         https://bugs.webkit.org/show_bug.cgi?id=47588
2181
2182         Remove some dead code and use PlatformRefPtr for cairo surfaces.
2183
2184         No new tests, only refactoring.
2185
2186         * plugins/gtk/PluginViewGtk.cpp:
2187         (WebCore::PluginView::paint):
2188
2189 2010-10-14  Dawit Alemayehu  <adawit@kde.org>
2190
2191         Reviewed by Andreas Kling.
2192
2193         Fix compile error when bulding webkit's Qt port using the "--v8" option.
2194         https://bugs.webkit.org/show_bug.cgi?id=47455
2195
2196         * platform/qt/PlatformBridge.h:
2197
2198 2010-10-01  Martin Robinson  <mrobinson@igalia.com>
2199
2200         Reviewed by Holger Freyther.
2201
2202         [GTK] REGRESSION: FreeType backend does not respect XSettings font settings after r68558
2203         https://bugs.webkit.org/show_bug.cgi?id=47033
2204
2205         Fix logic that merges XSettings defaults and FontConfig settings. If
2206         FontConfig or XSettings specifies a subpixel order, we force subpixel
2207         anti-aliasing on. If anti-aliasing is turned on explicitly, only
2208         override the setting if it was previously off, otherwise we ignore
2209         the user's preference for subpixel or gray antialiasing.
2210
2211         Test: platform/gtk/fonts/xsettings_antialias_settings.html
2212
2213         * platform/graphics/cairo/FontPlatformDataFreeType.cpp:
2214         (WebCore::setCairoFontOptionsFromFontConfigPattern): Fix merging of XSettings
2215         and FontConfig anti-aliasing settings.
2216         (WebCore::getDefaultFontOptions): Added this helper.
2217         (WebCore::FontPlatformData::FontPlatformData): Use the getDefaultFontOptions helper.
2218
2219 2010-10-14  Jian Li  <jianli@chromium.org>
2220
2221         Reviewed by David Levin.
2222
2223         Support typed arrays in workers
2224         https://bugs.webkit.org/show_bug.cgi?id=47616
2225
2226         To support typed arrays in workers, we need to expose constructors in
2227         WorkerContext and add NoStaticTables attribute.
2228
2229         I also add File API feature guard to the constructors defined in
2230         DOMWindow.
2231
2232         * bindings/js/JSDOMWindowCustom.cpp: Add File API feature guard to the
2233         constructors defined in DOMWindow.
2234         * html/canvas/ArrayBuffer.idl: Add NoStaticTables attribute.
2235         * html/canvas/ArrayBufferView.idl: Add NoStaticTables attribute.
2236         * html/canvas/Float32Array.idl: Add NoStaticTables attribute.
2237         * html/canvas/Int16Array.idl: Add NoStaticTables attribute.
2238         * html/canvas/Int32Array.idl: Add NoStaticTables attribute.
2239         * html/canvas/Int8Array.idl: Add NoStaticTables attribute.
2240         * html/canvas/Uint16Array.idl: Add NoStaticTables attribute.
2241         * html/canvas/Uint32Array.idl: Add NoStaticTables attribute.
2242         * html/canvas/Uint8Array.idl: Add NoStaticTables attribute.
2243         * page/DOMWindow.idl: Add File API feature guard to the constructors
2244         defined in DOMWindow.
2245         * workers/WorkerContext.idl: Expose type array constructors.
2246
2247 2010-10-14  Andreas Kling  <kling@webkit.org>
2248
2249         Reviewed by Ariya Hidayat.
2250
2251         [Qt] Avoid creating empty transparency layers in ImageBuffer::clip()
2252
2253         We were creating empty layers for sub-1 height/width clips due to
2254         using IntRect(FloatRect) instead of enclosingIntRect().
2255         This lead to a bunch of QPainter warnings on the console since you
2256         can't draw on an empty QPixmap.
2257
2258         * platform/graphics/qt/ImageBufferQt.cpp:
2259         (WebCore::ImageBuffer::clip):
2260
2261 2010-10-14  Holger Hans Peter Freyther  <holger@moiji-mobile.com>
2262
2263         Reviewed by Martin Robinson.
2264
2265         [cairo] Typo in determining fixed width fonts
2266         https://bugs.webkit.org/show_bug.cgi?id=47470
2267
2268         It must be a single ampersand otherwise the
2269         && FT_FACE_FLAG_FIXED_WIDTH will always be true.
2270
2271         * platform/graphics/cairo/FontPlatformDataFreeType.cpp:
2272         (WebCore::FontPlatformData::FontPlatformData):
2273
2274 2010-10-14  Sergio Villar Senin  <svillar@igalia.com>
2275
2276         Reviewed by Xan Lopez.
2277
2278         [GTK] Failing test LayoutTests/editing/undo/orphaned-selection-crash-bug32823-2.html
2279         https://bugs.webkit.org/show_bug.cgi?id=47666
2280
2281         Do a less strict decoding of base64 data url's as it was done
2282         before. The actual problem is most likely
2283         https://bugs.webkit.org/show_bug.cgi?id=47661 tough.
2284
2285         * platform/network/soup/cache/soup-request-data.c:
2286         (webkit_soup_request_data_send):
2287
2288 2010-10-14  Renata Hodovan  <reni@inf.u-szeged.hu>
2289
2290         Reviewed by Andreas Kling.
2291
2292         SVGFEConvolveMatrixElement doesn't support dynamic invalidation, when attributes change.
2293         https://bugs.webkit.org/show_bug.cgi?id=47660
2294
2295         The dynamic changes are captured by the svgAttributeChange function, and invalidate the filter primitive if necessary.
2296         The patch also implements the simple setOrder and setKernelUnitLength methods.
2297
2298         Tests: svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-bias-attr.html
2299                svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-divisor-attr.html
2300                svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-edgeMode-attr.html
2301                svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-in-attr.html
2302                svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-kernelMatrix-attr.html
2303                svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-kernelUnitLength-attr.html
2304                svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-order-attr.html
2305                svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-preserveAlpha-attr.html
2306                svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetX-attr.html
2307                svg/dynamic-updates/SVGFEConvolveMatrixElement-dom-targetY-attr.html
2308
2309         * svg/SVGFEConvolveMatrixElement.cpp:
2310         (WebCore::SVGFEConvolveMatrixElement::setOrder):
2311         (WebCore::SVGFEConvolveMatrixElement::setKernelUnitLength):
2312         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged):
2313         * svg/SVGFEConvolveMatrixElement.h:
2314
2315 2010-10-14  No'am Rosenthal  <noam.rosenthal@nokia.com>
2316
2317         Reviewed by Andreas Kling.
2318
2319         [Qt] Text breaking is slow: enable ICU as an opt-in
2320         https://bugs.webkit.org/show_bug.cgi?id=40332
2321
2322         Added a config flag that enables ICU as an opt-in instead of the Qt specific code.
2323
2324         No new tests, this should be covered by existing tests.
2325
2326         * WebCore.pro:
2327         * platform/text/qt/TextBreakIteratorQt.cpp:
2328         (WebCore::currentTextBreakLocaleID):
2329
2330 2010-10-14  No'am Rosenthal  <noam.rosenthal@nokia.com>
2331
2332         Reviewed by Kenneth Rohde Christiansen.
2333
2334         [Texmap] [Qt] Texture mapper initial implementation
2335         https://bugs.webkit.org/show_bug.cgi?id=47070
2336
2337         This patch enables compilation of TextureMapper with Media. It has an initial non-working implementation of a video layer, to be integrated
2338         once other parts of TextureMapper are fully working.
2339
2340         No new tests: this is new implementation that's not enabled yet.
2341
2342         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
2343         (WebCore::TextureMapperVideoLayerQt::TextureMapperVideoLayerQt):
2344         (WebCore::TextureMapperVideoLayerQt::setPlatformLayerClient):
2345         (WebCore::TextureMapperVideoLayerQt::paint):
2346         (WebCore::TextureMapperVideoLayerQt::size):
2347         (WebCore::MediaPlayerPrivateQt::acceleratedRenderingStateChanged):
2348         (WebCore::MediaPlayerPrivateQt::platformLayer):
2349         * platform/graphics/qt/MediaPlayerPrivateQt.h:
2350         (WebCore::MediaPlayerPrivateQt::supportsAcceleratedRendering):
2351         (WebCore::MediaPlayerPrivateQt::acceleratedRenderingStateChanged):
2352         (WebCore::MediaPlayerPrivateQt::platformLayer):
2353
2354 2010-10-14  Alejandro G. Castro  <alex@igalia.com>
2355
2356         Reviewed by Martin Robinson.
2357
2358         Fixed crashes in the GTK 64bits bot, we have to use NULL instead
2359         of 0 when calling these glib APIs, 0 is compiled as a char and in
2360         64bits systems it is not correct.
2361
2362         * platform/network/soup/cache/soup-requester.c:
2363         (webkit_soup_requester_new):
2364         (webkit_soup_requester_request_uri):
2365
2366 2010-10-14  Daniel Bates  <dbates@rim.com>
2367
2368         Attempt to fix the Qt and GTK builds based on the build bot results from <http://webkit.sed.hu>.
2369
2370         * rendering/RenderInline.cpp: Include header "RenderTheme.h"
2371
2372 2010-10-14  Daniel Bates  <dbates@rim.com>
2373
2374         Reviewed by Darin Adler.
2375
2376         Only draw focus ring in RenderInline and RenderImage if the theme
2377         is not able to draw a focus ring
2378         https://bugs.webkit.org/show_bug.cgi?id=47632
2379
2380         Fixes an issue where RenderInline::paintOutline() and RenderImage::paintFocusRings()
2381         would draw a focus ring regardless of whether the port-specific theme is able to
2382         draw a focus ring. Instead, these methods should only draw a focus ring if the
2383         theme is unable to draw a focus ring.
2384
2385         Also, extracted common focus ring drawing code from RenderObject::paintOutline()
2386         and RenderInline::paintOutline() into RenderObject::paintFocusRing().
2387
2388         Tests: fast/forms/textfield-focus-ring.html
2389                fast/images/imagemap-focus-ring.html
2390                fast/inline/inline-focus-ring.html
2391
2392         * rendering/RenderImage.cpp:
2393         (WebCore::RenderImage::paintFocusRings): Modified to only draw a focus ring if the
2394         the theme does not draw one.
2395         * rendering/RenderInline.cpp:
2396         (WebCore::RenderInline::paintOutline): Modified to call RenderObject::paintFocusRing().
2397         * rendering/RenderObject.cpp:
2398         * rendering/RenderObject.cpp:
2399         (WebCore::RenderObject::paintFocusRing): Added.
2400         (WebCore::RenderObject::paintOutline): Modified to call RenderObject::paintFocusRing().
2401         * rendering/RenderObject.h:
2402
2403 2010-10-14  Pavel Feldman  <pfeldman@chromium.org>
2404
2405         Reviewed by Yury Semikhatsky.
2406
2407         Web Inspector: Move load and dom content event timers into InspectorController.
2408         https://bugs.webkit.org/show_bug.cgi?id=47668
2409
2410         * inspector/CodeGeneratorInspector.pm:
2411         * inspector/Inspector.idl:
2412         * inspector/InspectorController.cpp:
2413         (WebCore::InspectorController::InspectorController):
2414         (WebCore::InspectorController::populateScriptObjects):
2415         (WebCore::InspectorController::mainResourceFiredDOMContentEvent):
2416         (WebCore::InspectorController::mainResourceFiredLoadEvent):
2417         * inspector/InspectorController.h:
2418         * inspector/InspectorResource.cpp:
2419         (WebCore::InspectorResource::InspectorResource):
2420         (WebCore::InspectorResource::updateScriptObject):
2421         * inspector/InspectorResource.h:
2422         * inspector/front-end/inspector.js:
2423         (WebInspector.updateResource):
2424         (WebInspector.domContentEventFired):
2425         (WebInspector.loadEventFired):
2426
2427 2010-10-14  Pavel Feldman  <pfeldman@chromium.org>
2428
2429         Not reviewed. Re-landing r69757.
2430
2431 2010-10-14  Pavel Podivilov  <podivilov@chromium.org>
2432
2433         Reviewed by Pavel Feldman.
2434
2435         Web Inspector: implement pausing on window events and timeouts
2436         https://bugs.webkit.org/show_bug.cgi?id=47542
2437
2438         * inspector/InspectorInstrumentation.cpp:
2439         (WebCore::InspectorInstrumentation::didInstallTimerImpl):
2440         (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
2441         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
2442         (WebCore::InspectorInstrumentation::didDispatchEventImpl):
2443         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
2444         (WebCore::InspectorInstrumentation::didDispatchEventOnWindowImpl):
2445         (WebCore::InspectorInstrumentation::willFireTimerImpl):
2446         (WebCore::InspectorInstrumentation::didFireTimerImpl):
2447         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
2448         (WebCore::InspectorInstrumentation::cancelPauseOnNativeEvent):
2449         * inspector/InspectorInstrumentation.h:
2450         * inspector/front-end/BreakpointManager.js:
2451         (WebInspector.EventListenerBreakpoint.prototype.populateLabelElement):
2452         (WebInspector.EventListenerBreakpoint.prototype.populateStatusMessageElement):
2453         (WebInspector.EventListenerBreakpoint.prototype._condition):
2454         (WebInspector.EventListenerBreakpoint.prototype._uiEventName):
2455         * inspector/front-end/BreakpointsSidebarPane.js:
2456         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._populate):
2457
2458 2010-10-14  Csaba Osztrogon√°c  <ossy@webkit.org>
2459
2460         Reviewed by Andreas Kling.
2461
2462         Canvas: "currentColor" should inherit the canvas element's color
2463         https://bugs.webkit.org/show_bug.cgi?id=40273
2464
2465         Warning fix after r69755. Missing default cases added.
2466
2467         * html/canvas/CanvasStyle.cpp:
2468         (WebCore::parseColorOrCurrentColor):
2469         (WebCore::CanvasStyle::createFromString):
2470         (WebCore::CanvasStyle::createFromStringWithOverrideAlpha):
2471
2472 2010-10-14  Pavel Feldman  <pfeldman@chromium.org>
2473
2474         Not reviewed. Rolling out r69757.
2475
2476 2010-10-08  Pavel Feldman  <pfeldman@chromium.org>
2477
2478         Reviewed by Yury Semikhatsky.
2479
2480         Web Inspector: extract content-related methods into InspectorResourceAgent.
2481         https://bugs.webkit.org/show_bug.cgi?id=47415
2482
2483         This is needed for resource-tracking-less operation of resources panel.
2484
2485         * CMakeLists.txt:
2486         * GNUmakefile.am:
2487         * WebCore.gypi:
2488         * WebCore.pro:
2489         * inspector/InspectorCSSAgent.cpp:
2490         * inspector/InspectorResource.cpp:
2491         (WebCore::InspectorResource::type):
2492         (WebCore::InspectorResource::sourceString):
2493         (WebCore::InspectorResource::sourceBytes):
2494         * inspector/InspectorResource.h:
2495         * inspector/InspectorResourceAgent.cpp: Added.
2496         (WebCore::InspectorResourceAgent::resourceContent):
2497         (WebCore::InspectorResourceAgent::resourceContentBase64):
2498         (WebCore::InspectorResourceAgent::resourceData):
2499         (WebCore::InspectorResourceAgent::cachedResourceType):
2500         (WebCore::InspectorResourceAgent::cachedResource):
2501         * inspector/InspectorResourceAgent.h: Added.
2502         * inspector/InspectorStyleSheet.cpp:
2503         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
2504         * inspector/InspectorUtilities.cpp: Removed.
2505         * inspector/InspectorUtilities.h: Removed.
2506
2507 2010-10-14  Andreas Kling  <kling@webkit.org>
2508
2509         Reviewed by Darin Adler.
2510
2511         Canvas: "currentColor" should inherit the canvas element's color
2512         https://bugs.webkit.org/show_bug.cgi?id=40273
2513
2514         Add support for "currentColor" in CanvasRenderingContext2D APIs.
2515         If the canvas is in-document, "currentColor" is replaced by canvas.style.color,
2516         otherwise we use fully opaque black.
2517
2518         For gradient addColorStop(), "currentColor" always means fully opaque black.
2519
2520         Spec link:
2521         http://www.whatwg.org/specs/web-apps/current-work/#2dcontext
2522
2523         Test: fast/canvas/canvas-currentColor.html
2524
2525         * html/canvas/CanvasGradient.cpp:
2526         (WebCore::CanvasGradient::addColorStop):
2527         * html/canvas/CanvasRenderingContext2D.cpp:
2528         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
2529         (WebCore::CanvasRenderingContext2D::setFillStyle):
2530         (WebCore::CanvasRenderingContext2D::setShadowColor):
2531         (WebCore::CanvasRenderingContext2D::setShadow):
2532         * html/canvas/CanvasStyle.cpp:
2533         (WebCore::parseColor):
2534         (WebCore::currentColor):
2535         (WebCore::parseColorOrCurrentColor):
2536         (WebCore::CanvasStyle::CanvasStyle):
2537         (WebCore::CanvasStyle::createFromString):
2538         (WebCore::CanvasStyle::createFromStringWithOverrideAlpha):
2539         (WebCore::CanvasStyle::isEquivalentColor):
2540         (WebCore::CanvasStyle::applyStrokeColor):
2541         (WebCore::CanvasStyle::applyFillColor):
2542         * html/canvas/CanvasStyle.h:
2543         (WebCore::CanvasStyle::isCurrentColor):
2544         (WebCore::CanvasStyle::hasOverrideAlpha):
2545         (WebCore::CanvasStyle::overrideAlpha):
2546
2547 2010-10-08  Yury Semikhatsky  <yurys@chromium.org>
2548
2549         Reviewed by Pavel Feldman.
2550
2551         Web Inspector: [REGRESSION] Scripts panel: the bubble shows wrong values
2552         https://bugs.webkit.org/show_bug.cgi?id=47358
2553
2554         Test: inspector/debugger-eval-on-call-frame.html
2555
2556         * inspector/front-end/InjectedScript.js:
2557         (injectedScriptConstructor.): don't embrace expression evaluated in the local scope
2558         of a call frame into with(window) to avoid shadowing local variables by global ones.
2559
2560 2010-10-13  Adam Barth  <abarth@webkit.org>
2561
2562         Reviewed by Darin Adler.
2563
2564         Implement getParameter from the URL API
2565         https://bugs.webkit.org/show_bug.cgi?id=46610
2566
2567         Another API from
2568         https://docs.google.com/document/edit?id=1r_VTFKApVOaNIkocrg0z-t7lZgzisTuGTXkdzAk4gLU&hl=en#
2569         getParameter lets a web site easily read the value of a URL parameter.
2570         This API is for the simple case of a non-repeated parameter name.
2571         getParameterAll will handle repeated parameter names in a future patch.
2572
2573         Tests: fast/dom/anchor-getParameter.html
2574                http/tests/misc/location-getParameter.html
2575
2576         * html/HTMLAnchorElement.cpp:
2577         (WebCore::HTMLAnchorElement::getParameter):
2578         * html/HTMLAnchorElement.h:
2579         * html/HTMLAnchorElement.idl:
2580         * page/Location.cpp:
2581         (WebCore::Location::getParameter):
2582         * page/Location.h:
2583         * page/Location.idl:
2584         * platform/KURL.cpp:
2585         (WebCore::KURL::copyParsedQueryTo):
2586         * platform/KURLGoogle.cpp:
2587         (WebCore::KURL::copyParsedQueryTo):
2588         * platform/KURL.h:
2589
2590 2010-10-14  Alejandro G. Castro  <alex@igalia.com>
2591
2592         Unreviewed. GTK build fix.
2593
2594         * platform/network/soup/ResourceHandleSoup.cpp:
2595         (WebCore::sendRequestCallback):
2596
2597 2010-10-14  Adrienne Walker  <enne@google.com>
2598
2599         Reviewed by James Robinson.
2600
2601         Add a short-term solution for large layers.  Layers that are too
2602         large to be contained in a single texture just upload the portion of
2603         the layer that is within the content rect.  A longer-term solution
2604         is still tiling with proper memory management.  Layers that have full
2605         3D transforms (more than just translations) are still not drawn.
2606         https://bugs.webkit.org/show_bug.cgi?id=47016
2607
2608         Test: compositing/tiling
2609
2610         * platform/graphics/chromium/ContentLayerChromium.cpp:
2611         (WebCore::ContentLayerChromium::ContentLayerChromium):
2612         (WebCore::ContentLayerChromium::requiresClippedUpdateRect):
2613         (WebCore::ContentLayerChromium::calculateClippedUpdateRect):
2614         (WebCore::ContentLayerChromium::updateContents):
2615         (WebCore::ContentLayerChromium::updateTextureRect):
2616         (WebCore::ContentLayerChromium::draw):
2617         * platform/graphics/chromium/ContentLayerChromium.h:
2618         * platform/graphics/chromium/ImageLayerChromium.cpp:
2619         (WebCore::ImageLayerChromium::updateContents):
2620         * platform/graphics/chromium/LayerRendererChromium.cpp:
2621         (WebCore::LayerRendererChromium::drawLayers):
2622         * platform/graphics/chromium/LayerRendererChromium.h:
2623         (WebCore::LayerRendererChromium::rootLayerContentRect):
2624
2625 2010-10-14  Chris Rogers  <crogers@google.com>
2626
2627         Reviewed by Chris Fleizach.
2628
2629         Add DelayDSPKernel files
2630         https://bugs.webkit.org/show_bug.cgi?id=47518
2631
2632         No new tests since audio API is not yet implemented.
2633
2634         * webaudio/DelayDSPKernel.cpp: Added.
2635         (WebCore::DelayDSPKernel::DelayDSPKernel):
2636         (WebCore::DelayDSPKernel::process):
2637         (WebCore::DelayDSPKernel::reset):
2638         * webaudio/DelayDSPKernel.h: Added.
2639         (WebCore::DelayDSPKernel::maxDelayTime):
2640         (WebCore::DelayDSPKernel::setDelayFrames):
2641         (WebCore::DelayDSPKernel::delayProcessor):
2642
2643 2010-10-13  Sergio Villar Senin  <svillar@igalia.com>
2644
2645         Reviewed by Martin Robinson.
2646
2647         WebKitGtk+ to use the new API from the imported SoupURILoader code
2648
2649         [GTK] Add HTTP caching support
2650         https://bugs.webkit.org/show_bug.cgi?id=44261
2651
2652         ResourceHandleSoup now does everything via SoupURILoader. This means
2653         that all URLs are handled via the same code path, where WebCore simply
2654         asks libsoup for a WebKitSoupRequest and the request returns an input
2655         stream. Many of ResourceHandleSoup's data members are now PlatformRefPtr
2656         as well, to simplify reference counting
2657
2658         * platform/network/ResourceHandleInternal.h:
2659         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
2660         * platform/network/soup/ResourceHandleSoup.cpp:
2661         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
2662         (WebCore::ResourceHandle::~ResourceHandle):
2663         (WebCore::restartedCallback):
2664         (WebCore::gotChunkCallback):
2665         (WebCore::parseDataUrl):
2666         (WebCore::cleanupSoupRequestOperation):
2667         (WebCore::sendRequestCallback):
2668         (WebCore::startHttp):
2669         (WebCore::ResourceHandle::start):
2670         (WebCore::ResourceHandle::cancel):
2671         (WebCore::closeCallback):
2672         (WebCore::readCallback):
2673         (WebCore::startGio):
2674         * platform/network/soup/ResourceRequest.h:
2675         * platform/network/soup/ResourceRequestSoup.cpp:
2676         (WebCore::ResourceRequest::updateSoupMessage):
2677
2678 2010-10-12  Abhishek Arya  <inferno@chromium.org>
2679
2680         Reviewed by Darin Adler.
2681
2682         Prevent block logical height of a root inline box from overflowing by clamping it
2683         at INT_MAX. Otherwise, we will not be able to properly dirty the set of lines during
2684         removal a floating object.
2685         https://bugs.webkit.org/show_bug.cgi?id=45611        
2686
2687         Test: fast/overflow/overflow-block-logical-height-crash.html
2688
2689         * rendering/RootInlineBox.cpp:
2690         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
2691
2692 2010-10-13  James Robinson  <jamesr@chromium.org>
2693
2694         Reviewed by Darin Adler.
2695
2696         Throw INDEX_SIZE_ERR exception if createRadialGradient is called with a negative radius
2697         Canvas: radialGradient with negative radius should throw exception
2698         https://bugs.webkit.org/show_bug.cgi?id=37176
2699
2700         This matches the canvas 2d specification, Opera, IE9 beta and our behavior for arc()
2701         and arcTo().  Also fixes some PassRefPtr/RefPtr errors in this file.
2702
2703         Test: canvas/philip/tests/2d.gradient.radial.negative.html
2704
2705         * html/canvas/CanvasRenderingContext2D.cpp:
2706         (WebCore::CanvasRenderingContext2D::createLinearGradient):
2707         (WebCore::CanvasRenderingContext2D::createRadialGradient):
2708         (WebCore::createEmptyImageData):
2709         (WebCore::CanvasRenderingContext2D::measureText):
2710
2711 2010-10-13  Fridrich Strba  <fridrich.strba@bluewin.ch>
2712
2713         Reviewed by Darin Adler.
2714
2715         Add WebCore/plugins/win directory to CFLAGS
2716         https://bugs.webkit.org/show_bug.cgi?id=45547
2717
2718         * GNUmakefile.am:
2719
2720 2010-10-13  Martin Robinson  <mrobinson@igalia.com>
2721
2722         Build fix for older versions of libsoup.
2723
2724         * platform/network/soup/cache/soup-request-file.c:
2725         (webkit_soup_request_file_ensure_file): Access the path member of the SoupURI directly.
2726
2727 2010-10-13  Kwang Yul Seo  <skyul@company100.net>
2728
2729         Reviewed by Kent Tamura.
2730
2731         [BREWMP] Add TextBoundaries and TextBreakIterator
2732         https://bugs.webkit.org/show_bug.cgi?id=46105
2733
2734         Copy the implementation of WinCE port.
2735
2736         * platform/text/brew/TextBoundariesBrew.cpp: Added.
2737         (WebCore::findNextWordFromIndex):
2738         (WebCore::findWordBoundary):
2739         * platform/text/brew/TextBreakIteratorBrew.cpp: Added.
2740         (WebCore::isCharStop):
2741         (WebCore::isLineStop):
2742         (WebCore::isSentenceStop):
2743         (WebCore::TextBreakIterator::reset):
2744         (WebCore::TextBreakIterator::following):
2745         (WebCore::TextBreakIterator::preceding):
2746         (WebCore::WordBreakIterator::first):
2747         (WebCore::WordBreakIterator::next):
2748         (WebCore::WordBreakIterator::previous):
2749         (WebCore::CharBreakIterator::first):
2750         (WebCore::CharBreakIterator::next):
2751         (WebCore::CharBreakIterator::previous):
2752         (WebCore::LineBreakIterator::first):
2753         (WebCore::LineBreakIterator::next):
2754         (WebCore::LineBreakIterator::previous):
2755         (WebCore::SentenceBreakIterator::first):
2756         (WebCore::SentenceBreakIterator::next):
2757         (WebCore::SentenceBreakIterator::previous):
2758         (WebCore::wordBreakIterator):
2759         (WebCore::characterBreakIterator):
2760         (WebCore::lineBreakIterator):
2761         (WebCore::sentenceBreakIterator):
2762         (WebCore::textBreakFirst):
2763         (WebCore::textBreakNext):
2764         (WebCore::textBreakPreceding):
2765         (WebCore::textBreakFollowing):
2766         (WebCore::textBreakCurrent):
2767         (WebCore::isTextBreak):
2768         (WebCore::cursorMovementIterator):
2769
2770 2010-10-13  Jeremy Orlow  <jorlow@chromium.org>
2771
2772         Reviewed by Nate Chapin.
2773
2774         IndexedDB should fire some errors synchronously
2775         https://bugs.webkit.org/show_bug.cgi?id=47530
2776
2777         Add dumb plumbing to pass around exception codes.
2778         Utilize that plumbing in the backend to fire some
2779         errors synchronously.
2780         Verify that create/remove* functions are only called
2781         in setVersionTransactions (and raise when not).
2782         Remove plumbing for obsolete IDBDatabase.objectStore
2783         Remove obsolete mode param.
2784
2785         * storage/IDBCursor.cpp:
2786         (WebCore::IDBCursor::update):
2787         (WebCore::IDBCursor::continueFunction):
2788         (WebCore::IDBCursor::remove):
2789         * storage/IDBCursor.h:
2790         (WebCore::IDBCursor::continueFunction):
2791         * storage/IDBCursor.idl:
2792         * storage/IDBCursorBackendImpl.cpp:
2793         (WebCore::IDBCursorBackendImpl::update):
2794         (WebCore::IDBCursorBackendImpl::continueFunction):
2795         (WebCore::IDBCursorBackendImpl::remove):
2796         * storage/IDBCursorBackendImpl.h:
2797         * storage/IDBCursorBackendInterface.h:
2798         * storage/IDBDatabase.cpp:
2799         (WebCore::IDBDatabase::IDBDatabase):
2800         (WebCore::IDBDatabase::createObjectStore):
2801         (WebCore::IDBDatabase::removeObjectStore):
2802         (WebCore::IDBDatabase::setVersion):
2803         (WebCore::IDBDatabase::transaction):
2804         * storage/IDBDatabase.h:
2805         (WebCore::IDBDatabase::createObjectStore):
2806         (WebCore::IDBDatabase::transaction):
2807         * storage/IDBDatabase.idl:
2808         * storage/IDBDatabaseBackendImpl.cpp:
2809         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
2810         (WebCore::IDBDatabaseBackendImpl::objectStore):
2811         (WebCore::IDBDatabaseBackendImpl::removeObjectStore):
2812         (WebCore::IDBDatabaseBackendImpl::setVersion):
2813         (WebCore::IDBDatabaseBackendImpl::transaction):
2814         * storage/IDBDatabaseBackendImpl.h:
2815         * storage/IDBDatabaseBackendInterface.h:
2816         * storage/IDBFactory.cpp:
2817         (WebCore::IDBFactory::open):
2818         * storage/IDBFactory.h:
2819         (WebCore::IDBFactory::open):
2820         * storage/IDBFactory.idl:
2821         * storage/IDBIndex.cpp:
2822         (WebCore::IDBIndex::openCursor):
2823         (WebCore::IDBIndex::openKeyCursor):
2824         (WebCore::IDBIndex::get):
2825         (WebCore::IDBIndex::getKey):
2826         * storage/IDBIndex.h:
2827         (WebCore::IDBIndex::openCursor):
2828         (WebCore::IDBIndex::openKeyCursor):
2829         * storage/IDBIndex.idl:
2830         * storage/IDBIndexBackendImpl.cpp:
2831         (WebCore::IDBIndexBackendImpl::openCursor):
2832         (WebCore::IDBIndexBackendImpl::openKeyCursor):
2833         (WebCore::IDBIndexBackendImpl::get):
2834         (WebCore::IDBIndexBackendImpl::getKey):
2835         * storage/IDBIndexBackendImpl.h:
2836         * storage/IDBIndexBackendInterface.h:
2837         * storage/IDBObjectStore.cpp:
2838         (WebCore::IDBObjectStore::get):
2839         (WebCore::IDBObjectStore::add):
2840         (WebCore::IDBObjectStore::put):
2841         (WebCore::IDBObjectStore::remove):
2842         (WebCore::IDBObjectStore::createIndex):
2843         (WebCore::IDBObjectStore::index):
2844         (WebCore::IDBObjectStore::removeIndex):
2845         (WebCore::IDBObjectStore::openCursor):
2846         * storage/IDBObjectStore.h:
2847         (WebCore::IDBObjectStore::add):
2848         (WebCore::IDBObjectStore::put):
2849         (WebCore::IDBObjectStore::createIndex):
2850         (WebCore::IDBObjectStore::openCursor):
2851         * storage/IDBObjectStore.idl:
2852         * storage/IDBObjectStoreBackendImpl.cpp:
2853         (WebCore::IDBObjectStoreBackendImpl::get):
2854         (WebCore::IDBObjectStoreBackendImpl::put):
2855         (WebCore::IDBObjectStoreBackendImpl::remove):
2856         (WebCore::IDBObjectStoreBackendImpl::createIndex):
2857         (WebCore::IDBObjectStoreBackendImpl::index):
2858         (WebCore::IDBObjectStoreBackendImpl::removeIndex):
2859         (WebCore::IDBObjectStoreBackendImpl::openCursor):
2860         * storage/IDBObjectStoreBackendImpl.h:
2861         (WebCore::IDBObjectStoreBackendImpl::name):
2862         (WebCore::IDBObjectStoreBackendImpl::keyPath):
2863         (WebCore::IDBObjectStoreBackendImpl::autoIncrement):
2864         * storage/IDBObjectStoreBackendInterface.h:
2865         * storage/IDBTransaction.cpp:
2866         (WebCore::IDBTransaction::objectStore):
2867         * storage/IDBTransaction.h:
2868         * storage/IDBTransactionBackendImpl.cpp:
2869         (WebCore::IDBTransactionBackendImpl::objectStore):
2870
2871 2010-10-13  Sergio Villar Senin  <svillar@igalia.com>
2872
2873         Reviewed by Martin Robinson.
2874
2875         [GTK] Add HTTP caching support
2876         https://bugs.webkit.org/show_bug.cgi?id=44261
2877
2878         This patch adds HTTP caching support to libsoup networking backend.
2879         This code will eventually be part of libsoup, but has been temporarily
2880         imported into the WebCore tree for testing purposes. All libsoup code
2881         is located in WebCore/platform/network/soup/cache. The webkit prefix
2882         was added to all the symbols to prevent problems when this lands in
2883         libsoup. Some external API was also added under webkit/ directory and
2884         will be used by library clients to enable HTTP caching.
2885
2886         There are two parts to this imported code, the first one is the code
2887         under WebCore/platform/network/soup/cache/ that contains all the
2888         SoupURILoader code that supports the development of the cache. The
2889         second part is the HTTP cache implementation located in
2890         WebCore/platform/network/soup/cache/webkit/.
2891
2892         * GNUmakefile.am:
2893         * platform/network/soup/cache/soup-directory-input-stream.c: Added.
2894         (webkit_soup_directory_input_stream_parse_info):
2895         (webkit_soup_directory_input_stream_read_next_file):
2896         (webkit_soup_directory_input_stream_read):
2897         (webkit_soup_directory_input_stream_close):
2898         (webkit_soup_directory_input_stream_class_init):
2899         (webkit_soup_directory_input_stream_init):
2900         (webkit_soup_directory_input_stream_new):
2901         * platform/network/soup/cache/soup-directory-input-stream.h: Added.
2902         * platform/network/soup/cache/soup-http-input-stream.c: Added.
2903         (webkit_soup_http_input_stream_finalize):
2904         (webkit_soup_http_input_stream_class_init):
2905         (webkit_soup_http_input_stream_seekable_iface_init):
2906         (webkit_soup_http_input_stream_init):
2907         (webkit_soup_http_input_stream_queue_message):
2908         (webkit_soup_http_input_stream_new):
2909         (webkit_soup_http_input_stream_got_headers):
2910         (webkit_soup_http_input_stream_got_chunk):
2911         (webkit_soup_http_input_stream_finished):
2912         (webkit_soup_http_input_stream_cancelled):
2913         (webkit_soup_http_input_stream_prepare_for_io):
2914         (webkit_soup_http_input_stream_done_io):
2915         (set_error_if_http_failed):
2916         (read_from_leftover):
2917         (webkit_soup_http_input_stream_send_internal):
2918         (send_sync_finished):
2919         (webkit_soup_http_input_stream_send):
2920         (webkit_soup_http_input_stream_read):
2921         (webkit_soup_http_input_stream_close):
2922         (wrapper_callback):
2923         (send_async_thread):
2924         (webkit_soup_http_input_stream_send_async_in_thread):
2925         (send_async_finished):
2926         (webkit_soup_http_input_stream_send_async_internal):
2927         (webkit_soup_http_input_stream_send_async):
2928         (webkit_soup_http_input_stream_send_finish):
2929         (read_async_done):
2930         (webkit_soup_http_input_stream_read_async):
2931         (webkit_soup_http_input_stream_read_finish):
2932         (webkit_soup_http_input_stream_close_async):
2933         (webkit_soup_http_input_stream_close_finish):
2934         (webkit_soup_http_input_stream_tell):
2935         (webkit_soup_http_input_stream_can_seek):
2936         (webkit_soup_http_input_stream_seek):
2937         (webkit_soup_http_input_stream_can_truncate):
2938         (webkit_soup_http_input_stream_truncate):
2939         (webkit_soup_http_input_stream_get_message):
2940         * platform/network/soup/cache/soup-http-input-stream.h: Added.
2941         * platform/network/soup/cache/soup-request-data.c: Added.
2942         (webkit_soup_request_data_init):
2943         (webkit_soup_request_data_finalize):
2944         (webkit_soup_request_data_check_uri):
2945         (uri_decoded_copy):
2946         (webkit_soup_request_data_send):
2947         (webkit_soup_request_data_get_content_length):
2948         (webkit_soup_request_data_get_content_type):
2949         (webkit_soup_request_data_class_init):
2950         * platform/network/soup/cache/soup-request-data.h: Added.
2951         * platform/network/soup/cache/soup-request-file.c: Added.
2952         (webkit_soup_request_file_get_file):
2953         (webkit_soup_request_file_init):
2954         (webkit_soup_request_file_finalize):
2955         (webkit_soup_request_file_check_uri):
2956         (webkit_soup_request_file_ftp_main_loop_quit):
2957         (webkit_soup_request_file_ensure_file_ftp):
2958         (webkit_soup_request_file_ensure_file):
2959         (webkit_soup_request_file_send):
2960         (webkit_soup_request_file_send_async_thread):
2961         (webkit_soup_request_file_send_async):
2962         (webkit_soup_request_file_send_finish):
2963         (webkit_soup_request_file_get_content_length):
2964         (webkit_soup_request_file_get_content_type):
2965         (webkit_soup_request_file_class_init):
2966         * platform/network/soup/cache/soup-request-file.h: Added.
2967         * platform/network/soup/cache/soup-request-http.c: Added.
2968         (webkit_soup_request_http_get_message):
2969         (webkit_soup_request_http_init):
2970         (webkit_soup_request_http_check_uri):
2971         (webkit_soup_request_http_finalize):
2972         (webkit_soup_request_http_send):
2973         (sent_async):
2974         (conditional_get_ready_cb):
2975         (send_async_cb):
2976         (webkit_soup_request_http_send_async):
2977         (webkit_soup_request_http_send_finish):
2978         (webkit_soup_request_http_get_content_length):
2979         (webkit_soup_request_http_get_content_type):
2980         (webkit_soup_request_http_class_init):
2981         * platform/network/soup/cache/soup-request-http.h: Added.
2982         * platform/network/soup/cache/soup-request.c: Added.
2983         (webkit_soup_request_init):
2984         (webkit_soup_request_finalize):
2985         (webkit_soup_request_set_property):
2986         (webkit_soup_request_get_property):
2987         (webkit_soup_request_initable_init):
2988         (webkit_soup_request_default_check_uri):
2989         (webkit_soup_request_default_send_async):
2990         (webkit_soup_request_default_send_finish):
2991         (webkit_soup_request_send):
2992         (webkit_soup_request_send_async):
2993         (webkit_soup_request_send_finish):
2994         (webkit_soup_request_class_init):
2995         (webkit_soup_request_initable_interface_init):
2996         (webkit_soup_request_get_uri):
2997         (webkit_soup_request_get_session):
2998         (webkit_soup_request_get_content_length):
2999         (webkit_soup_request_get_content_type):
3000         * platform/network/soup/cache/soup-request.h: Added.
3001         * platform/network/soup/cache/soup-requester.c: Added.
3002         (webkit_soup_requester_init):
3003         (finalize):
3004         (webkit_soup_requester_class_init):
3005         (init_request_types):
3006         (webkit_soup_requester_new):
3007         (webkit_soup_requester_request):
3008         (webkit_soup_requester_request_uri):
3009         (webkit_soup_scheme_is_valid):
3010         (webkit_soup_requester_add_protocol):
3011         (webkit_soup_requester_remove_protocol):
3012         (webkit_soup_error_quark):
3013         * platform/network/soup/cache/soup-requester.h: Added.
3014         * platform/network/soup/cache/webkit/soup-cache-private.h: Added.
3015         * platform/network/soup/cache/webkit/soup-cache.c: Added.
3016         (get_cacheability):
3017         (webkit_soup_cache_entry_free):
3018         (copy_headers):
3019         (update_headers):
3020         (webkit_soup_cache_entry_get_current_age):
3021         (webkit_soup_cache_entry_is_fresh_enough):
3022         (webkit_soup_message_get_cache_key):
3023         (webkit_soup_cache_entry_set_freshness):
3024         (webkit_soup_cache_entry_new):
3025         (webkit_soup_cache_writing_fixture_free):
3026         (close_ready_cb):
3027         (write_ready_cb):
3028         (msg_got_chunk_cb):
3029         (msg_got_body_cb):
3030         (webkit_soup_cache_entry_delete):
3031         (lru_compare_func):
3032         (cache_accepts_entries_of_size):
3033         (make_room_for_new_entry):
3034         (webkit_soup_cache_entry_insert_by_key):
3035         (msg_restarted_cb):
3036         (append_to_ready_cb):
3037         (msg_got_headers_cb):
3038         (webkit_soup_cache_send_response):
3039         (request_started):
3040         (attach):
3041         (webkit_soup_cache_session_feature_init):
3042         (webkit_soup_cache_init):
3043         (webkit_soup_cache_finalize):
3044         (webkit_soup_cache_set_property):
3045         (webkit_soup_cache_get_property):
3046         (webkit_soup_cache_constructed):
3047         (webkit_soup_cache_type_get_type):
3048         (webkit_soup_cache_class_init):
3049         (webkit_soup_cache_new):
3050         (webkit_soup_cache_has_response):
3051         (webkit_soup_cache_get_cacheability):
3052         (force_flush_timeout):
3053         (webkit_soup_cache_flush):
3054         (remove_cache_item):
3055         (webkit_soup_cache_clear):
3056         (webkit_soup_cache_generate_conditional_request):
3057         (pack_entry):
3058         (webkit_soup_cache_dump):
3059         (webkit_soup_cache_load):
3060         (webkit_soup_cache_set_max_size):
3061         (webkit_soup_cache_get_max_size):
3062         * platform/network/soup/cache/webkit/soup-cache.h: Added.
3063
3064 2010-10-13  Gavin Barraclough  <barraclough@apple.com>
3065
3066         Chromium build fix.
3067
3068         * bindings/v8/ScriptProfiler.cpp:
3069
3070 2010-10-13  Chris Evans  <cevans@google.com>
3071
3072         Reviewed by Jian Li.
3073
3074         Blob / BlobBuilder can be put into bad state with wild integers and strings, due to integer overflows
3075         https://bugs.webkit.org/show_bug.cgi?id=47382
3076
3077         Fix integer overflow errors in Blob.slice and BlobBuilder.append.
3078
3079         Test: fast/files/blob-slice-overflow.html
3080
3081         * fileapi/Blob.cpp:
3082         (WebCore::Blob::slice): handle integer overflow properly.
3083         * fileapi/BlobBuilder.cpp:
3084         (WebCore::BlobBuilder::append): use correct type for vector length.
3085
3086 2010-10-13  Gavin Barraclough  <barraclough@apple.com>
3087
3088         Build fix - remove some redundant references to ScriptString.
3089
3090         * WebCore.gypi:
3091         * WebCore.pro:
3092         * bindings/v8/ScriptProfiler.cpp:
3093
3094 2010-10-13  Gavin Barraclough  <barraclough@apple.com>
3095
3096         Reviewed by Oliver Hunt.
3097
3098         Bug 47621 - Remove bindings/v8/ScriptString
3099         This is now redundant.
3100
3101         * bindings/v8/ScriptCallFrame.h:
3102         (WebCore::ScriptCallFrame::functionName):
3103         * bindings/v8/ScriptFunctionCall.cpp:
3104         * bindings/v8/ScriptFunctionCall.h:
3105         * bindings/v8/ScriptString.h: Removed.
3106         * bindings/v8/ScriptStringImpl.cpp: Removed.
3107         * bindings/v8/ScriptStringImpl.h: Removed.
3108
3109 2010-10-13  Anders Carlsson  <andersca@apple.com>
3110
3111         Reviewed by John Sullivan.
3112
3113         Draw the find overlay holes
3114         https://bugs.webkit.org/show_bug.cgi?id=47631
3115
3116         Export symbols needed by WebKit2.
3117
3118         * WebCore.exp.in:
3119
3120 2010-10-13  James Simonsen  <simonjam@chromium.org>
3121
3122         Reviewed by Darin Adler.
3123
3124         Implement onreadystatechange event handler for Documents
3125         https://bugs.webkit.org/show_bug.cgi?id=26140
3126
3127         Test: fast/dom/Document/readystate.html
3128
3129         * dom/Document.cpp:
3130         (WebCore::Document::setReadyState): Fire readystatechangeevent.
3131         (WebCore::Document::open): Clear event listeners.
3132         * dom/Document.h: Add readystatechange event.
3133         * dom/Document.idl: Ditto.
3134
3135 2010-10-13  Chris Fleizach  <cfleizach@apple.com>
3136
3137         Reviewed by Beth Dakin.
3138
3139         AX: accessibilityIsIgnored not respected on ARIA tables
3140         https://bugs.webkit.org/show_bug.cgi?id=47564
3141
3142         For platforms that ignore column headers and header container objects (everything
3143         except Mac) on accessibility tables, that choice needs to be respected in 
3144         ARIA tables as well.
3145
3146         GTK is the only open platform doing this, so I'll have to collect the result of this 
3147         test. It was copied from table-hierarchy.html, but changed to use ARIA tables.
3148
3149         Test: platform/gtk/accessibility/aria-table-hierarchy.html
3150
3151         * accessibility/AccessibilityARIAGrid.cpp:
3152         (WebCore::AccessibilityARIAGrid::addChildren):
3153
3154 2010-10-13  Victoria Kirst  <vrk@google.com>
3155
3156         Reviewed by James Robinson.
3157
3158         No longer ASSERT for LayerRenderer in VideoLayerChromium destructor
3159         https://bugs.webkit.org/show_bug.cgi?id=47432
3160
3161         * platform/graphics/chromium/VideoLayerChromium.cpp:
3162         (WebCore::VideoLayerChromium::cleanupResources):
3163
3164 2010-10-13  Leandro Pereira  <leandro@profusion.mobi>
3165
3166         [EFL] Unreviewed. Build fix.
3167
3168         * CMakeLists.txt: Add ContextShadow.cpp.
3169         * CMakeListsEfl.txt: Add ContextShadowCairo.cpp.
3170
3171 2010-10-13  Martin Robinson  <mrobinson@igalia.com>
3172
3173         Reviewed by Holger Freyther.
3174
3175         [GTK] r69681 caused some tests to crash
3176         https://bugs.webkit.org/show_bug.cgi?id=47622
3177
3178         Properly initialize m_layerContext on the ContextShadow so that in situations
3179         where beginShadowLayer bails out early with a null return value, it is set
3180         to null. This may happen when the first call to beginShadowLayer on a particular
3181         ContextShadow uses a region which is entirely outside the clip region or which
3182         is empty.
3183
3184         * platform/graphics/cairo/ContextShadow.cpp:
3185         (WebCore::ContextShadow::ContextShadow): Properly initialize m_layerContext.
3186
3187 2010-10-13  Anders Carlsson  <andersca@apple.com>
3188
3189         Reviewed by Beth Dakin.
3190
3191         Don't set the fill/stroke colorspace before filling/stroking
3192         https://bugs.webkit.org/show_bug.cgi?id=47619
3193
3194         Setting the colorspace has the side-effect of setting the color to black, which is
3195         not what we want. When fill/stroke is called, a fill/stroke color should already have been set.
3196
3197         Pixel tests show no regressions from this change.
3198
3199         * platform/graphics/cg/GraphicsContextCG.cpp:
3200         (WebCore::GraphicsContext::fillPath):
3201         (WebCore::GraphicsContext::strokePath):
3202         (WebCore::GraphicsContext::fillRect):
3203         (WebCore::GraphicsContext::strokeRect):
3204
3205 2010-10-13  Brent Fulgham  <bfulgham@webkit.org>
3206
3207         Unreviewed WinCairo build fix.
3208         New ContextShadow class not built for Windows builds.
3209
3210         * WebCore.vcproj/WebCore.vcproj: Add missing files for
3211         building ContextShadow on WinCairo.
3212         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3213         Add missing include for ContextShadow definition.
3214
3215 2010-10-13  Gavin Barraclough  <barraclough@apple.com>
3216
3217         Chromium build fix pt1.
3218
3219         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
3220         (WebCore::V8XMLHttpRequest::responseTextAccessorGetter):
3221
3222 2010-10-13  Anders Carlsson  <andersca@apple.com>
3223
3224         Reviewed by Sam Weinig.
3225
3226         Send over find indicator information to the UI process
3227         https://bugs.webkit.org/show_bug.cgi?id=47612
3228
3229         Export symbols needed by WebKit2.
3230
3231         * WebCore.exp.in:
3232
3233 2010-10-13  Gavin Barraclough  <barraclough@apple.com>
3234
3235         Reviewed by Oliver Hunt.
3236
3237         https://bugs.webkit.org/show_bug.cgi?id=43987
3238         Switch XMLHttpRequest, FileReader, and FileReaderSync to use a Stringbuilder
3239         to construct their internal result string.  Remove ScriptString (this is now
3240         redundant).
3241
3242         * WebCore.xcodeproj/project.pbxproj:
3243         * bindings/js/JSDOMBinding.cpp:
3244         (WebCore::jsOwnedStringOrNull):
3245         * bindings/js/JSDOMBinding.h:
3246         * bindings/js/JSXMLHttpRequestCustom.cpp:
3247         (WebCore::JSXMLHttpRequest::responseText):
3248         * bindings/js/ScriptCallFrame.cpp:
3249         (WebCore::ScriptCallFrame::ScriptCallFrame):
3250         * bindings/js/ScriptCallFrame.h:
3251         (WebCore::ScriptCallFrame::functionName):
3252         * bindings/js/ScriptCallStack.h:
3253         * bindings/js/ScriptFunctionCall.cpp:
3254         * bindings/js/ScriptFunctionCall.h:
3255         * bindings/js/ScriptString.h: Removed.
3256         * dom/ScriptExecutionContext.h:
3257         * fileapi/FileReader.cpp:
3258         (WebCore::FileReader::FileReader):
3259         (WebCore::FileReader::abort):
3260         (WebCore::FileReader::didReceiveData):
3261         (WebCore::FileReader::result):
3262         (WebCore::FileReader::convertToText):
3263         (WebCore::FileReader::convertToDataURL):
3264         * fileapi/FileReader.h:
3265         * fileapi/FileReaderSync.cpp:
3266         (WebCore::FileReaderSyncLoader::FileReaderSyncLoader):
3267         (WebCore::FileReaderSyncLoader::didReceiveData):
3268         (WebCore::FileReaderSync::readAsBinaryString):
3269         (WebCore::FileReaderSync::readAsText):
3270         (WebCore::FileReaderSync::readAsDataURL):
3271         (WebCore::FileReaderSync::read):
3272         (WebCore::FileReaderSync::convertToText):
3273         * fileapi/FileReaderSync.h:
3274         (WebCore::FileReaderSync::readAsText):
3275         (WebCore::FileReaderSync::FileReaderSync):
3276         * inspector/InspectorController.cpp:
3277         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
3278         (WebCore::InspectorController::scriptImported):
3279         * inspector/InspectorController.h:
3280         * inspector/InspectorResource.cpp:
3281         (WebCore::InspectorResource::setOverrideContent):
3282         * inspector/InspectorResource.h:
3283         * loader/FrameLoader.cpp:
3284         * loader/FrameLoader.h:
3285         * loader/FrameLoaderClient.h:
3286         * loader/ResourceLoadNotifier.h:
3287         * workers/WorkerScriptLoader.h:
3288         * xml/XMLHttpRequest.cpp:
3289         (WebCore::XMLHttpRequest::XMLHttpRequest):
3290         (WebCore::XMLHttpRequest::responseText):
3291         (WebCore::XMLHttpRequest::responseXML):
3292         (WebCore::XMLHttpRequest::abort):
3293         (WebCore::XMLHttpRequest::clearResponse):
3294         (WebCore::XMLHttpRequest::dropProtection):
3295         (WebCore::XMLHttpRequest::didFinishLoading):
3296         (WebCore::XMLHttpRequest::didReceiveData):
3297         * xml/XMLHttpRequest.h:
3298
3299 2010-10-13  Gavin Barraclough  <barraclough@apple.com>
3300
3301         Reviewed by Oliver Hunt.
3302
3303         Bug 43987 - Downloading using XHR is much slower than before
3304
3305         * svg/SVGPathStringBuilder.cpp:
3306         (WebCore::SVGPathStringBuilder::result):
3307             StringBuilder::size() -> StringBuilder::length().
3308
3309 2010-10-13  Yong Li  <yoli@rim.com>
3310
3311         Reviewed by Oliver Hunt.
3312
3313         Fix potential misaligned memory access in CloneDeserializer::readLittleEndian and readString
3314         that can result crash on ARM (<v6).
3315         https://bugs.webkit.org/show_bug.cgi?id=47594
3316
3317         No new test added, because the crash can be produced by existing tests like:
3318         LayoutTests/fast/events/message-channel-gc-4.html
3319
3320         * bindings/js/SerializedScriptValue.cpp:
3321         (WebCore::CloneDeserializer::readLittleEndian):
3322         (WebCore::CloneDeserializer::readString):
3323
3324 2010-10-06  Martin Robinson  <mrobinson@igalia.com>
3325
3326         Reviewed by Dirk Schulze.
3327
3328         [Cairo] Activate ContextShadow in all places where shadows are drawn
3329         https://bugs.webkit.org/show_bug.cgi?id=46475
3330
3331         Turn on ContextShadow for the Cairo port and remove all old shadow code.
3332         Shadow tiling optimizations will be added in a followup patch to ContextShadowCairo.
3333
3334         * platform/graphics/GraphicsContext.h: Add a ContextShadow forward declaration for Cairo.
3335         * platform/graphics/cairo/FontCairo.cpp: Switch to using ContextShadow.
3336         (WebCore::prepareContextForGlyphDrawing): Added this helper which sets up the translation
3337         on the specified cairo_t to prepare for drawing glyphs.
3338         (WebCore::drawGlyphsToContext): Added this helper which draws the glyphs to a cairo_t,
3339         while properly handling glyphs with synthetic bold.
3340         (WebCore::Font::drawGlyphs): Removed old shadow code and replaced it with ContextShadow usage.
3341         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3342         (WebCore::drawPathShadow): Modified this to use ContextShadow and to take an enum
3343         argument specifying whether to fill or stroke the solid figure for the shadow.
3344         (WebCore::fillCurrentCairoPath): Updated drawPathShadow call.
3345         (WebCore::strokeCurrentCairoPath): Ditto.
3346         (WebCore::GraphicsContext::savePlatformState): Save the ContextShadow.
3347         (WebCore::GraphicsContext::restorePlatformState): Restore the ContextShadow.
3348         (WebCore::GraphicsContext::drawPath): Updated drawPathShadow call.
3349         (WebCore::GraphicsContext::fillRect): Uses ContextShadow now.
3350         (WebCore::GraphicsContext::setPlatformShadow): Uses ContextShadow now.
3351         (WebCore::GraphicsContext::contextShadow): Added.
3352         (WebCore::GraphicsContext::clearPlatformShadow): Clears the ContextShadow member.
3353         (WebCore::GraphicsContext::fillRoundedRect): Updated drawPathShadow call.
3354         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3355         (WebCore::GraphicsContextPlatformPrivate::hasShadow): Added.
3356         * platform/graphics/cairo/ImageCairo.cpp:
3357         (WebCore::BitmapImage::draw): Updated to use ContextShadow.
3358
3359 2010-10-13  John Knottenbelt  <jknotten@chromium.org>
3360
3361         Reviewed by Steve Block.
3362
3363         First step towards client-based Geolocation in Chromium. Build
3364         fixes for CLIENT_BASED_GEOLOCATION preprocessor feature define.
3365         https://bugs.webkit.org/show_bug.cgi?id=47586
3366
3367         * WebCore.gyp/WebCore.gyp:
3368         * platform/chromium/ChromiumBridge.h:
3369         * platform/chromium/GeolocationServiceChromium.cpp:
3370
3371 2010-10-13  Steve Block  <steveblock@google.com>
3372
3373         Unreviewed fix
3374
3375         Need to check for the existence of DeviceOrientation and DeviceMotion controllers
3376
3377         These features can be disabled at run time, so an enable guard is not sufficient.
3378         This bug was introduced in http://trac.webkit.org/changeset/69646
3379
3380         Tested with existing tests.
3381
3382         * history/PageCache.cpp:
3383         (WebCore::logCanCachePageDecision):
3384         (WebCore::PageCache::canCache):
3385
3386 2010-10-13  Yury Semikhatsky  <yurys@chromium.org>
3387
3388         Reviewed by Pavel Feldman.
3389
3390         Web Inspector: stack information is inconsistent between console.trace and runtime errors.
3391         https://bugs.webkit.org/show_bug.cgi?id=47252
3392
3393         * console.trace() is now formatted the same way as other stack traces
3394
3395         * If there is //@ sourceURL=url line at the end of eval'ed script source
3396         the url will be shown in the stack traces for script. That is why ScriptCallFrame::sourceURL
3397         type has changed from KURL to String.
3398
3399         Tests: inspector/console-trace-in-eval.html
3400                inspector/console-uncaught-exception-in-eval.html
3401
3402         * bindings/js/ScriptCallFrame.cpp:
3403         (WebCore::ScriptCallFrame::ScriptCallFrame):
3404         * bindings/js/ScriptCallFrame.h:
3405         (WebCore::ScriptCallFrame::sourceURL):
3406         * bindings/v8/ScriptCallFrame.cpp:
3407         (WebCore::ScriptCallFrame::ScriptCallFrame):
3408         * bindings/v8/ScriptCallFrame.h:
3409         (WebCore::ScriptCallFrame::sourceURL):
3410         * bindings/v8/ScriptCallStack.cpp:
3411         (WebCore::getFrameLocation):
3412         (WebCore::ScriptCallStack::create):
3413         * bindings/v8/ScriptCallStack.h:
3414         * bindings/v8/ScriptController.cpp:
3415         (WebCore::ScriptController::setCaptureCallStackForUncaughtExceptions):
3416         * bindings/v8/custom/V8ConsoleCustom.cpp:
3417         (WebCore::V8Console::traceCallback):
3418         * inspector/ConsoleMessage.cpp:
3419         (WebCore::ConsoleMessage::CallFrame::buildInspectorObject):
3420         (WebCore::ConsoleMessage::ConsoleMessage):
3421         * inspector/ConsoleMessage.h:
3422         * inspector/front-end/ConsoleView.js:
3423         (WebInspector.ConsoleMessage.prototype._formatMessage):
3424         * page/Console.cpp:
3425         (WebCore::Console::addMessage):
3426         (WebCore::Console::count):
3427         (WebCore::Console::timeEnd):
3428
3429 2010-10-13  Kent Tamura  <tkent@chromium.org>
3430
3431         Unreviewed, a trivial change.
3432
3433         Run sort-Xcode-project-file.
3434
3435         * WebCore.xcodeproj/project.pbxproj:
3436
3437 2010-10-13  Yael Aharon  <yael.aharon@nokia.com>
3438
3439         Reviewed by Andreas Kling.
3440
3441         Wrong ASSERT when select element has size 0
3442         https://bugs.webkit.org/show_bug.cgi?id=47567
3443
3444         Keep the ASSERT only if the size of the element list is more than 0
3445         Test: fast/dom/HTMLSelectElement/click-size-zero-no-crash.html
3446
3447         * dom/SelectElement.cpp:
3448         (WebCore::SelectElement::updateListBoxSelection):
3449         (WebCore::SelectElement::listBoxDefaultEventHandler):
3450
3451 2010-10-13  Steve Block  <steveblock@google.com>
3452
3453         Reviewed by Alexey Proskuryakov.
3454
3455         Pages using DeviceOrientation and DeviceMotion should not go into the page cache
3456         https://bugs.webkit.org/show_bug.cgi?id=47408
3457
3458         Tests: fast/dom/DeviceMotion/no-page-cache.html
3459                fast/dom/DeviceOrientation/no-page-cache.html
3460
3461         * dom/DeviceMotionController.h:
3462         (WebCore::DeviceMotionController::isActive):
3463         * dom/DeviceOrientationController.h:
3464         (WebCore::DeviceOrientationController::isActive):
3465         * history/PageCache.cpp:
3466         (WebCore::logCanCachePageDecision):
3467         (WebCore::PageCache::canCache):
3468         * page/Page.cpp:
3469
3470 2010-10-13  Jenn Braithwaite  <jennb@chromium.org>
3471
3472         Reviewed by Dmitry Titov.
3473
3474         Make resource identifiers unique across pages
3475         https://bugs.webkit.org/show_bug.cgi?id=47002
3476
3477         Test: http/tests/misc/iframe-reparenting-id-collision.html
3478
3479         * loader/ProgressTracker.cpp:
3480         (WebCore::ProgressTracker::ProgressTracker):
3481         (WebCore::ProgressTracker::createUniqueIdentifier):
3482         * loader/ProgressTracker.h:
3483
3484 2010-10-12  Roland Steiner  <rolandsteiner@chromium.org>
3485
3486         Reviewed by David Hyatt.
3487
3488         Bug 41040 - :before/:after content should not become part of a ruby base
3489         https://bugs.webkit.org/show_bug.cgi?id=41040
3490
3491         Also related to:
3492         https://bugs.webkit.org/show_bug.cgi?id=40895.
3493         https://bugs.webkit.org/show_bug.cgi?id=43722.
3494
3495         Explicitly handle :before and :after content in the default way.
3496
3497         Test: fast/ruby/ruby-beforeafter.html
3498               fast/ruby/after-doesnt-crash.html
3499
3500         * rendering/RenderObject.h:
3501         (WebCore::RenderObject::isBeforeContent):
3502         * rendering/RenderRuby.cpp:
3503         (WebCore::lastRubyRun):
3504         (WebCore::RenderRubyAsInline::addChild):
3505         (WebCore::RenderRubyAsInline::removeChild):
3506         (WebCore::RenderRubyAsBlock::addChild):
3507         (WebCore::RenderRubyAsBlock::removeChild):
3508
3509 2010-10-12  Sheriff Bot  <webkit.review.bot@gmail.com>
3510
3511         Unreviewed, rolling out r69639.
3512         http://trac.webkit.org/changeset/69639
3513         https://bugs.webkit.org/show_bug.cgi?id=47575
3514
3515         "regressed nav-element.html" (Requested by rniwa on #webkit).
3516
3517         * editing/ApplyBlockElementCommand.cpp:
3518         (WebCore::ApplyBlockElementCommand::formatSelection):
3519         * editing/EditorCommand.cpp:
3520         (WebCore::executeFormatBlock):
3521         * editing/FormatBlockCommand.cpp:
3522         (WebCore::FormatBlockCommand::formatRange):
3523         * editing/FormatBlockCommand.h:
3524         (WebCore::FormatBlockCommand::editingAction):
3525         * editing/VisiblePosition.cpp:
3526         (WebCore::enclosingBlockFlowElement):
3527         * editing/VisiblePosition.h:
3528         * editing/htmlediting.cpp:
3529         (WebCore::validBlockTag):
3530         * editing/htmlediting.h:
3531
3532 2010-10-12  Ryosuke Niwa  <rniwa@webkit.org>
3533
3534         Reviewed by Tony Chang.
3535
3536         execCommand FormatBlock creates lots of blockquotes
3537         https://bugs.webkit.org/show_bug.cgi?id=19795
3538
3539         The bug was caused by WebKit's not reusing the block node added by previous iteration
3540         and its inserting block node at wrong places.
3541
3542         Fixed the bug by rewriting FormatBlockCommand::formatRange.  New code resembles that of
3543         IndentOutdentCommand::indentIntoBlockquote.  The difference between two is that formatRange
3544         avoids the existing block elements when replacing blocks and it also adds a placeholder
3545         when removing the existing block caused paragraphs to collapse.
3546
3547         Tests: editing/execCommand/format-block-multiple-paragraphs.html
3548                editing/execCommand/format-block-table.html
3549
3550         * editing/EditorCommand.cpp:
3551         (WebCore::executeFormatBlock):
3552         * editing/FormatBlockCommand.cpp:
3553         (WebCore::FormatBlockCommand::formatRange): Rewritten; see above.
3554         (WebCore::FormatBlockCommand::isElementToApplyInFormatBlockCommand): Renamed from validBlockElement
3555         and moved from htmlediting.cpp.
3556         (WebCore::FormatBlockCommand::enclosingBlockToSplitTreeTo): Added.
3557         * editing/FormatBlockCommand.h:
3558         * editing/VisiblePosition.cpp:
3559         (WebCore::enclosingBlockFlowElement): Changed the return type to Element*
3560         * editing/VisiblePosition.h:
3561
3562 2010-10-11  Girish Ramakrishnan  <girish@forwardbias.in>
3563
3564         Reviewed by Anders Carlsson.
3565
3566         Make PluginView inherit from PluginViewBase.
3567
3568         This change is a precursor to adding accelerated compositing support
3569         for NPAPI plugins.
3570
3571         https://bugs.webkit.org/show_bug.cgi?id=47418
3572
3573         * page/Page.cpp:
3574         (WebCore::Page::privateBrowsingStateChanged):
3575         * plugins/PluginView.h:
3576         * plugins/PluginViewBase.h:
3577         (WebCore::PluginViewBase::PluginViewBase):
3578
3579 2010-10-12  Kinuko Yasuda  <kinuko@chromium.org>
3580
3581         Reviewed by Jian Li.
3582
3583         Pass platform path (rather than virtual path) when creating File from FileEntry
3584         https://bugs.webkit.org/show_bug.cgi?id=47563
3585
3586         No new tests, the new test for FileWriter will be verifying this.
3587
3588         * fileapi/FileEntry.cpp:
3589         (WebCore::FileEntry::file):
3590
3591 2010-10-12 David Hyatt  <hyatt@apple.com>
3592
3593         Reviewed by Dan Bernstein
3594
3595         <rdar://problem/8488444> REGRESSION (r67771)
3596         https://bugs.webkit.org/show_bug.cgi?id=47434
3597         Crash when printing in RenderBlock::markDescendantBlocksAndLinesForLayout
3598         
3599         Added printing/simultaneous-position-float-change.html
3600
3601         Remove the markDescendantBlocksAndLinesForLayout method since it can walk m_floatingObjects lists with deleted