ed9e5aecdec029c645e031216c7d6de9221bb18a
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-03-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2
3         Unreviewed build fix.
4
5         [EFL] Fix build break when CROSS_PLATFORM_CONTEXT_MENUS is disabled.
6         https://bugs.webkit.org/show_bug.cgi?id=56005
7
8         There are build breaks when CROSS_PLATFORM_CONTEXT_MENUS is disabled.
9
10         * platform/efl/ContextMenuEfl.cpp:
11         (WebCore::ContextMenu::ContextMenu):
12         * platform/efl/ContextMenuItemEfl.cpp:
13
14 2011-03-10  Ryosuke Niwa  <rniwa@webkit.org>
15
16         Reviewed by Tony Chang.
17
18         startOfBlock and endOfBlock may return a position inside hr
19         https://bugs.webkit.org/show_bug.cgi?id=56025
20
21         Replaced calls to enclosingBlockFlowElement in startOfBlock and endOfBlock by
22         calls to enclosingBlock. Added EditingBoundaryCrossingRule to the argument lists
23         of startOfBlock, endOfBlock, and enclosingBlock. Also replaced the last boolean
24         argument variable of enclosingNodeOfType by EditingBoundaryCrossingRule.
25
26         Also replaced calls to enclosingBlockFlowElement in inSameBlock by calls to
27         enclosingBlock to be consitent with startOfBlock and endOfBlock.
28
29         This patch also replaced calls to deprecatedNode in startOfBlock, endOfBlock,
30         and inSameBlock by calls to containerNode because the enclosing block of a position
31         should never be before or after the position.
32
33         No tests are added because this change only affects WebCore internally.
34
35         * editing/DeleteSelectionCommand.cpp:
36         (WebCore::DeleteSelectionCommand::initializePositionData): Calls enclosingNodeOfType.
37         Pass CanCrossEditingBoundary instead of false.
38         * editing/htmlediting.cpp:
39         (WebCore::unsplittableElementForPosition): Ditto.
40         (WebCore::enclosingBlock): Takes EditingBoundaryCrossingRule and passes it to
41         enclosingNodeOfType.
42         (WebCore::enclosingNodeOfType): Takes EditingBoundaryCrossingRule instead of boolean.
43         Fixed a bug that it stops walking the tree when it reached the root editable node
44         even when the editing boundary crossing rule is CanCrossEditingBoundary.
45         * editing/htmlediting.h: Prototype changes.
46         * editing/visible_units.cpp:
47         (WebCore::startOfBlock): Calls enclosingBlock instead of enclosingBlockFlowElement.
48         Also added an early exit when there's no enclosing block.
49         (WebCore::endOfBlock): Ditto. The early exist in this case prevents crash in
50         lastPositionInNode.
51         (WebCore::inSameBlock): Calls enclosingBlock instead of enclosingBlockFlowElement.
52         (WebCore::isStartOfBlock): Calls startOfBlock with CanCrossEditingBoundary because
53         we don't care where the start of block is when we're comparing against the given position.
54         (WebCore::isEndOfBlock): Ditto.
55         * editing/visible_units.h:
56
57 2011-03-10  Alexey Proskuryakov  <ap@apple.com>
58
59         Reviewed by Dan Bernstein.
60
61         Backspace deletes all non-BMP symbols at once, and then some
62         https://bugs.webkit.org/show_bug.cgi?id=55971
63         <rdar://problem/8725312>
64
65         Test: platform/mac/editing/input/insert-delete-smp-symbol.html
66
67         * rendering/RenderText.cpp:
68         (WebCore::isMark): This matches what Core Foundation does for all characters that I tested.
69         (WebCore::RenderText::previousOffsetForBackwardDeletion): Changed to use isMark().
70
71 2011-03-10  Chris Evans  <cevans@chromium.org>
72
73         Reviewed by Adam Barth.
74
75         Error in StyleElement::process with large nodesets
76         https://bugs.webkit.org/show_bug.cgi?id=56150
77
78         Test: none due to excessive runtime and CRASH() vs. real crash.
79
80         * dom/StyleElement.cpp:
81         (WebCore::StyleElement::process): Handle large node sets better.
82
83 2011-03-10  David Hyatt  <hyatt@apple.com>
84
85         Reviewed by Simon Fraser.
86
87         https://bugs.webkit.org/show_bug.cgi?id=47151
88         
89         Percentage heights should skip anonymous containing blocks when computing the used value.
90
91         Added fast/block/basic/percentage-height-inside-anonymous-block.html
92
93         * rendering/RenderBox.cpp:
94         (WebCore::RenderBox::computePercentageLogicalHeight):
95
96 2011-03-10  Nat Duca  <nduca@chromium.org>
97
98         Reviewed by James Robinson.
99
100         [chromium] Make updateAndDrawLayers argumentless.
101         https://bugs.webkit.org/show_bug.cgi?id=55985
102
103         Made the TilePainters and viewport parameters for
104         LayerRendererChromium member variables instead of arguments on
105         updateAndDrawLayers. In a future change, this will allows us to
106         draw the layer tree without the WebView's assistance.
107
108         * platform/graphics/chromium/LayerRendererChromium.cpp:
109         (WebCore::LayerRendererChromium::create):
110         (WebCore::LayerRendererChromium::LayerRendererChromium):
111         (WebCore::LayerRendererChromium::verticalScrollbarRect):
112         (WebCore::LayerRendererChromium::horizontalScrollbarRect):
113         (WebCore::LayerRendererChromium::invalidateRootLayerRect):
114         (WebCore::LayerRendererChromium::updateRootLayerContents):
115         (WebCore::LayerRendererChromium::updateRootLayerScrollbars):
116         (WebCore::LayerRendererChromium::drawRootLayer):
117         (WebCore::LayerRendererChromium::setViewport):
118         (WebCore::LayerRendererChromium::updateAndDrawLayers):
119         (WebCore::LayerRendererChromium::updateLayers):
120         (WebCore::LayerRendererChromium::drawLayers):
121         (WebCore::LayerRendererChromium::setRootLayer):
122         (WebCore::LayerRendererChromium::getFramebufferPixels):
123         (WebCore::LayerRendererChromium::cleanupSharedObjects):
124         * platform/graphics/chromium/LayerRendererChromium.h:
125         (WebCore::LayerRendererChromium::viewportSize):
126         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
127         (WebCore::CCHeadsUpDisplay::draw):
128
129 2011-01-25  Martin Robinson  <mrobinson@igalia.com>
130
131         Reviewed by Xan Lopez.
132
133         [GTK] Implement spin buttons for GTK+ 2.x
134         https://bugs.webkit.org/show_bug.cgi?id=53098
135
136         Implement spin buttons for GTK+ 2.x. This allows proper render and functioning
137         for input type=number. The implementation is based on the one in gtkspinbutton.c
138         from the GTK+ sources.
139
140         * platform/gtk/RenderThemeGtk.h: Added new members and getters.
141         * platform/gtk/RenderThemeGtk2.cpp:
142         (WebCore::RenderThemeGtk::platformInit): Initialize spin button widget.
143         (WebCore::RenderThemeGtk::adjustRepaintRect): We need to draw outside the
144         spin button area to have proper rendering. There doesn't seem to be any other
145         clean way of having spin buttons that are the size of the text input frame.
146         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle): Added implementation.
147         (WebCore::RenderThemeGtk::paintInnerSpinButton): Ditto.
148         (WebCore::RenderThemeGtk::gtkSpinButton): Added.
149
150 2011-03-10  Levi Weintraub  <leviw@chromium.org>
151
152         Reviewed by Ryosuke Niwa.
153
154         InsertUnorderedList over a non-editable region and multiple lines enters an infinite loop
155         https://bugs.webkit.org/show_bug.cgi?id=53409
156
157         Fixing broken handling of mixed-editability content for InsertListCommand. Previously, if the selection
158         spanned non-contenteditable regions, it would get stuck endlessly iterating the same region as the algorithm
159         didn't skip the editable boundary.
160
161         Test: editing/execCommand/insert-list-with-noneditable-content.html
162
163         * editing/CompositeEditCommand.cpp:
164         (WebCore::CompositeEditCommand::cleanupAfterDeletion): Changed signature to take the destination
165         position for the active editing command. Without this, there are cases when the destination happens
166         to be a placeholder, and we remove it.
167         (WebCore::CompositeEditCommand::moveParagraphs):
168         * editing/CompositeEditCommand.h:
169         * editing/InsertListCommand.cpp:
170         (WebCore::InsertListCommand::doApply): Added logic to the paragraph iteration loop to handle pockets of
171         non-editable content in an editable context. Previously, this could cause an infinite loop.
172         * editing/visible_units.cpp:
173         (WebCore::startOfParagraph): Added a mode of operation where we'll jump across non-editable
174         content in the same paragraph to reach the actual editable paragraph start.
175         (WebCore::endOfParagraph): Ditto.
176         (WebCore::startOfNextParagraph): Now uses the aforementioned non-editable content skipping mode of
177         endOfParagraph.
178
179 2011-03-10  Berend-Jan Wever  <skylined@chromium.org>
180
181         Reviewed by Darin Adler.
182
183         Calling focus() on an area element not in a document should not cause a NULL ptr crash
184         https://bugs.webkit.org/show_bug.cgi?id=54877
185
186         Test: fast/dom/HTMLAreaElement/area-islink-focus-null-ptr-crash.html
187
188         * dom/Element.cpp:
189         (WebCore::Element::focus): Check element is in the document before allowing focus
190         * html/HTMLAreaElement.cpp: 
191         (WebCore::HTMLAreaElement::imageElement): Check element has a parent before checking if its parent is a map
192
193 2011-03-10  Xiyuan Xia  <xiyuan@chromium.org>
194
195         Reviewed by Tony Chang.
196
197         [Chromium] Fix default single selection select's popup background on chromium/linux
198         https://bugs.webkit.org/show_bug.cgi?id=56023
199
200         Test: fast/html/select-dropdown-consistent-background-color.html
201
202         * css/themeChromiumLinux.css:
203
204 2011-03-10  Kris Jordan  <krisjordan@gmail.com>
205
206         Reviewed by Alexey Proskuryakov.
207
208         Improve default Accept header to give preference to HTML over XML.
209         https://bugs.webkit.org/show_bug.cgi?id=27267
210
211         * loader/FrameLoader.cpp:Changed default accept header to match
212         FireFox' as per bug 27267.
213
214 2011-03-10  Martin Robinson  <mrobinson@igalia.com>
215
216         Reviewed by Xan Lopez.
217
218         [GTK] [Webkit2] There are no scrollbars visible in the MiniBrowser
219         https://bugs.webkit.org/show_bug.cgi?id=56125
220
221         No new tests. This functionality will be tested once we have TestRunner
222         implementation for WebKit2 with pixel dumping support.
223
224         * GNUmakefile.am: Add a new define with tracks whether or not we are using
225         our specialized GTK+ ScrollView.
226         * platform/ScrollView.cpp: Only use the GTK+-specific ScrollView if we are compiling
227         WebKit1.
228         (WebCore::ScrollView::wheelEvent):
229         * platform/gtk/ScrollViewGtk.cpp: Ditto.
230
231 2011-03-10  Kent Tamura  <tkent@chromium.org>
232
233         Reviewed by Dimitri Glazkov.
234
235         Assertion fails by validating a form twice very quickly
236         https://bugs.webkit.org/show_bug.cgi?id=56069
237
238         If the interactive validation is invoked when a form control is in
239         needsLayout() state, an assertion in isFocusable() fails. To avoid it,
240         Add a call to updateLayoutIgnorePendingStylesheets() before isFocusable().
241
242         Test: fast/forms/interactive-validation-assertion-by-validate-twice.html
243
244         * html/HTMLFormElement.cpp:
245         (WebCore::HTMLFormElement::validateInteractively):
246           Calls updateLayoutIgnorePendingStylesheets().
247
248 2011-03-10  David Hyatt  <hyatt@apple.com>
249
250         Reviewed by Beth Dakin.
251
252         https://bugs.webkit.org/show_bug.cgi?id=47143
253         
254         Static distance computation is wrong when an ancestor is also positioned.  We need to go up the container()
255         chain (after initially starting with the parent()) when doing this computation, so that we properly skip
256         intermediate boxes between two positioned blocks.
257
258         Added fast/block/positioning/static-distance-with-positioned-ancestor.html.
259
260         * rendering/RenderBox.cpp:
261         (WebCore::computeInlineStaticDistance):
262         (WebCore::computeBlockStaticDistance):
263
264 2011-03-10  Adrienne Walker  <enne@google.com>
265
266         Reviewed by Kenneth Russell.
267
268         [chromium] Make tiled compositor data structure more efficient.
269         https://bugs.webkit.org/show_bug.cgi?id=54133
270
271         Previously, the compositor had a sparse 2D array of tiles for the
272         whole page, most of which were null.  The tiles were implicitly
273         located based on their position in the array. This was inefficient
274         when the page grew (e.g. infinite scrolling) and caused some bugs
275         (e.g. width * height > MAX_INT).  This change modifies tiles to have
276         explicit positions so they can be stored in a hash map.
277
278         Tests: LayoutTests/compositing/
279
280         * platform/graphics/chromium/LayerTilerChromium.cpp:
281         (WebCore::LayerTilerChromium::reset):
282         (WebCore::LayerTilerChromium::createTile):
283         (WebCore::LayerTilerChromium::invalidateTiles):
284         (WebCore::LayerTilerChromium::contentRectToTileIndices):
285         (WebCore::LayerTilerChromium::tileAt):
286         (WebCore::LayerTilerChromium::tileContentRect):
287         (WebCore::LayerTilerChromium::tileLayerRect):
288         (WebCore::LayerTilerChromium::invalidateRect):
289         (WebCore::LayerTilerChromium::invalidateEntireLayer):
290         (WebCore::LayerTilerChromium::update):
291         (WebCore::LayerTilerChromium::updateFromPixels):
292         (WebCore::LayerTilerChromium::draw):
293         (WebCore::LayerTilerChromium::growLayerToContain):
294         * platform/graphics/chromium/LayerTilerChromium.h:
295         (WebCore::LayerTilerChromium::Tile::Tile):
296         (WebCore::LayerTilerChromium::Tile::i):
297         (WebCore::LayerTilerChromium::Tile::j):
298         (WebCore::LayerTilerChromium::Tile::moveTo):
299         (WebCore::LayerTilerChromium::TileMapKeyTraits::emptyValue):
300         (WebCore::LayerTilerChromium::TileMapKeyTraits::constructDeletedValue):
301         (WebCore::LayerTilerChromium::TileMapKeyTraits::isDeletedValue):
302
303 2011-03-10  Ryosuke Niwa  <rniwa@webkit.org>
304
305         Unreviewed build fix for r80752; Negated the boolean logic.
306
307         * editing/VisiblePosition.cpp:
308         (WebCore::VisiblePosition::next):
309         (WebCore::VisiblePosition::previous):
310
311 2011-03-10  David Hyatt  <hyatt@apple.com>
312
313         Reviewed by Adam Roben.
314
315         Make the same change to xheight on Windows for CG.
316
317         * platform/graphics/win/SimpleFontDataCGWin.cpp:
318         (WebCore::SimpleFontData::platformInit):
319
320 2011-03-10  David Hyatt  <hyatt@apple.com>
321
322         Reviewed by Simon Fraser.
323
324         https://bugs.webkit.org/show_bug.cgi?id=47147
325         
326         Fix for repaint issues when the root element is a table and needs to paint a background that
327         covers the entire canvas.  Remove paintRootBoxDecorations and replace with paintRootBoxFillLayers,
328         so that it can be called only for fill layer painting.  Make tables and normal boxes both
329         call this new method.  Fix the dirty check at the start of RenderTable paint to not happen if
330         the table is the root of the document (this same check exists in RenderBlock painting already).
331
332         * rendering/RenderBox.cpp:
333         (WebCore::RenderBox::paintRootBoxFillLayers):
334         (WebCore::RenderBox::paintBoxDecorations):
335         (WebCore::RenderBox::paintBoxDecorationsWithSize):
336         * rendering/RenderBox.h:
337         * rendering/RenderLayerCompositor.cpp:
338         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
339         * rendering/RenderTable.cpp:
340         (WebCore::RenderTable::paint):
341         (WebCore::RenderTable::paintBoxDecorations):
342
343 2011-03-10  Sheriff Bot  <webkit.review.bot@gmail.com>
344
345         Unreviewed, rolling out r80749.
346         http://trac.webkit.org/changeset/80749
347         https://bugs.webkit.org/show_bug.cgi?id=56143
348
349         "Caused at least 3 media tests to be flaky" (Requested by
350         tonyg-cr on #webkit).
351
352         * html/parser/HTMLDocumentParser.cpp:
353         (WebCore::HTMLDocumentParser::canTakeNextToken):
354         (WebCore::HTMLDocumentParser::pumpTokenizer):
355         * html/parser/HTMLParserScheduler.cpp:
356         * html/parser/HTMLParserScheduler.h:
357         (WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
358         * page/FrameView.h:
359
360 2011-03-10  Sam Weinig  <sam@webkit.org>
361
362         Reviewed by David Hyatt.
363
364         Regression: Content not drawn when scrolling horizontally in an RTL page
365         https://bugs.webkit.org/show_bug.cgi?id=55077
366
367         * platform/ScrollView.cpp:
368         (WebCore::ScrollView::overhangAmount):
369         (WebCore::ScrollView::calculateOverhangAreasForPainting):
370         Take the scroll origin into account when calculating overhang.
371
372         * platform/ScrollView.h:
373         * rendering/RenderLayer.h:
374         * platform/ScrollableArea.h:
375         (WebCore::ScrollableArea::scrollOrigin):
376         Move identical scroll origin member from ScrollView and RenderLayer
377         to shared base ScrollableArea. This is also needed so that the animator
378         can access it.
379
380         * platform/mac/ScrollAnimatorMac.mm:
381         (WebCore::ScrollAnimatorMac::pinnedInDirection):
382         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
383         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
384         Account for a scroll origin when doing calculating scroll offsets.
385
386 2011-03-09  Matthew Delaney  <mdelaney@apple.com>
387
388         Reviewed by Simon Fraser.
389
390         Plumb through settings for accelerated drawing for canvas
391         https://bugs.webkit.org/show_bug.cgi?id=56039
392
393         No new tests. Doesn't affect behavior, just adding a switch to toggle canvas backends.
394
395         * WebCore.exp.in:
396         * html/HTMLCanvasElement.cpp:
397         * html/canvas/CanvasRenderingContext2D.cpp:
398         * page/Settings.cpp:
399         * page/Settings.h:
400
401 2011-03-10  David Hyatt  <hyatt@apple.com>
402
403         Reviewed by Simon Fraser.
404
405         https://bugs.webkit.org/show_bug.cgi?id=47157
406         
407         CSS2.1 test suite failures because the ex unit is broken with the Ahem font.
408         
409         Remove the code that tries to also include the maxX of the glyph bounds for the
410         'x' glyph, since it just causes the x-height to be way too large in cases where the 'x' glyph extends
411         below the baseline.
412
413         Remove the Apple Symbol hack for ex units, since the person who added that was confused by another
414         issue, namely that CGFontGetXHeight wasn't being properly multiplied by the pointSize.  That's why
415         the value was too small.  Patched the code to just multiply by pointSize and took out the hack.
416         
417         Fix causes many tests in the css2.1 directory to progress, so no new tests required.  Many other
418         layout tests change because the xHeight for Lucida Grande gets smaller by a little bit, and radio
419         buttons use ex horizontal margins by default.
420
421         * platform/graphics/mac/SimpleFontDataMac.mm:
422         (WebCore::SimpleFontData::platformInit):
423
424 2011-03-10  Ryosuke Niwa  <rniwa@webkit.org>
425
426         Reviewed by Tony Chang.
427
428         VisiblePosition's next and previous should take an enum instead of a boolean
429         https://bugs.webkit.org/show_bug.cgi?id=56135
430
431         Changed the argument type of VisiblePosition::next and VisiblePosition::previous
432         from bool to EditingBoundaryCrossingRule. Also got rid of StayInEditableContent enum
433         in VisibleSelection and replaced it by EditingBoundaryCrossingRule because the enum
434         was only used in VisiblePosition::isAll and subsequently in SelectionController::isAll
435         to call VisiblePosition::next and VisiblePosition::previous.
436
437         * WebCore.exp.in:
438         * dom/Position.cpp:
439         (WebCore::Position::trailingWhitespacePosition):
440         * editing/ApplyBlockElementCommand.cpp:
441         (WebCore::ApplyBlockElementCommand::doApply):
442         * editing/CompositeEditCommand.cpp:
443         (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
444         * editing/InsertListCommand.cpp:
445         (WebCore::InsertListCommand::doApply):
446         (WebCore::InsertListCommand::listifyParagraph):
447         * editing/ReplaceSelectionCommand.cpp:
448         (WebCore::ReplaceSelectionCommand::shouldMergeStart):
449         (WebCore::ReplaceSelectionCommand::shouldMergeEnd):
450         (WebCore::ReplaceSelectionCommand::doApply):
451         * editing/SelectionController.cpp:
452         (WebCore::SelectionController::modifyExtendingRight):
453         (WebCore::SelectionController::modifyExtendingForward):
454         (WebCore::SelectionController::modifyMovingForward):
455         (WebCore::SelectionController::modifyExtendingLeft):
456         (WebCore::SelectionController::modifyExtendingBackward):
457         (WebCore::SelectionController::modifyMovingBackward):
458         * editing/SelectionController.h:
459         (WebCore::SelectionController::isAll):
460         * editing/TypingCommand.cpp:
461         (WebCore::TypingCommand::deleteKeyPressed):
462         (WebCore::TypingCommand::forwardDeleteKeyPressed):
463         * editing/VisiblePosition.cpp:
464         (WebCore::VisiblePosition::next):
465         (WebCore::VisiblePosition::previous):
466         * editing/VisiblePosition.h:
467         * editing/VisibleSelection.cpp:
468         (WebCore::VisibleSelection::isAll):
469         (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
470         * editing/VisibleSelection.h:
471         * editing/htmlediting.cpp:
472         (WebCore::selectionForParagraphIteration):
473         * editing/visible_units.cpp:
474         (WebCore::startOfNextParagraph):
475
476 2011-03-10  Mihai Parparita  <mihaip@chromium.org>
477
478         Reviewed by Tony Gentilcore.
479
480         Remove CRASH() calls added to track down bug 53045
481         https://bugs.webkit.org/show_bug.cgi?id=56137
482
483         Remove CRASH() calls added by r76575 and re-label ones added by r80155
484         and r80269 as being associated with bug 56124 (which may still be
485         happening).
486
487         * css/CSSImageValue.cpp:
488         (WebCore::CSSImageValue::cachedImage):
489         * css/CSSSelector.h:
490         * css/CSSSelectorList.cpp:
491         (WebCore::CSSSelectorList::deleteSelectors):
492         * loader/cache/CachedResource.cpp:
493         (WebCore::CachedResource::CachedResource):
494         (WebCore::CachedResource::~CachedResource):
495         * loader/cache/CachedResource.h:
496
497 2011-03-10  Tony Gentilcore  <tonyg@chromium.org>
498
499         Reviewed by Eric Seidel.
500
501         Let the parser yield for layout before running scripts
502         https://bugs.webkit.org/show_bug.cgi?id=54355
503
504         Prior to this patch, the parser would yield to perform a layout/paint before running a
505         script only if the script or a stylesheet blocking the script is not loaded yet. Since we
506         don't preload scan into the body while parsing the head, typically we'll block on a script
507         early in the body that causes us to yield to do the first paint within a reasonable time.
508
509         However, I'm planning to change the PreloadScanner to scan into the body from the head.
510         That significantly improves overall load time, but would hurt first paint time because
511         fewer scripts would be blocked during parsing and thus wouldn't yield.
512
513         This change causes us to yield before running scripts if we haven't painted yet (regardless
514         of whether or not the script is loaded). In addition to allowing the above mentioned
515         PreloadScanner change to be implemented without regressing first paint time, this also
516         improves first paint time by itself.
517
518         I tested Alexa's top 45 websites using Web Page Replay to control the content and simulate
519         bandwidth. This patch improved average first paint time by 1% over an unlimited connection,
520         6% over a 1Mbps connection and 11% over a 5Mbps connection. There was no statistically
521         signifcant change in page load time.
522
523         Within the pages tested, 33 had no statistically significant change in time to first paint,
524         12 improved, and none regressed. Of the improved, some of the standouts from the 1Mbps set
525         are: 20% on youtube, 37% on wiki, 27% on ebay, 13% on cnn, 16% on espn, 74% on sohu.
526
527         * html/parser/HTMLDocumentParser.cpp:
528         (WebCore::HTMLDocumentParser::canTakeNextToken): This is the new yield point.
529         (WebCore::HTMLDocumentParser::pumpTokenizer): Remove ASSERT that we are not paused. isPaused
530         means that we are waiting for a script. Bug 54574 changed pumpTokenizer() so that it does
531         the right thing whether we are just before a token or waiting for a script. Now that we may
532         yield before a token or before a script, this may be called while paused.
533         * html/parser/HTMLParserScheduler.cpp:
534         (WebCore::HTMLParserScheduler::checkForYieldBeforeScript): Added.
535         * page/FrameView.h:
536         (WebCore::FrameView::hasEverPainted): Added.
537
538 2011-03-10  Alejandro G. Castro  <alex@igalia.com>
539
540         Reviewed by Martin Robinson.
541
542         Some Gtk code uses defined(USE_FREETYPE) instead of just USE(FREETYPE)
543         https://bugs.webkit.org/show_bug.cgi?id=55996
544
545         Use the macre USE instead of defined fro WTF_USE_FREETYPE and
546         WTF_USE_PANGO.
547
548         * GNUmakefile.am:
549         * platform/graphics/cairo/OwnPtrCairo.cpp:
550         * platform/graphics/cairo/OwnPtrCairo.h:
551         * platform/graphics/cairo/RefPtrCairo.cpp:
552         * platform/graphics/cairo/RefPtrCairo.h:
553         * platform/graphics/gtk/FontGtk.cpp:
554         (WebCore::setPangoAttributes):
555         (WebCore::Font::drawComplexText):
556         (WebCore::Font::floatWidthForComplexText):
557         (WebCore::Font::offsetForPositionForComplexText):
558         (WebCore::Font::selectionRectForComplexText):
559
560 2011-03-10  Geoffrey Garen  <ggaren@apple.com>
561
562         Reviewed by Oliver Hunt.
563
564         Rolled back in 80277 and 80280 with event handler layout test failures fixed.
565         https://bugs.webkit.org/show_bug.cgi?id=55653
566
567         The failures were caused by a last minute typo: assigning to currentEvent
568         instead of m_currentEvent.
569
570         * WebCore.xcodeproj/project.pbxproj:
571         * bindings/js/JSDOMGlobalObject.cpp:
572         * bindings/js/JSDOMGlobalObject.h:
573         * bindings/js/JSDOMWindowBase.cpp:
574         * bindings/js/JSDOMWindowBase.h:
575         * bindings/js/JSDOMWindowCustom.h:
576         * bindings/js/JSWorkerContextBase.cpp:
577
578 2011-03-10  David Hyatt  <hyatt@apple.com>
579
580         Reviewed by Dan Bernstein.
581
582         https://bugs.webkit.org/show_bug.cgi?id=56129, vertical text broken on Lion and Leopard.
583
584         Add Snow Leopard ifdefs for the scaling by point size and then the division by unitsPerEm to the
585         translationsTransform applied to the results from CTFontGetVerticalTranslationsForGlyphs, since
586         this is done already on Lion and Leopard.
587
588         * platform/graphics/mac/FontMac.mm:
589         (WebCore::showGlyphsWithAdvances):
590
591 2011-03-10  Sheriff Bot  <webkit.review.bot@gmail.com>
592
593         Unreviewed, rolling out r80701.
594         http://trac.webkit.org/changeset/80701
595         https://bugs.webkit.org/show_bug.cgi?id=56126
596
597         fast/dom/Geolocation/window-close-crash.html fails on Snow
598         Leopard release builds (Requested by mihaip on #webkit).
599
600         * page/DOMWindow.cpp:
601         * page/DOMWindow.h:
602         * page/Frame.cpp:
603         (WebCore::Frame::pageDestroyed):
604         (WebCore::Frame::transferChildFrameToNewDocument):
605         * page/Geolocation.cpp:
606         (WebCore::Geolocation::~Geolocation):
607         (WebCore::Geolocation::disconnectFrame):
608         (WebCore::Geolocation::lastPosition):
609         (WebCore::Geolocation::requestPermission):
610         (WebCore::Geolocation::startUpdating):
611         (WebCore::Geolocation::stopUpdating):
612         * page/Geolocation.h:
613         * page/GeolocationController.cpp:
614         (WebCore::GeolocationController::~GeolocationController):
615         * page/Navigator.cpp:
616         * page/Navigator.h:
617         * platform/mock/GeolocationClientMock.cpp:
618         * platform/mock/GeolocationClientMock.h:
619
620 2011-03-10  Pratik Solanki  <psolanki@apple.com>
621
622         Reviewed by Alexey Proskuryakov.
623
624         ASSERT_NOT_REACHED triggered in WebCore::mapHTTPPipeliningPriorityToResourceLoadPriority
625         https://bugs.webkit.org/show_bug.cgi?id=56075
626
627         Map priority value 3, which means no priority, to ResourceLoadPriorityUnresolved.
628
629         * platform/network/cf/ResourceRequestCFNet.h:
630         (WebCore::mapHTTPPipeliningPriorityToResourceLoadPriority):
631         (WebCore::mapResourceLoadPriorityToHTTPPipeliningPriority):
632
633 2011-03-10  Andrey Adaikin  <aandrey@google.com>
634
635         Reviewed by Pavel Feldman.
636
637         Web Inspector: [Text editor] Substitute live-edit mode activation by double-click
638         https://bugs.webkit.org/show_bug.cgi?id=56084
639
640         Also fixed a regression: console was not opening/closing on ESC key press because tabIndex="0" attribute was preserved for a readOnly viewer.
641
642         * inspector/front-end/SourceFrame.js:
643         (WebInspector.SourceFrame):
644         (WebInspector.SourceFrame.prototype._startEditing):
645         (WebInspector.SourceFrame.prototype._registerShortcuts):
646         (WebInspector.SourceFrame.prototype._handleKeyDown):
647         (WebInspector.SourceFrame.prototype._handleSave):
648         (WebInspector.SourceFrame.prototype._handleRevertEditing):
649         (WebInspector.SourceFrame.prototype._doubleClick):
650         * inspector/front-end/TextEditorModel.js:
651         (WebInspector.TextEditorModel.prototype.get text):
652         * inspector/front-end/TextViewer.js:
653         (WebInspector.TextViewer.prototype.get readOnly):
654         (WebInspector.TextEditorMainPanel):
655         (WebInspector.TextEditorMainPanel.prototype.set readOnly):
656         (WebInspector.TextEditorMainPanel.prototype.get readOnly):
657
658 2011-03-10  Greg Simon  <gregsimon@chromium.org>
659
660         Reviewed by Pavel Feldman.
661
662         Web Inspector: Need new graphic icon for garbage collect button.
663         https://bugs.webkit.org/show_bug.cgi?id=55794
664
665         No new tests: gc tests are flaky due to non-determinisic
666         behavior of collection APIs (more notes in bug)
667
668         * English.lproj/localizedStrings.js:
669         * WebCore.gypi:
670         * bindings/js/ScriptProfiler.cpp:
671         (WebCore::ScriptProfiler::collectGarbage):
672         * bindings/js/ScriptProfiler.h:
673         * bindings/v8/ScriptProfiler.cpp:
674         (WebCore::ScriptProfiler::collectGarbage):
675         * bindings/v8/ScriptProfiler.h:
676         * inspector/Inspector.idl:
677         * inspector/InspectorProfilerAgent.cpp:
678         (WebCore::InspectorProfilerAgent::collectGarbage):
679         * inspector/InspectorProfilerAgent.h:
680         * inspector/front-end/Images/garbageCollectButtonGlyph.png: Added.
681         * inspector/front-end/TimelinePanel.js:
682         (WebInspector.TimelinePanel.prototype.get statusBarItems):
683         (WebInspector.TimelinePanel.prototype._createStatusbarButtons):
684         (WebInspector.TimelinePanel.prototype._garbageCollectButtonClicked):
685         * inspector/front-end/inspector.css:
686         (.garbage-collect-status-bar-item .glyph):
687
688 2011-03-10  Andrey Kosyakov  <caseq@chromium.org>
689
690         Web Inspector: better names for HAR export commands
691         https://bugs.webkit.org/show_bug.cgi?id=56097
692
693         Rename Export to HAR to Copy entry/network log as HAR
694         Expose Copy as HAR unconditionally, remove related settings entry.
695
696         * English.lproj/localizedStrings.js:
697         * inspector/front-end/NetworkPanel.js:
698         (WebInspector.NetworkPanel.prototype._contextMenu):
699         * inspector/front-end/Settings.js:
700
701 2011-03-10  Qi Zhang  <qi.2.zhang@nokia.com>
702
703         Reviewed by Laszlo Gombos.
704
705         [Qt] Mobile Devices should include Model and Firmware Version in Webkit Generated User Agent String
706         https://bugs.webkit.org/show_bug.cgi?id=48636
707
708         Fix a typo in features.pri that turns on this feature on mobile
709         devices by default.
710
711         * features.pri:
712
713 2011-03-10  Alexander Pavlov  <apavlov@chromium.org>
714
715         Reviewed by Pavel Feldman.
716
717         Web Inspector: Invalid expected parameter list in CSSAgent.setSelectorText() callback (CSSStyleModel.js)
718         https://bugs.webkit.org/show_bug.cgi?id=56092
719
720         * inspector/front-end/CSSStyleModel.js:
721         (WebInspector.CSSStyleModel.prototype.setRuleSelector):
722
723 2011-03-10  Pavel Feldman  <pfeldman@chromium.org>
724
725         Not reviewed: rolling out r80478 and its follow ups for breaking
726         inspector and engadget.com.
727         https://bugs.webkit.org/show_bug.cgi?id=49401
728
729         * dom/Document.cpp:
730         (WebCore::Document::Document):
731         (WebCore::performTask):
732         (WebCore::Document::postTask):
733         * dom/Document.h:
734         * loader/FrameLoader.cpp:
735         (WebCore::FrameLoader::setDefersLoading):
736         * manual-tests/database-callback-deferred.html: Removed.
737         * page/PageGroupLoadDeferrer.cpp:
738         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
739         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
740
741 2011-03-10  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
742
743         Reviewed by Kenneth Rohde Christiansen.
744
745         Tiled backing store's delegated scroll request uses incorrect convention
746         https://bugs.webkit.org/show_bug.cgi?id=56011
747
748         Use a point instead of delta, when relaying the scroll request from
749         ScrollView::setScrollPosition.
750
751         * loader/EmptyClients.h:
752         (WebCore::EmptyChromeClient::delegatedScrollRequested):
753         * page/Chrome.cpp:
754         (WebCore::Chrome::delegatedScrollRequested):
755         * page/Chrome.h:
756         * page/ChromeClient.h:
757         * platform/HostWindow.h:
758         * platform/ScrollView.cpp:
759         (WebCore::ScrollView::setScrollPosition):
760
761 2011-03-10  Pavel Feldman  <pfeldman@chromium.org>
762
763         Reviewed by Yury Semikhatsky.
764
765         Web Inspector: brush up DOM agent API.
766         https://bugs.webkit.org/show_bug.cgi?id=56093
767
768         * inspector/Inspector.idl:
769         * inspector/InspectorDOMAgent.cpp:
770         (WebCore::InspectorDOMAgent::childNodes):
771         (WebCore::InspectorDOMAgent::setNodeName):
772         (WebCore::InspectorDOMAgent::outerHTML):
773         (WebCore::InspectorDOMAgent::setNodeValue):
774         * inspector/InspectorDOMAgent.h:
775         * inspector/front-end/DOMAgent.js:
776         (WebInspector.DOMNode):
777         (WebInspector.DOMNode.prototype.hasAttributes):
778         (WebInspector.DOMNode.prototype.nodeType):
779         (WebInspector.DOMNode.prototype.nodeName):
780         (WebInspector.DOMNode.prototype.setNodeName):
781         (WebInspector.DOMNode.prototype.localName):
782         (WebInspector.DOMNode.prototype.nodeValue):
783         (WebInspector.DOMNode.prototype.setNodeValue):
784         (WebInspector.DOMNode.prototype.setAttribute):
785         (WebInspector.DOMNode.prototype.attributes):
786         (WebInspector.DOMNode.prototype.removeAttribute):
787         (WebInspector.DOMNode.prototype.childNodes.mycallback):
788         (WebInspector.DOMNode.prototype.childNodes):
789         (WebInspector.DOMNode.prototype.outerHTML):
790         (WebInspector.DOMNode.prototype.setOuterHTML):
791         (WebInspector.DOMNode.prototype.removeNode):
792         (WebInspector.DOMNode.prototype.copyNode):
793         (WebInspector.DOMNode.prototype.path):
794         (WebInspector.DOMNode.prototype._setAttributesPayload):
795         (WebInspector.DOMNode.prototype._addAttribute):
796         (WebInspector.DOMAgent.prototype._characterDataModified):
797         * inspector/front-end/ElementsPanel.js:
798         (WebInspector.ElementsPanel.prototype.updateBreadcrumb):
799         (WebInspector.ElementsPanel.prototype.decorateNodeLabel):
800         (WebInspector.ElementsPanel.prototype.handleCopyEvent):
801         * inspector/front-end/ElementsTreeOutline.js:
802         (WebInspector.ElementsTreeOutline.prototype.findTreeElement):
803         (WebInspector.ElementsTreeElement):
804         (WebInspector.ElementsTreeElement.prototype.updateChildren):
805         (WebInspector.ElementsTreeElement.prototype._updateChildren):
806         (WebInspector.ElementsTreeElement.prototype._startEditingTarget):
807         (WebInspector.ElementsTreeElement.prototype._startEditing):
808         (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
809         (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted.moveToNextAttributeIfNeeded):
810         (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted):
811         (WebInspector.ElementsTreeElement.prototype._textNodeEditingCommitted):
812         (WebInspector.ElementsTreeElement.prototype._attributeHTML):
813         ():
814         * inspector/front-end/EventListenersSidebarPane.js:
815         ():
816         * inspector/front-end/MetricsSidebarPane.js:
817         * inspector/front-end/StylesSidebarPane.js:
818         * inspector/front-end/utilities.js:
819
820 2011-03-09  Alexander Pavlov  <apavlov@chromium.org>
821
822         Reviewed by Pavel Feldman.
823
824         Web Inspector: [STYLES] Editing a property value adds a word for any property value that uses a paren
825         https://bugs.webkit.org/show_bug.cgi?id=56002
826
827         * inspector/front-end/StylesSidebarPane.js: Introduce an additional check.
828
829 2011-03-09  Pavel Podivilov  <podivilov@chromium.org>
830
831         Reviewed by Pavel Feldman.
832
833         Web Inspector: use DebuggerPresentation instead of DebuggerModel in source frame delegate.
834         https://bugs.webkit.org/show_bug.cgi?id=56034
835
836         * inspector/front-end/DebuggerPresentationModel.js:
837         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
838         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
839         (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
840         (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint):
841         (WebInspector.DebuggerPresentationModel.prototype._sourceLocationToActualLocation):
842         * inspector/front-end/ScriptsPanel.js:
843         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
844         (WebInspector.SourceFrameDelegateForScriptsPanel):
845         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setBreakpoint):
846         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.updateBreakpoint):
847         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.removeBreakpoint):
848         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.findBreakpoint):
849         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.continueToLine):
850         * inspector/front-end/SourceFrame.js:
851         (WebInspector.SourceFrame.prototype._contextMenu.else.editBreakpointCondition.didEditBreakpointCondition):
852         (WebInspector.SourceFrame.prototype._contextMenu.else.editBreakpointCondition):
853         (WebInspector.SourceFrame.prototype._contextMenu.else.setBreakpointEnabled):
854         (WebInspector.SourceFrame.prototype._contextMenu):
855         (WebInspector.SourceFrame.prototype._mouseDown):
856         (WebInspector.SourceFrameDelegate.prototype.removeBreakpoint):
857         (WebInspector.SourceFrameDelegate.prototype.updateBreakpoint):
858
859 2011-03-09  Alexander Pavlov  <apavlov@chromium.org>
860
861         Reviewed by Pavel Feldman.
862
863         Web Inspector: elements dom tree - word wrap toggle
864         https://bugs.webkit.org/show_bug.cgi?id=44311
865
866         A "Word Wrap" option is now shown in a context menu for the entire DOM tree content area
867         and persisted into application settings.
868
869         * English.lproj/localizedStrings.js:
870         * inspector/front-end/ElementsPanel.js:
871         (WebInspector.ElementsPanel.prototype._contextMenuEventFired):
872         (WebInspector.ElementsPanel.prototype._contextMenuEventFired.toggleWordWrap):
873         * inspector/front-end/ElementsTreeOutline.js:
874         (WebInspector.ElementsTreeOutline):
875         (WebInspector.ElementsTreeOutline.prototype._treeElementFromEvent):
876         (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
877         (WebInspector.ElementsTreeElement.prototype.onreveal):
878         * inspector/front-end/Settings.js:
879         (WebInspector.Settings):
880         * inspector/front-end/inspector.css:
881         (#elements-content.nowrap):
882         (#elements-content > ol):
883
884 2011-03-09  Pavel Podivilov  <podivilov@chromium.org>
885
886         Reviewed by Pavel Feldman.
887
888         Web Inspector: re-implement breakpoints sidebar pane based on debugger presentation model.
889         https://bugs.webkit.org/show_bug.cgi?id=55823
890
891         * inspector/front-end/BreakpointsSidebarPane.js:
892         (WebInspector.JavaScriptBreakpointsSidebarPane):
893         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint.didLoadSnippet):
894         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint):
895         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.removeBreakpoint):
896         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.highlightBreakpoint):
897         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.clearBreakpointHighlight):
898         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._createBreakpointItemId):
899         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointClicked):
900         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked):
901         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenu):
902         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.reset):
903         * inspector/front-end/DebuggerPresentationModel.js:
904         (WebInspector.DebuggerPresentationModel):
905         (WebInspector.DebuggerPresentationModel.prototype._parsedScriptSource):
906         (WebInspector.DebuggerPresentationModel.prototype._failedToParseScriptSource):
907         (WebInspector.DebuggerPresentationModel.prototype._revealHiddenBreakpoints):
908         (WebInspector.DebuggerPresentationModel.prototype.breakpointsForSourceFileId):
909         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
910         (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
911         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
912         (WebInspector.DebuggerPresentationModel.prototype.set selectedCallFrame):
913         (WebInspector.DebuggerPresentationModel.prototype._actualLocationToSourceLocation):
914         (WebInspector.DebuggerPresentationModel.prototype.reset):
915         * inspector/front-end/ScriptsPanel.js:
916         (WebInspector.ScriptsPanel):
917         (WebInspector.ScriptsPanel.prototype._breakpointAdded):
918         (WebInspector.ScriptsPanel.prototype._breakpointRemoved):
919         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
920         (WebInspector.ScriptsPanel.prototype.reset):
921         (WebInspector.ScriptsPanel.prototype._clearInterface):
922
923 2011-03-10  Andrey Adaikin  <aandrey@google.com>
924
925         Reviewed by Pavel Feldman.
926
927         Web Inspector: Highlighter refactoring
928         https://bugs.webkit.org/show_bug.cgi?id=56015
929
930         * inspector/front-end/TextEditorHighlighter.js:
931         (WebInspector.TextEditorHighlighter):
932         (WebInspector.TextEditorHighlighter.prototype.set mimeType):
933         (WebInspector.TextEditorHighlighter.prototype.highlight):
934         (WebInspector.TextEditorHighlighter.prototype.updateHighlight):
935         (WebInspector.TextEditorHighlighter.prototype._highlightInChunks):
936         (WebInspector.TextEditorHighlighter.prototype._highlightLines):
937         (WebInspector.TextEditorHighlighter.prototype._selectHighlightState):
938         (WebInspector.TextEditorHighlighter.prototype._clearHighlightState):
939         * inspector/front-end/TextViewer.js:
940         (WebInspector.TextEditorMainPanel.prototype._buildChunks):
941         (WebInspector.TextEditorMainPanel.prototype._updateHighlightsForRange):
942
943 2011-03-05  Pavel Podivilov  <podivilov@chromium.org>
944
945         Reviewed by Pavel Feldman.
946
947         Web Inspector: move breakpoint column adjustment to debugger model.
948         https://bugs.webkit.org/show_bug.cgi?id=55821
949
950         Test: inspector/debugger/debug-inlined-scripts.html
951
952         * inspector/front-end/DebuggerModel.js:
953         (WebInspector.DebuggerModel.prototype.setBreakpoint.didSetBreakpoint):
954         (WebInspector.DebuggerModel.prototype.setBreakpoint):
955         * inspector/front-end/SourceFrameContent.js:
956         (WebInspector.SourceFrameContent.prototype.sourceFrameLineNumberToActualLocation):
957
958 2011-01-21  John Knottenbelt  <jknotten@chromium.org>
959
960         Reviewed by Dmitry Titov.
961
962         Detach Geolocation from Frame when Page destroyed.
963         https://bugs.webkit.org/show_bug.cgi?id=52877
964
965         On Page destruction, any outstanding Geolocation permission
966         requests should be cancelled, because the Geolocation can only
967         access the client indirectly via m_frame->page().
968
969         Page destruction is signalled by a call to the
970         Frame::pageDestroyed() method. This explictly calls
971         DOMWindow::resetGeolocation which ultimately calls Geolocation::reset.
972
973         Geolocation::reset() detaches from the GeolocationController,
974         cancels requests, watches and single shots, and sets the
975         permission state back to Unknown.
976
977         Frame::pageDestroyed() is also called by FrameLoader even though
978         the page is not destroyed. We should still cancel permission
979         requests, because the GeolocationClient will become inaccessible
980         to the Geolocation object after this call.
981
982         Frame::transferChildFrameToNewDocument also indirectly calls
983         Geolocation::reset when the frame is reparented between
984         pages. Ideally we would like the Geolocation's activities to
985         continue after reparenting, see bug
986         https://bugs.webkit.org/show_bug.cgi?id=55577
987
988         Since GeolocationController is owned by Page, and all Geolocation
989         objects will now unsubscribe from the GeolocationController on
990         pageDetached(), we no longer need to call stopUpdating() from the
991         GeolocationController's destructor. Instead we can simply assert
992         that there should be no no observers. See related bug
993         https://bugs.webkit.org/show_bug.cgi?id=52216 .
994
995         Introduced new method 'numberOfPendingPermissionRequests' on
996         GeolocationClientMock to count the number of outstanding pending
997         permission requests. This provides a reusable implementation for
998         client-based implementations of the LayoutTestController's
999         numberOfPendingGeolocationPermissionRequests method.
1000
1001         Test: fast/dom/Geolocation/page-reload-cancel-permission-requests.html
1002
1003         * page/DOMWindow.cpp:
1004         (WebCore::DOMWindow::resetGeolocation):
1005         * page/DOMWindow.h:
1006         * page/Frame.cpp:
1007         (WebCore::Frame::pageDestroyed):
1008         (WebCore::Frame::transferChildFrameToNewDocument):
1009         * page/Geolocation.cpp:
1010         (WebCore::Geolocation::~Geolocation):
1011         (WebCore::Geolocation::page):
1012         (WebCore::Geolocation::reset):
1013         (WebCore::Geolocation::disconnectFrame):
1014         (WebCore::Geolocation::lastPosition):
1015         (WebCore::Geolocation::requestPermission):
1016         (WebCore::Geolocation::startUpdating):
1017         (WebCore::Geolocation::stopUpdating):
1018         * page/Geolocation.h:
1019         * page/GeolocationController.cpp:
1020         (WebCore::GeolocationController::~GeolocationController):
1021         * page/Navigator.cpp:
1022         (WebCore::Navigator::resetGeolocation):
1023         * page/Navigator.h:
1024         * platform/mock/GeolocationClientMock.cpp:
1025         (WebCore::GeolocationClientMock::numberOfPendingPermissionRequests):
1026         * platform/mock/GeolocationClientMock.h:
1027
1028 2011-03-10  Ojan Vafai  <ojan@chromium.org>
1029
1030         Reviewed by Darin Adler.
1031
1032         Able to move nodes across documents
1033         https://bugs.webkit.org/show_bug.cgi?id=19524
1034
1035         Makes cross-document appendChild, insertBefore, Range.insertNode and Range.surroundContents work.
1036         This matches Gecko and the new Dom Core spec. There are a number of Range methods where we don't 
1037         match Gecko or the spec that will need to be updated in a following patch.
1038
1039         Test: fast/dom/move-nodes-across-documents.html
1040
1041         * dom/Element.cpp:
1042         (WebCore::Element::removeAttributeNode):
1043         * dom/NamedNodeMap.cpp:
1044         (WebCore::NamedNodeMap::setNamedItem):
1045         * dom/Node.cpp:
1046         (WebCore::Node::setDocumentRecursively):
1047         (WebCore::checkAcceptChild):
1048         (WebCore::Node::checkReplaceChild):
1049         * dom/Range.cpp:
1050         (WebCore::Range::insertNode):
1051         (WebCore::Range::surroundContents):
1052
1053 2011-03-09  Antti Koivisto  <antti@apple.com>
1054
1055         Not reviewed.
1056
1057         Reverting crash catching code, the bug being hunted was fixed by
1058         http://trac.webkit.org/changeset/80686
1059
1060         * loader/cache/CachedResourceLoader.cpp:
1061         (WebCore::CachedResourceLoader::CachedResourceLoader):
1062         (WebCore::CachedResourceLoader::~CachedResourceLoader):
1063         (WebCore::CachedResourceLoader::requestImage):
1064         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1065         (WebCore::CachedResourceLoader::requestResource):
1066         (WebCore::CachedResourceLoader::setAutoLoadImages):
1067         (WebCore::CachedResourceLoader::load):
1068         (WebCore::CachedResourceLoader::loadDone):
1069         (WebCore::CachedResourceLoader::preload):
1070         (WebCore::CachedResourceLoader::requestPreload):
1071         * loader/cache/CachedResourceLoader.h:
1072
1073 2011-03-09  Peter Kasting  <pkasting@google.com>
1074
1075         Unreviewed, build fix.
1076
1077         * StringsNotToBeLocalized.txt: Add function names I forgot.
1078         * platform/win/SystemInfo.cpp: #if out some uncalled functions on WinCE,
1079           since they don't compile anyway.  Use ZeroMemory() instead of "= {0}"
1080           since Qt is stupid and (sometimes?!) warns about it.
1081         (WebCore::windowsVersion):
1082         (WebCore::processorArchitecture):
1083
1084 2011-03-09  Peter Kasting  <pkasting@google.com>
1085
1086         Reviewed by Ryosuke Niwa.
1087
1088         Add UA string tags for Windows 64.
1089         https://bugs.webkit.org/show_bug.cgi?id=55226
1090
1091         * StringsNotToBeLocalized.txt:
1092         * platform/win/SystemInfo.cpp:
1093         (WebCore::osVersionForUAString):
1094         (WebCore::isWOW64):
1095         (WebCore::processorArchitecture):
1096         (WebCore::architectureTokenForUAString):
1097         (WebCore::windowsVersionForUAString):
1098
1099 2011-03-09  Peter Kasting  <pkasting@google.com>
1100
1101         Unreviewed, attempted build fix.
1102
1103         * WebCore.pri: Try to update include path for Qt Windows build.
1104
1105 2011-03-09  Peter Kasting  <pkasting@google.com>
1106
1107         Unreviewed, build fix.
1108
1109         * platform/win/SystemInfo.cpp:
1110         (WebCore::windowsVersionForUAString): Fix const conversion warning on Qt.
1111
1112 2011-03-09  Peter Kasting  <pkasting@google.com>
1113
1114         Reviewed by Mihai Parparita.
1115
1116         Unify Windows version checks.
1117         https://bugs.webkit.org/show_bug.cgi?id=55979
1118
1119         * GNUmakefile.am: Fix spaces -> tabs.
1120         * StringsNotToBeLocalized.txt:
1121         * WebCore.pro: Add SystemInfo.* to Qt build.
1122         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
1123         (WebCore::ScrollbarThemeChromiumWin::invalidateOnMouseEnterExit):
1124         (WebCore::ScrollbarThemeChromiumWin::getThemeState):
1125         (WebCore::ScrollbarThemeChromiumWin::getThemeArrowState):
1126         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
1127         (WebCore::fillBMPGlyphs):
1128         * platform/win/CursorWin.cpp:
1129         (WebCore::createSharedCursor):
1130         * platform/win/ScrollbarThemeWin.cpp:
1131         (WebCore::ScrollbarThemeWin::ScrollbarThemeWin):
1132         * platform/win/SystemInfo.cpp: Add full-fledged version check and UA string helper function.
1133         (WebCore::windowsVersion):
1134         (WebCore::windowsVersionForUAString):
1135         * platform/win/SystemInfo.h: Add full-fledged version check and UA string helper function.
1136         * rendering/RenderThemeChromiumWin.cpp:
1137         (WebCore::getNonClientMetrics):
1138         * rendering/RenderThemeWin.cpp:
1139         (WebCore::RenderThemeWin::getThemeData):
1140         (WebCore::RenderThemeWin::paintMenuList):
1141         (WebCore::RenderThemeWin::paintMenuListButton):
1142
1143 2011-03-09  Mihai Parparita  <mihaip@chromium.org>
1144
1145         Reviewed by Tony Gentilcore.
1146
1147         REGRESSION (r74807): memory corruption after CachedResourceLoader refactoring
1148         https://bugs.webkit.org/show_bug.cgi?id=53045
1149         
1150         Copy the URL out of the CachedResource that is being revalidated, so
1151         that we can still use it (in m_validatedURLs) after removing the
1152         resource from the memory cache, which may delete it.
1153
1154         No new tests, since I was not able to trigger this locally (in a layout
1155         test or otherwise).
1156
1157         * loader/cache/CachedResourceLoader.cpp:
1158         (WebCore::CachedResourceLoader::revalidateResource):
1159
1160 2011-03-09  Chris Fleizach  <cfleizach@apple.com>
1161
1162         Reviewed by Beth Dakin.
1163
1164         VO reporting incorrect list count for http://www.macworld.com/news.html
1165         https://bugs.webkit.org/show_bug.cgi?id=56064
1166
1167         <li> tags should not be ignored, because they provide valuable information
1168         to screen readers.
1169
1170         Test: platform/mac/accessibility/list-items-ignored.html
1171
1172         * accessibility/AccessibilityRenderObject.cpp:
1173         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1174
1175 2011-03-09  Dan Bernstein  <mitz@apple.com>
1176
1177         Reviewed by Dave Hyatt.
1178
1179         <rdar://problem/8733254> Float disappears after incremental layout
1180         Fixed the original bug and a copule more issues noticed while doing so.
1181
1182         Tests: fast/dynamic/dirty-float-in-clean-line.html
1183                fast/dynamic/float-at-line-break.html
1184                fast/dynamic/float-from-empty-line.html
1185
1186         * rendering/RenderBlock.h:
1187         * rendering/RenderBlockLineLayout.cpp:
1188         (WebCore::RenderBlock::layoutInlineChildren): If findNextLineBreak() returned an empty line,
1189         update the line break info of the last line with the new line break position. This is tested
1190         by float-from-empty-line.html.
1191         (WebCore::RenderBlock::checkFloatsInCleanLine): Factored out code from determineStartPosition()
1192         into this new function.
1193         (WebCore::RenderBlock::determineStartPosition): Call checkFloatsInCleanLine().
1194         (WebCore::RenderBlock::determineEndPosition): When iterating over lines, check clean lines with
1195         floats, as they may yet become dirty because of the floats. This is tested by
1196         dirty-float-in-clean-line.html.
1197         (WebCore::RenderBlock::findNextLineBreak): If a float fits on the line, and the current line
1198         break is at the float, advance it to after the float. Otherwise, if the line gets dirty and the
1199         next one does not, the float will not make it into any line. This is tested by
1200         float-at-line-break.html.
1201
1202 2011-03-09  Ryosuke Niwa  <rniwa@webkit.org>
1203
1204         Reviewed by Kent Tamura.
1205
1206         selectionStart reports wrong caret position when the last characters are newlines
1207         https://bugs.webkit.org/show_bug.cgi?id=56061
1208
1209         The bug was caused by SelectionController::setSelection's not calling
1210         notifyRendererOfSelectionChange when old selection was equal to new selection.
1211
1212         Because InsertLineBreakCommand inserts a text node with a single LF before the caret,
1213         this condition holds after the command is executed. However, the values of
1214         selectionStart and selectionEnd still need to be updated in this case because
1215         the offsets counted from the beginning of textarea have been increased by 1.
1216
1217         * editing/SelectionController.cpp:
1218         (WebCore::SelectionController::setSelection): Call notifyRendererOfSelectionChange
1219         when m_selection = s.
1220         * manual-tests/selection-start-after-inserting-line-break-in-textarea.html: Added.
1221
1222 2011-03-09  Andy Estes  <aestes@apple.com>
1223
1224         Reviewed by Adam Barth.
1225
1226         Bad cast in HTMLTreeBuilder::processStartTag
1227         https://bugs.webkit.org/show_bug.cgi?id=55955
1228
1229         Test: fast/parser/self-closing-foreign-content.html
1230
1231         When the parser encounters an svg or mathml root element, it places the
1232         insertion mode into InForeignContentMode. However, if the root element
1233         is self-closing (e.g. <svg />) then the element is never placed on the
1234         open elements stack. This leaves the parser in an inconsistent state
1235         where it is in InForeignContentMode but no foreign content is in the
1236         open element stack.
1237
1238         * html/parser/HTMLTreeBuilder.cpp:
1239         (WebCore::HTMLTreeBuilder::processStartTagForInBody): If a self-closing
1240         foreign element is inserted into the tree, do not set the insertion
1241         mode to InForeignContentMode.
1242
1243 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
1244
1245         Qt build fix.
1246
1247         * bridge/qt/qt_runtime.cpp:
1248         (JSC::Bindings::convertQVariantToValue):
1249
1250 2011-03-09  Andy Estes  <aestes@apple.com>
1251
1252         Reviewed by Adam Barth.
1253
1254         REGRESSION (r80320): Assertion failure when processing mis-nested foreign content.
1255         https://bugs.webkit.org/show_bug.cgi?id=55982
1256
1257         Test: fast/parser/fragment-foreign-content-misnested.html
1258         
1259         It is a parse error to encounter certain start tags while the parser's
1260         insertion mode is InForeignContentMode (e.g. <br>). In these cases, we
1261         are to pop open elements off the HTMLElementStack until a foreign
1262         content scope marker is encountered. Before the change in r80320 to not
1263         insert a fake HTML element during fragment parsing, said fake HTML
1264         element counted as a foreign content scope marker.
1265         
1266         With r80320, no fake HTML element is inserted and the stack is popped
1267         until empty in cases where no other element claims to be a foreign
1268         content scope marker. Fix this by treating the DocumentFragment as a
1269         foreign content scope marker.
1270
1271         * html/parser/HTMLElementStack.cpp:
1272         (WebCore::HTMLNames::isForeignContentScopeMarker): Take a
1273         ContainerNode* instead of a Element*.
1274         (WebCore::HTMLElementStack::popUntilForeignContentScopeMarker): Pass
1275         topNode() to isForeignContentScopeMarker() instead of top().
1276
1277 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
1278
1279         Reviewed by Darin Adler.
1280
1281         Bug 56041 - RexExp constructor should only accept flags "gim"
1282         We also should be passing the flags around as a bitfield rather than a string,
1283         and should not have redundant, incompatible code for converting the string to a bitfield!
1284
1285         * bindings/js/SerializedScriptValue.cpp:
1286         (WebCore::CloneDeserializer::readTerminal):
1287             - Need to parse flags string back to enum.
1288
1289 2011-03-09  James Robinson  <jamesr@chromium.org>
1290
1291         Reviewed by Kenneth Russell.
1292
1293         [chromium]: Regression - Explicitly copy compositing properties from LayerChromium to CCLayerImpl
1294         https://bugs.webkit.org/show_bug.cgi?id=56021
1295
1296         Initializes the m_doubleSided flag of LayerChromiums to the default
1297         value of true so the back sides of layers without
1298         backface-visibility:hidden are rendered.
1299
1300         Test: compositing/backface-visibility.html
1301
1302         * platform/graphics/chromium/LayerChromium.cpp:
1303         (WebCore::LayerChromium::LayerChromium):
1304
1305 2011-03-09  David Hyatt  <hyatt@apple.com>
1306
1307         Reviewed by Dan Bernstein.
1308
1309         <rdar://problem/9110316> REGRESSION: 'ex' unit broken for vertical text
1310
1311         Fall back to the verticalRightOrientation data when obtaining the x-height for vertically oriented
1312         text. That way we use the same metrics as for horizontal.
1313
1314         This fixes regressions in fast/lists and fast/overflow vertical text tests.
1315
1316         * platform/graphics/mac/SimpleFontDataMac.mm:
1317         (WebCore::SimpleFontData::platformInit):
1318         (WebCore::SimpleFontData::platformBoundsForGlyph):
1319
1320 2011-03-09  Ryosuke Niwa  <rniwa@webkit.org>
1321
1322         Reviewed by Tony Chang.
1323
1324         REGRESSION: crash in nextLinePosition when extending selection forward by line in an empty document
1325         https://bugs.webkit.org/show_bug.cgi?id=56004
1326
1327         The crash was caused by the false assumption that rootEditableElement() or documentElement()
1328         always return non-null pointer. Fixed the bug by adding an early exit.
1329
1330         Test: editing/selection/extend-by-line-in-empty-document.html
1331
1332         * editing/visible_units.cpp:
1333         (WebCore::previousLinePosition):
1334         (WebCore::nextLinePosition):
1335
1336 2011-03-09  Pavel Podivilov  <podivilov@chromium.org>
1337
1338         Reviewed by Pavel Feldman.
1339
1340         Web Inspector: it should be possible to copy stack trace from call stack sidebar pane.
1341         https://bugs.webkit.org/show_bug.cgi?id=56024
1342
1343         * English.lproj/localizedStrings.js:
1344         * inspector/front-end/CallStackSidebarPane.js:
1345         (WebInspector.CallStackSidebarPane):
1346         (WebInspector.CallStackSidebarPane.prototype.update):
1347         (WebInspector.CallStackSidebarPane.prototype._contextMenu):
1348
1349 2011-03-09  David Hyatt  <hyatt@apple.com>
1350
1351         Reviewed by Darin Adler.
1352
1353         Patch FontPlatformDataLinux to properly initialize and copy orientation/text-orientation in all
1354         places.  Make sure text-orientation is specified in the lookups/creation in FontCustomPlatformData
1355         and FontCache.
1356
1357         * platform/graphics/chromium/FontPlatformDataLinux.cpp:
1358         (WebCore::FontPlatformData::FontPlatformData):
1359         * platform/graphics/chromium/FontPlatformDataLinux.h:
1360         (WebCore::FontPlatformData::FontPlatformData):
1361
1362 2011-03-09  Steve Block  <steveblock@google.com>
1363
1364         Reviewed by Jeremy Orlow.
1365
1366         JavaNPObject should not use JNI directly
1367         https://bugs.webkit.org/show_bug.cgi?id=56009
1368
1369         We move the JNI code to access a Java object's fields into
1370         a new JavaInstance::getField() method.
1371
1372         No new tests, refactoring only.
1373
1374         * bridge/jni/v8/JavaInstanceV8.cpp:
1375         (JavaInstance::getField):
1376         * bridge/jni/v8/JavaInstanceV8.h:
1377         * bridge/jni/v8/JavaNPObjectV8.cpp:
1378         (JSC::Bindings::JavaNPObjectGetProperty):
1379
1380 2011-03-09  Steve Block  <steveblock@google.com>
1381
1382         Reviewed by Jeremy Orlow.
1383
1384         NPAPI - jvalue conversion should not be in JavaInstance
1385         https://bugs.webkit.org/show_bug.cgi?id=55967
1386
1387         No new tests, refactoring only.
1388
1389         * bridge/jni/v8/JavaInstanceV8.cpp:
1390         (JavaInstance::invokeMethod):
1391         * bridge/jni/v8/JavaInstanceV8.h:
1392         * bridge/jni/v8/JavaNPObjectV8.cpp:
1393         (JSC::Bindings::JavaNPObjectInvoke):
1394
1395 2011-03-09  Jessie Berlin  <jberlin@apple.com>
1396
1397         Reviewed by Adam Roben.
1398
1399         Use the Cookie Storage from the Private Browsing Storage Session directly
1400         https://bugs.webkit.org/show_bug.cgi?id=55986
1401
1402         * WebCore.exp.in:
1403         * platform/mac/WebCoreSystemInterface.h:
1404         * platform/mac/WebCoreSystemInterface.mm:
1405
1406         * platform/network/mac/CookieStorageMac.mm:
1407         (WebCore::setCookieStoragePrivateBrowsingEnabled):
1408         Just copy the cookie storage from the private browsing storage session.
1409         * platform/network/cf/CookieStorageCFNet.cpp:
1410         (WebCore::setCookieStoragePrivateBrowsingEnabled):
1411         Ditto.
1412
1413 2011-03-09  Andrey Kosyakov  <caseq@chromium.org>
1414
1415         Unreviewed. Fixed a crash in InspectorInstrumentation::didReceiveResponse() when loader is null (broken in r80639)
1416
1417         * inspector/InspectorInstrumentation.cpp:
1418         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
1419
1420 2011-03-09  Yury Semikhatsky  <yurys@chromium.org>
1421
1422         Reviewed by Pavel Feldman.
1423
1424         Web Inspector: pass explicit agent references to InspectorBackendDispatcher
1425         https://bugs.webkit.org/show_bug.cgi?id=55820
1426
1427         * inspector/CodeGeneratorInspector.pm:
1428         * inspector/InspectorController.cpp:
1429         (WebCore::InspectorController::InspectorController):
1430         (WebCore::InspectorController::connectFrontend):
1431         (WebCore::InspectorController::disconnectFrontend):
1432         (WebCore::InspectorController::dispatchMessageFromFrontend):
1433
1434 2011-03-09  Andrey Kosyakov  <caseq@chromium.org>
1435
1436         Reviewed by Pavel Feldman.
1437
1438         Web Inspector: resource errors are not reported before front-end is opened
1439         https://bugs.webkit.org/show_bug.cgi?id=55939
1440
1441         * inspector/InspectorInstrumentation.cpp:
1442         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
1443         * inspector/InspectorInstrumentation.h:
1444         (WebCore::InspectorInstrumentation::didReceiveResourceResponse):
1445         (WebCore::InspectorInstrumentation::didFailLoading):
1446
1447 2011-03-08  Hans Wennborg  <hans@chromium.org>
1448
1449         Reviewed by Jeremy Orlow.
1450
1451         IndexedDB: Add BackingStoreType parameter to IDBFactoryBackendInterface::open
1452         https://bugs.webkit.org/show_bug.cgi?id=55948
1453
1454         Add a parameter that allows for selection of alternative backing store
1455         implementations.
1456
1457         No new tests: no new functionality.
1458
1459         * storage/IDBFactory.cpp:
1460         (WebCore::IDBFactory::open):
1461         * storage/IDBFactoryBackendImpl.cpp:
1462         (WebCore::IDBFactoryBackendImpl::open):
1463         * storage/IDBFactoryBackendImpl.h:
1464         * storage/IDBFactoryBackendInterface.h:
1465
1466 2011-03-08  Steve Block  <steveblock@google.com>
1467
1468         Reviewed by Jeremy Orlow.
1469
1470         Factor out JNI method call to be used by both JSC and V8
1471         https://bugs.webkit.org/show_bug.cgi?id=55966
1472
1473         No new tests, refactoring only.
1474
1475         * bridge/jni/JNIUtility.cpp:
1476         (JSC::Bindings::callJNIMethod):
1477         * bridge/jni/JNIUtility.h:
1478         * bridge/jni/jsc/JavaInstanceJSC.cpp:
1479         (JavaInstance::invokeMethod):
1480         * bridge/jni/v8/JavaInstanceV8.cpp:
1481         (JavaInstance::invokeMethod):
1482
1483 2011-03-09  Andrey Adaikin  <aandrey@google.com>
1484
1485         Reviewed by Pavel Feldman.
1486
1487         Web Inspector: [Text editor] Regression in handling DOMNodeInserted/DOMNodeRemoved events
1488         https://bugs.webkit.org/show_bug.cgi?id=55818
1489
1490         * inspector/front-end/TextViewer.js:
1491         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
1492
1493 2011-03-09  Ilya Tikhonovsky  <loislo@chromium.org>
1494
1495         Reviewed by Yury Semikhatsky.
1496
1497         Web Inspector: Web Inspector: we don't need to transfer objectId and hasChildren for primitive values.
1498         https://bugs.webkit.org/show_bug.cgi?id=55998
1499
1500         * inspector/InjectedScriptSource.js:
1501
1502 2011-03-09  Pavel Feldman  <pfeldman@chromium.org>
1503
1504         Reviewed by Yury Semikhatsky.
1505
1506         Web Inspector: watch expressions should show string values in quotes.
1507         https://bugs.webkit.org/show_bug.cgi?id=55846
1508
1509         * inspector/InjectedScriptSource.js:
1510         * inspector/front-end/ObjectPropertiesSection.js:
1511         (WebInspector.ObjectPropertyTreeElement.prototype.update):
1512         * inspector/front-end/RemoteObject.js:
1513         (WebInspector.LocalJSONObject.prototype.get description):
1514         * inspector/front-end/WatchExpressionsSidebarPane.js:
1515         (WebInspector.WatchExpressionsSection.prototype.update):
1516         * inspector/front-end/inspector.css:
1517         (.console-formatted-string, .console-formatted-regexp):
1518
1519 2011-03-09  Pavel Feldman  <pfeldman@chromium.org>
1520
1521         Reviewed by Yury Semikhatsky.
1522
1523         Web Inspector: "length" getter is invoked upon console object formatting.
1524         https://bugs.webkit.org/show_bug.cgi?id=55220
1525
1526         * inspector/InjectedScriptSource.js:
1527
1528 2011-03-08  Ilya Tikhonovsky  <loislo@chromium.org>
1529
1530         Reviewed by Pavel Feldman.
1531
1532         Web Inspector: remove groupName from objectId.
1533         https://bugs.webkit.org/show_bug.cgi?id=55825
1534
1535         * inspector/InjectedScriptSource.js:
1536
1537 2011-03-08  Xiaomei Ji  <xji@chromium.org>
1538
1539         Reviewed by David Hyatt.
1540
1541         Fix Regression: Content not drawn when scrolling horizontally in an RTL page.
1542         https://bugs.webkit.org/show_bug.cgi?id=55077.
1543
1544         Inside ScrollView::calculateOverhangAreasForPainting(), when scroll position
1545         is negative, should include the position value into overhang rectangle's 
1546         starting position. 
1547
1548         Tests: fast/dom/scroll-reveal-left-overflow.html
1549                fast/dom/scroll-reveal-top-overflow.html
1550
1551         * platform/ScrollView.cpp:
1552         (WebCore::ScrollView::calculateOverhangAreasForPainting):
1553
1554 2011-03-08  Daniel Bates  <dbates@rim.com>
1555
1556         Reviewed by Darin Adler.
1557
1558         Add templatized CSSMutableStyleDeclaration::get{ShorthandValue, CommonValue, LayeredShorthandValue}()
1559         https://bugs.webkit.org/show_bug.cgi?id=55351
1560
1561         By using some template magic CSSMutableStyleDeclaration::get{ShorthandValue, CommonValue, LayeredShorthandValue}()
1562         can be called on an array A without the caller explicitly specifying the size of A.
1563
1564         No functionality was changed. So no new tests.
1565
1566         * css/CSSMutableStyleDeclaration.cpp:
1567         (WebCore::CSSMutableStyleDeclaration::getPropertyValue): Modified to call templatized variants of
1568         CSSMutableStyleDeclaration::get{ShorthandValue, CommonValue, LayeredShorthandValue}().
1569         (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue): Renamed second argument from "number" to "size"
1570         to better reflect its purpose - to be the size of the passed array.
1571         (WebCore::CSSMutableStyleDeclaration::getShorthandValue): Ditto.
1572         (WebCore::CSSMutableStyleDeclaration::getCommonValue): Ditto.
1573         (WebCore::CSSMutableStyleDeclaration::cssText): Modified to call templatized variant of CSSMutableStyleDeclaration::getShorthandValue().
1574         * css/CSSMutableStyleDeclaration.h:
1575         (WebCore::CSSMutableStyleDeclaration::getShorthandValue): Added templatized function that can determine
1576         the size of a passed array. Changed type of second argument to size_t since it represents the size of
1577         an array.
1578         (WebCore::CSSMutableStyleDeclaration::getCommonValue): Ditto.
1579         (WebCore::CSSMutableStyleDeclaration::getLayeredShorthandValue): Ditto.
1580
1581 2011-03-08  Enrica Casucci  <enrica@apple.com>
1582
1583         Reviewed by Darin Adler.
1584         
1585         REGRESSION: Copied content loses formatting on paste to external apps.
1586         https://bugs.webkit.org/show_bug.cgi?id=47615
1587         <rdar://problem/9001214>
1588         
1589         This is a resubmission of a patch that was landed a while ago then rolled
1590         back because of a build failure on SnowLeopard and Leopard on the 32-bit builds.
1591
1592         This patch adds a way for WebKit2 to create NSAttributedStrings from
1593         a DOM range without using the AppKit api initWithDOMRange that internally
1594         needs to access the WebView. The NSAttributedString is needed to create
1595         RTF formats in the pasteboard.
1596         This is to be considered a first step, since in the future we want to have
1597         an implementation based on the TextIterator.
1598         * WebCore.xcodeproj/project.pbxproj:
1599         * platform/mac/HTMLConverter.h: Added.
1600         * platform/mac/HTMLConverter.mm: Added.
1601         * platform/mac/PasteboardMac.mm:
1602         (WebCore::Pasteboard::writeSelection):
1603
1604 2011-03-08  James Robinson  <jamesr@chromium.org>
1605
1606         Reviewed by Kenneth Russell.
1607
1608         [chromium] Explicitly copy compositing properties from LayerChromium to CCLayerImpl
1609         https://bugs.webkit.org/show_bug.cgi?id=55900
1610
1611         This adds an explicit step to synchronize properties from
1612         LayerChromiums to their corresponding CCLayerImpls.
1613
1614         * platform/graphics/chromium/LayerChromium.cpp:
1615         (WebCore::LayerChromium::setBounds):
1616         * platform/graphics/chromium/LayerChromium.h:
1617         (WebCore::LayerChromium::bounds):
1618         (WebCore::LayerChromium::doubleSided):
1619         (WebCore::LayerChromium::setDoubleSided):
1620         * platform/graphics/chromium/LayerRendererChromium.cpp:
1621         (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
1622         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1623         (WebCore::CCLayerImpl::CCLayerImpl):
1624         (WebCore::CCLayerImpl::updateFromLayer):
1625         (WebCore::CCLayerImpl::descendantsDrawsContent):
1626         * platform/graphics/chromium/cc/CCLayerImpl.h:
1627         (WebCore::CCLayerImpl::anchorPoint):
1628         (WebCore::CCLayerImpl::anchorPointZ):
1629         (WebCore::CCLayerImpl::masksToBounds):
1630         (WebCore::CCLayerImpl::opacity):
1631         (WebCore::CCLayerImpl::position):
1632         (WebCore::CCLayerImpl::preserves3D):
1633         (WebCore::CCLayerImpl::sublayerTransform):
1634         (WebCore::CCLayerImpl::transform):
1635
1636 2011-03-08  James Robinson  <jamesr@chromium.org>
1637
1638         Chromium compile fix.
1639
1640         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
1641         (WebCore::SimpleFontData::platformInit):
1642
1643 2011-03-08  Peter Kasting  <pkasting@google.com>
1644
1645         Reviewed by James Robinson.
1646
1647         Unify Windows version checks, part 1.
1648         https://bugs.webkit.org/show_bug.cgi?id=55979
1649
1650         Make everyone (I hope) pull in SystemInfo.cpp.  Eliminate the
1651         now-unnecessary WindowsVersion.cpp from Chromium.
1652
1653         * GNUmakefile.am:
1654         * WebCore.gyp/WebCore.gyp:
1655         * WebCore.gypi:
1656         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
1657         (WebCore::ScrollbarThemeChromiumWin::invalidateOnMouseEnterExit):
1658         (WebCore::ScrollbarThemeChromiumWin::getThemeState):
1659         (WebCore::ScrollbarThemeChromiumWin::getThemeArrowState):
1660         * platform/chromium/WindowsVersion.cpp: Removed.
1661         * platform/chromium/WindowsVersion.h: Removed.
1662         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
1663         (WebCore::fillBMPGlyphs):
1664         * rendering/RenderThemeChromiumWin.cpp:
1665         (WebCore::getNonClientMetrics):
1666
1667 2011-03-08  Ryosuke Niwa  <rniwa@webkit.org>
1668
1669         Chromium Linux build fix attempt after r80582.
1670
1671         * platform/graphics/chromium/FontLinux.cpp:
1672         (WebCore::Font::drawGlyphs):
1673         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
1674         (WebCore::SimpleFontData::platformInit):
1675         * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp:
1676         (WebCore::GlyphPage::fill):
1677
1678 2011-03-08  Ryosuke Niwa  <rniwa@webkit.org>
1679
1680         Mac build fix attempt for r80582.
1681
1682         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
1683         (WebCore::disableLigatures):
1684
1685 2011-03-08  Ryosuke Niwa  <rniwa@webkit.org>
1686
1687         Reviewed by Kent Tamura.
1688
1689         Remove calls to deprecatedEditingOffset in SelectionController and VisibleSelection
1690         https://bugs.webkit.org/show_bug.cgi?id=54937
1691
1692         * editing/SelectionController.cpp:
1693         (WebCore::SelectionController::setSelection): Calls anchorNode() instead of deprecatedNode() to obtain
1694         the document. Also restrained the lifetime of document variable.
1695         (WebCore::removingNodeRemovesPosition): Compare the node with anchorNode() instead of deprecatedNode()
1696         to determine whether or not position becomes null after removing a node.
1697         (WebCore::SelectionController::directionOfEnclosingBlock): The enclosing block is always a container
1698         so call containerNode() instead of deprecatedNode().
1699         (WebCore::SelectionController::debugRenderer): Call containerNode() and computeOffsetInContainer()
1700         instead of deprecatedNode() and deprecatedEditingOffset() respectively.
1701         (WebCore::SelectionController::isInPasswordField): Look for the shadow root from containerNode()
1702         instead of deprecatedNode to determine whether or not selection inside a password field. Also assert
1703         that the specified position is not before or after the shadow root as it violates our assumption.
1704         * editing/VisibleSelection.cpp:
1705         (WebCore::makeSearchRange): Call containerNode() and offsetInContainerNode() instead of deprecatedNode()
1706         and deprecatedEditingOffset() respectively because start is always parent anchored and therefore
1707         guaranteed to be an offset inside an anchor node.
1708         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries): Call containerNode()
1709         instead of deprecatedNode() to look for the lowest editable ancestor because position before or after
1710         an editable element isn't editable.
1711         * page/DOMSelection.cpp: Call containerNode() and offsetInContainerNode() instead of deprecatedNode()
1712         and deprecatedEditingOffset() respectively in the following functions because they are exposed to
1713         DOM, which doesn't have before/after concept.
1714         (WebCore::DOMSelection::anchorNode):
1715         (WebCore::DOMSelection::anchorOffset):
1716         (WebCore::DOMSelection::focusNode):
1717         (WebCore::DOMSelection::focusOffset):
1718         (WebCore::DOMSelection::baseNode):
1719         (WebCore::DOMSelection::baseOffset):
1720         (WebCore::DOMSelection::extentNode):
1721         (WebCore::DOMSelection::extentOffset):
1722
1723 2011-03-08  Brent Fulgham  <bfulgham@webkit.org>
1724
1725         Reviewed by Adam Roben.
1726
1727         Correct uninitialized variable in PolicyCallback found while
1728         running WebKit in BoundsChecker.
1729         https://bugs.webkit.org/show_bug.cgi?id=45199.
1730
1731         * loader/PolicyCallback.cpp:
1732         (WebCore::PolicyCallback::PolicyCallback): Initialize
1733         m_argument.
1734
1735 2011-03-08  Brent Fulgham  <bfulgham@webkit.org>
1736
1737         More build bustage fix.
1738
1739         * platform/graphics/win/cairo/FontPlatformData.h:
1740         (WebCore::FontPlatformData::setOrientation): Duplicate accessor
1741         in WinCairo-local header.  This is such a mess!
1742
1743 2011-03-08  David Hyatt  <hyatt@apple.com>
1744
1745         Fix build bustage.  Hide orientation setting behind a setter and stub it out in all
1746         FontPlatformData classes.  (This class really needs to move to a common header with ifdefs.)
1747
1748         * platform/graphics/SimpleFontData.cpp:
1749         (WebCore::SimpleFontData::verticalRightOrientationFontData):
1750         * platform/graphics/cg/FontPlatformData.h:
1751         (WebCore::FontPlatformData::setOrientation):
1752         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
1753         (WebCore::FontPlatformData::setOrientation):
1754         * platform/graphics/chromium/FontPlatformDataLinux.h:
1755         (WebCore::FontPlatformData::setOrientation):
1756         * platform/graphics/cocoa/FontPlatformData.h:
1757         (WebCore::FontPlatformData::setOrientation):
1758         * platform/graphics/freetype/FontPlatformData.h:
1759         (WebCore::FontPlatformData::setOrientation):
1760         * platform/graphics/qt/FontPlatformData.h:
1761         (WebCore::FontPlatformData::setOrientation):
1762         * platform/graphics/wince/FontPlatformData.h:
1763         (WebCore::FontPlatformData::setOrientation):
1764         * platform/graphics/wx/FontPlatformData.h:
1765         (WebCore::FontPlatformData::setOrientation):
1766
1767 2011-03-08  Joe Wild  <joseph.wild@nokia.com>
1768
1769         Reviewed by Csaba Osztrogon√°c.
1770
1771         [Qt] Missing SVG variables
1772         https://bugs.webkit.org/show_bug.cgi?id=32941
1773
1774         Basically, this patch just modifies features.pri to the Qt build to
1775         pass on the ENABLE_SVG_* flags to the IDL binding generator.
1776
1777         Also I had remove global-construtors.html from the skip list and
1778         updated the associated expected results files.
1779
1780         * features.pri:
1781         * page/DOMWindow.idl:
1782
1783 2011-03-08  Alok priyadarshi  <alokp@chromium.org>
1784
1785         Reviewed by Dimitri Glazkov.
1786
1787         Plugins needs a way to trigger style recalc
1788         https://bugs.webkit.org/show_bug.cgi?id=55242
1789
1790         No test needed. A simple get function is added.
1791
1792         * platform/graphics/chromium/PluginLayerChromium.h:
1793         (WebCore::PluginLayerChromium::getTextureId):
1794
1795 2011-03-08  David Hyatt  <hyatt@apple.com>
1796
1797         Reviewed by Dan Bernstein.
1798
1799         https://bugs.webkit.org/show_bug.cgi?id=48540, support the text-orientation CSS property.
1800         
1801         This patch adds support for two values of the text-orientation property (the ones that actually matter): vertical-right and upright.
1802         The TextOrientation is part of the FontDescription and used to look up fonts (similar to FontOrientation).
1803         
1804         Orientation of non-CJK characters is done using fallback font data of the appropriate orientation type, e.g., verticalRightOrientation and
1805         uprightOrientation fallback font data.  Vertical right is just implemented as a normal horizontal font.  Upright is implemented as a
1806         vertically oriented font that rotates all glyphs.
1807         
1808         The main complication implementing text-orientation is that fonts have "baked-in" vertical glyphs for letters that are hardcoded to
1809         a vertical right facing.  This means that you can use those special vertical glyphs for vertical-right orientation without having to 
1810         fall back, but then for upright orientation you have to ignore them and still fall back.  As you can see from the test case, this doesn't
1811         work very well, but hopefully it won't be all that common.  Limitations of CoreText prevent this case from rendering properly in either the
1812         simple or complex code paths, although the simple code path at least gets close.
1813
1814         Added fast/blockflow/text-orientation-basic.html
1815
1816         * WebCore.exp.in:
1817         * WebCore.xcodeproj/project.pbxproj:
1818         * css/CSSComputedStyleDeclaration.cpp:
1819         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1820         * css/CSSFontFaceSource.cpp:
1821         (WebCore::CSSFontFaceSource::getFontData):
1822         * css/CSSParser.cpp:
1823         (WebCore::CSSParser::parseValue):
1824         * css/CSSPrimitiveValueMappings.h:
1825         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1826         (WebCore::CSSPrimitiveValue::operator TextOrientation):
1827         * css/CSSPropertyNames.in:
1828         * css/CSSStyleSelector.cpp:
1829         (WebCore::CSSStyleSelector::applyDeclarations):
1830         (WebCore::CSSStyleSelector::applyProperty):
1831         * css/CSSValueKeywords.in:
1832         * loader/cache/CachedFont.cpp:
1833         (WebCore::CachedFont::platformDataFromCustomData):
1834         * loader/cache/CachedFont.h:
1835         * platform/graphics/FontCache.cpp:
1836         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
1837         (WebCore::FontPlatformDataCacheKey::operator==):
1838         (WebCore::computeHash):
1839         (WebCore::FontCache::getCachedFontPlatformData):
1840         * platform/graphics/FontDescription.h:
1841         (WebCore::FontDescription::FontDescription):
1842         (WebCore::FontDescription::textOrientation):
1843         (WebCore::FontDescription::setTextOrientation):
1844         (WebCore::FontDescription::operator==):
1845         * platform/graphics/FontFastPath.cpp:
1846         (WebCore::Font::glyphDataForCharacter):
1847         (WebCore::offsetToMiddleOfGlyph):
1848         * platform/graphics/SimpleFontData.cpp:
1849         (WebCore::SimpleFontData::SimpleFontData):
1850         (WebCore::SimpleFontData::verticalRightOrientationFontData):
1851         (WebCore::SimpleFontData::uprightOrientationFontData):
1852         (WebCore::SimpleFontData::brokenIdeographFontData):
1853         (WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
1854         * platform/graphics/SimpleFontData.h:
1855         (WebCore::SimpleFontData::hasVerticalGlyphs):
1856         (WebCore::SimpleFontData::isTextOrientationFallback):
1857         * platform/graphics/cairo/FontCustomPlatformData.h:
1858         * platform/graphics/cocoa/FontPlatformData.h:
1859         (WebCore::FontPlatformData::FontPlatformData):
1860         (WebCore::FontPlatformData::textOrientation):
1861         (WebCore::FontPlatformData::hash):
1862         (WebCore::FontPlatformData::operator==):
1863         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1864         (WebCore::FontPlatformData::FontPlatformData):
1865         (WebCore::FontPlatformData::operator=):
1866         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
1867         (WebCore::FontCustomPlatformData::fontPlatformData):
1868         * platform/graphics/haiku/FontCustomPlatformData.cpp:
1869         (WebCore::FontCustomPlatformData::fontPlatformData):
1870         * platform/graphics/haiku/FontCustomPlatformData.h:
1871         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
1872         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
1873         * platform/graphics/mac/FontCacheMac.mm:
1874         (WebCore::FontCache::createFontPlatformData):
1875         * platform/graphics/mac/FontCustomPlatformData.cpp:
1876         (WebCore::FontCustomPlatformData::fontPlatformData):
1877         * platform/graphics/mac/FontCustomPlatformData.h:
1878         * platform/graphics/mac/FontMac.mm:
1879         (WebCore::showGlyphsWithAdvances):
1880         (WebCore::Font::drawGlyphs):
1881         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1882         (WebCore::shouldUseCoreText):
1883         (WebCore::GlyphPage::fill):
1884         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
1885         (WebCore::SimpleFontData::getCFStringAttributes):
1886         * platform/graphics/mac/SimpleFontDataMac.mm:
1887         (WebCore::SimpleFontData::platformInit):
1888         (WebCore::SimpleFontData::platformBoundsForGlyph):
1889         (WebCore::SimpleFontData::platformWidthForGlyph):
1890         * platform/graphics/pango/FontCustomPlatformDataPango.cpp:
1891         (WebCore::FontCustomPlatformData::fontPlatformData):
1892         * platform/graphics/qt/FontCustomPlatformData.h:
1893         * platform/graphics/qt/FontCustomPlatformDataQt.cpp:
1894         (WebCore::FontCustomPlatformData::fontPlatformData):
1895         * platform/graphics/skia/FontCustomPlatformData.cpp:
1896         (WebCore::FontCustomPlatformData::fontPlatformData):
1897         * platform/graphics/skia/FontCustomPlatformData.h:
1898         * platform/graphics/win/FontCustomPlatformData.cpp:
1899         (WebCore::FontCustomPlatformData::fontPlatformData):
1900         * platform/graphics/win/FontCustomPlatformData.h:
1901         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1902         (WebCore::FontCustomPlatformData::fontPlatformData):
1903         * platform/graphics/win/FontCustomPlatformDataCairo.h:
1904         * platform/graphics/wince/FontCustomPlatformData.cpp:
1905         (WebCore::FontCustomPlatformData::fontPlatformData):
1906         * platform/graphics/wince/FontCustomPlatformData.h:
1907         * platform/text/TextOrientation.h: Added.
1908         * rendering/InlineFlowBox.cpp:
1909         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
1910         * rendering/style/RenderStyle.h:
1911         (WebCore::InheritedFlags::initialTextOrientation):
1912
1913 2011-03-08  Ryosuke Niwa  <rniwa@webkit.org>
1914
1915         Reviewed by Darin Adler.
1916
1917         addInlineStyleIfNeeded should take EditingStyle
1918         https://bugs.webkit.org/show_bug.cgi?id=55950
1919
1920         Deployed EditingStyle in addInlineStyleIfNeeded, StyleChange::StyleChange, and StyleChange::init.
1921         Also extracted EditingStyle::styleIsPresentInComputedStyleOfNode from removeStyleFromRunBeforeApplyingStyle.
1922
1923         * editing/ApplyStyleCommand.cpp:
1924         (WebCore::StyleChange::StyleChange): Takes EditingStyle instead of CSSStyleDeclaration.
1925         (WebCore::StyleChange::init): Ditto.
1926         (WebCore::ApplyStyleCommand::applyBlockStyle): Instantiates StyleChange.
1927         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): Calls addInlineStyleIfNeeded.
1928         (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle): Calls styleIsPresentInComputedStyleOfNode.
1929         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Calls EditingStyle::mergeInlineStyleOfElement
1930         instead of manually merging styles.
1931         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown): Calls addInlineStyleIfNeeded.
1932         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Takes EditingStyle instead of CSSMutableStyleDeclaration.
1933         * editing/ApplyStyleCommand.h:
1934         * editing/CompositeEditCommand.h:
1935         * editing/EditingStyle.cpp:
1936         (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode): Extracted from removeStyleFromRunBeforeApplyingStyle.
1937         * editing/EditingStyle.h:
1938
1939 2011-03-08  Nico Weber  <thakis@chromium.org>
1940
1941         Reviewed by James Robinson.
1942
1943         Crash on big blur radius with canvas
1944         https://bugs.webkit.org/show_bug.cgi?id=55951
1945
1946         Move the clamping code out of an if branch, so that it happens in the
1947         canvas case as well.
1948
1949         Test: fast/canvas/shadow-huge-blur.html
1950
1951         * platform/graphics/cg/GraphicsContextCG.cpp:
1952         (WebCore::GraphicsContext::setPlatformShadow):
1953
1954 2011-03-08  Chris Fleizach  <cfleizach@apple.com>
1955
1956         Reviewed by Sam Weinig.
1957
1958         WK2: Cannot set focus on an element when focus is outside of WKView
1959         https://bugs.webkit.org/show_bug.cgi?id=55281
1960     
1961         In WK2, focus cannot be set from the WebProcess side because there's no platformWidget().
1962         Instead, the focus/unfocus messages need to be sent to the UIProcess side.
1963
1964         * platform/mac/WidgetMac.mm:
1965         (WebCore::Widget::setFocus):
1966
1967 2011-03-08  Sam Weinig  <sam@webkit.org>
1968
1969         Reviewed by Anders Carlsson.
1970
1971         Overflow: scroll areas should not paint white in scroll corner if the 
1972         scrollbars are overlay.
1973         <rdar://problem/9082871>
1974
1975         * rendering/RenderLayer.cpp:
1976         (WebCore::RenderLayer::paintScrollCorner):
1977         Don't paint the scroll corner white if we have overlay scrollbars.
1978
1979 2011-03-08  Chris Marrin  <cmarrin@apple.com>
1980
1981         Reviewed by Darin Adler.
1982
1983         The first time animations are committed they have a bad start time
1984         https://bugs.webkit.org/show_bug.cgi?id=55947
1985
1986         Do a check for a returned lastCommitTime of <=0 and replace it
1987         with the mediaTime.
1988
1989
1990         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1991         (WebCore::CACFLayerTreeHost::notifyAnimationsStarted):
1992
1993 2011-03-08  James Kozianski  <koz@chromium.org>
1994
1995         Reviewed by David Levin.
1996
1997         Expose isValidProtocol() in KURL.h.
1998         https://bugs.webkit.org/show_bug.cgi?id=54594
1999
2000         This is needed to validate protocols used in calls to
2001         navigator.registerProtocolHandler().
2002
2003         * platform/KURL.cpp:
2004         * platform/KURL.h:
2005         * platform/KURLGoogle.cpp:
2006         (WebCore::isValidProtocol):
2007
2008 2011-03-08  Adam Roben  <aroben@apple.com>
2009
2010         Set svn:mime-type to text/css for all Inspector CSS files
2011
2012         This will cause them to be served with the correct MIME type from svn.webkit.org's web
2013         interface.
2014
2015         Rubber-stamped by Tim Hatcher.
2016
2017         * inspector/front-end/audits.css: Added property svn:mime-type.
2018         * inspector/front-end/goToLineDialog.css: Added property svn:mime-type.
2019         * inspector/front-end/heapProfiler.css: Added property svn:mime-type.
2020         * inspector/front-end/helpScreen.css: Added property svn:mime-type.
2021         * inspector/front-end/inspector.css: Added property svn:mime-type.
2022         * inspector/front-end/inspectorSyntaxHighlight.css: Added property svn:mime-type.
2023         * inspector/front-end/networkPanel.css: Added property svn:mime-type.
2024         * inspector/front-end/popover.css: Added property svn:mime-type.
2025         * inspector/front-end/textViewer.css: Added property svn:mime-type.
2026
2027 2011-03-08  Andrei Popescu  <andreip@google.com>
2028
2029         Reviewed by Steve Block.
2030
2031         IDBCallbacks::onsuccess(IDBIndex*) is unused and should be removed.
2032         https://bugs.webkit.org/show_bug.cgi?id=55938
2033
2034         The IndexedDatabase specification changed and IDBIndex objects are no
2035         longer created asynchronously. We therefore no longer need this method.
2036
2037         No new tests, just cleanup.
2038
2039         * storage/IDBCallbacks.h:
2040         * storage/IDBRequest.cpp:
2041         * storage/IDBRequest.h:
2042
2043 2011-03-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2044
2045         Unreviewed, rolling out r80551.
2046         http://trac.webkit.org/changeset/80551
2047         https://bugs.webkit.org/show_bug.cgi?id=55933
2048
2049         It broke 285 tests on Qt bot (Requested by Ossy on #webkit).
2050
2051         * WebCore.pro:
2052         * platform/SharedBuffer.cpp:
2053         * platform/SharedBuffer.h:
2054         * platform/network/qt/QNetworkReplyHandler.cpp:
2055         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
2056         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2057         (WebCore::QNetworkReplyHandler::forwardData):
2058         (WebCore::QNetworkReplyHandler::start):
2059         * platform/network/qt/QNetworkReplyHandler.h:
2060         * platform/network/qt/ResourceHandleQt.cpp:
2061         (WebCore::ResourceHandle::supportsBufferedData):
2062         (WebCore::ResourceHandle::bufferedData):
2063         * platform/qt/QtByteBlock.cpp: Removed.
2064         * platform/qt/QtByteBlock.h: Removed.
2065         * platform/qt/SharedBufferQt.cpp:
2066
2067 2011-03-08  Andreas Kling  <kling@webkit.org>
2068
2069         Reviewed by Benjamin Poulain.
2070
2071         RenderObject: Pass complex type arguments as const-references.
2072
2073         * WebCore.exp.in:
2074         * rendering/RenderObject.h:
2075         * rendering/RenderObject.cpp:
2076         (WebCore::RenderObject::drawBoxSideFromPath):
2077         (WebCore::RenderObject::drawArcForBoxSide):
2078         (WebCore::RenderObject::localToAbsolute):
2079         (WebCore::RenderObject::absoluteToLocal):
2080
2081 2011-03-08  Andreas Kling  <kling@webkit.org>
2082
2083         Reviewed by Antonio Gomes.
2084
2085         Path: Make measurement functions const
2086         https://bugs.webkit.org/show_bug.cgi?id=55914
2087
2088         * platform/graphics/Path.cpp:
2089         (WebCore::Path::length):
2090         (WebCore::Path::pointAtLength):
2091         (WebCore::Path::normalAngleAtLength):
2092         * platform/graphics/Path.h:
2093         * platform/graphics/cairo/PathCairo.cpp:
2094         (WebCore::Path::strokeBoundingRect):
2095         * platform/graphics/cg/PathCG.cpp:
2096         (WebCore::Path::strokeBoundingRect):
2097         * platform/graphics/openvg/PathOpenVG.cpp:
2098         (WebCore::Path::strokeBoundingRect):
2099         (WebCore::Path::length):
2100         (WebCore::Path::pointAtLength):
2101         (WebCore::Path::normalAngleAtLength):
2102         * platform/graphics/qt/PathQt.cpp:
2103         (WebCore::Path::strokeBoundingRect):
2104         (WebCore::Path::length):
2105         (WebCore::Path::pointAtLength):
2106         (WebCore::Path::normalAngleAtLength):
2107         * platform/graphics/skia/PathSkia.cpp:
2108         (WebCore::Path::strokeBoundingRect):
2109         * platform/graphics/wince/PathWinCE.cpp:
2110         (WebCore::Path::strokeBoundingRect):
2111         * platform/graphics/wx/PathWx.cpp:
2112         (WebCore::Path::strokeBoundingRect):
2113
2114 2011-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2115
2116         Reviewed by Martin Robinson.
2117
2118         [GTK] Do not set juntion sides on scrollbar stepper buttons
2119         https://bugs.webkit.org/show_bug.cgi?id=55868
2120
2121         Fixes rendering of steppers for themes using rounded stepper
2122         buttons on scrollbars like Adwaita.
2123
2124         * platform/gtk/ScrollbarThemeGtk3.cpp:
2125         (WebCore::ScrollbarThemeGtk::paintButton):
2126
2127 2011-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2128
2129         Reviewed by Martin Robinson.
2130
2131         [GTK] Use doubles instead of integers for coordinates when rendering arrows
2132         https://bugs.webkit.org/show_bug.cgi?id=55866
2133
2134         To prevent off-by-one rounding errors.
2135
2136         * platform/gtk/RenderThemeGtk3.cpp:
2137         (WebCore::RenderThemeGtk::paintMenuList):
2138         * platform/gtk/ScrollbarThemeGtk3.cpp:
2139         (WebCore::ScrollbarThemeGtk::paintButton):
2140
2141 2011-03-08  Markus Goetz  <guruz@guruz.de>
2142
2143         Reviewed by Kenneth Rohde Christiansen.
2144
2145         [Qt] Use the QNetworkAccessManager zerocopy feature
2146         https://bugs.webkit.org/show_bug.cgi?id=50082
2147
2148         The feature will be introduced in Qt 4.8.
2149         This patch is backwards compatible with Qt 4.7.
2150
2151         * WebCore.pro:
2152         * platform/SharedBuffer.cpp:
2153         * platform/SharedBuffer.h:
2154         * platform/network/qt/QNetworkReplyHandler.cpp:
2155         (WebCore::QNetworkReplyHandler::QNetworkReplyHandler):
2156         (WebCore::QNetworkReplyHandler::bufferedData):
2157         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2158         (WebCore::QNetworkReplyHandler::downloadProgress):
2159         (WebCore::QNetworkReplyHandler::forwardData):
2160         (WebCore::QNetworkReplyHandler::start):
2161         * platform/network/qt/QNetworkReplyHandler.h:
2162         * platform/network/qt/ResourceHandleQt.cpp:
2163         (WebCore::ResourceHandle::supportsBufferedData):
2164         (WebCore::ResourceHandle::bufferedData):
2165         * platform/qt/SharedBufferQt.cpp:
2166         (WebCore::SharedBuffer::wrapQtByteBlock):
2167         (WebCore::SharedBuffer::hasPlatformData):
2168         (WebCore::SharedBuffer::platformData):
2169         (WebCore::SharedBuffer::platformDataSize):
2170         (WebCore::SharedBuffer::maybeTransferPlatformData):
2171         (WebCore::SharedBuffer::clearPlatformData):
2172
2173 2011-03-08  Alejandro G. Castro  <alex@igalia.com>
2174
2175         Reviewed by Martin Robinson.
2176
2177         [GTK] Fix compilation warnings after r80429
2178         https://bugs.webkit.org/show_bug.cgi?id=55864
2179
2180         * platform/gtk/WidgetGtk.cpp:
2181
2182 2011-03-08  Philippe Normand  <pnormand@igalia.com>
2183
2184         Unreviewed, GTK build fix after r80536
2185
2186         * GNUmakefile.am:
2187
2188 2011-03-08  Zan Dobersek  <zandobersek@gmail.com>
2189
2190         Reviewed by Martin Robinson.
2191
2192         [Gtk] toDataURL uses incorrect quality value when saving GdkPixbuf to buffer
2193         https://bugs.webkit.org/show_bug.cgi?id=55878
2194
2195         Multiply the quality parameter by 100 to put it in the range [0, 100] as needed
2196         when saving GdkPixbuf to a buffer.
2197
2198         * platform/graphics/gtk/ImageBufferGtk.cpp:
2199         (WebCore::ImageBuffer::toDataURL):
2200
2201 2011-03-07  Daniel Cheng  <dcheng@chromium.org>
2202
2203         Unreviewed.
2204
2205         Final build fix for r80536.
2206
2207         * DerivedSources.make:
2208
2209 2011-03-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2210
2211         Reviewed by Kent Tamura.
2212
2213         [EFL] Adjust functions of WebCore's efl port to WebKit coding style
2214         https://bugs.webkit.org/show_bug.cgi?id=55924
2215
2216         Adjust webkit style to PlatformKeyboardEventEfl, PlatformMouseEventEfl and WidgetEfl files.
2217
2218         * platform/efl/PlatformKeyboardEventEfl.cpp:
2219         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2220         * platform/efl/PlatformMouseEventEfl.cpp:
2221         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2222         * platform/efl/WidgetEfl.cpp:
2223         (WebCore::Widget::frameRectsChanged):
2224         (WebCore::Widget::setEvasObject):
2225
2226 2011-03-07  Daniel Cheng  <dcheng@chromium.org>
2227
2228         Unreviewed.
2229
2230         More build fixes for r80536.
2231
2232         * CMakeLists.txt:
2233         * platform/chromium/ClipboardChromium.cpp:
2234         * platform/chromium/ClipboardChromium.h:
2235
2236 2011-03-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2237
2238         Reviewed by Antonio Gomes.
2239
2240         [EFL] Adjust functions of ScrollbarEfl.cpp to WebKit coding style
2241         https://bugs.webkit.org/show_bug.cgi?id=55917
2242
2243         Adjust webkit style to ScrollbarEfl files.
2244
2245         * platform/efl/ScrollbarEfl.cpp:
2246         (scrollbarEflEdjeMessage):
2247         (ScrollbarEfl::setParent):
2248         (ScrollbarEfl::updateThumbPositionAndProportion):
2249         (ScrollbarEfl::frameRectsChanged):
2250         (ScrollbarEfl::paint):
2251         * platform/efl/ScrollbarEfl.h:
2252
2253 2011-03-07  Daniel Cheng  <dcheng@chromium.org>
2254
2255         Unreviewed.
2256
2257         Build fix for Chromium after r80536.
2258
2259         * platform/chromium/DataTransferItemChromium.cpp:
2260         * platform/chromium/DataTransferItemsChromium.cpp:
2261
2262 2011-03-07  Daniel Cheng  <dcheng@chromium.org>
2263
2264         Unreviewed.
2265
2266         More build fixes for r80536.
2267
2268         * CMakeLists.txt:
2269         * platform/chromium/ClipboardChromium.cpp:
2270         * platform/chromium/ClipboardChromium.h:
2271
2272 2011-03-07  Daniel Cheng  <dcheng@chromium.org>
2273
2274         Reviewed by David Levin.
2275
2276         Add support for DataTransferItems
2277         https://bugs.webkit.org/show_bug.cgi?id=55115
2278
2279         This patch adds stubs for DataTransferItems/DataTransferItem as well as implementing the
2280         basic functionality on the Chromium port. With the exception of DataTransferItem::getAsFile,
2281         all functionality on the DataTransferItems collection has been implemented.
2282         This change does not actually hook up DataTransferItems to reflect the actual contents of a
2283         drop/paste operation or to allow mutation of data in a copy/drag start yet. That will be
2284         enabled via several followup patches.
2285
2286         Test: editing/pasteboard/data-transfer-items.html
2287
2288         * Android.mk:
2289         * CMakeLists.txt:
2290         * CodeGenerators.pri:
2291         * DerivedSources.cpp:
2292         * DerivedSources.make:
2293         * GNUmakefile.am:
2294         * WebCore.gypi:
2295         * WebCore.pro:
2296         * WebCore.vcproj/WebCore.vcproj:
2297         * WebCore.xcodeproj/project.pbxproj:
2298         * bindings/generic/RuntimeEnabledFeatures.cpp:
2299         * bindings/generic/RuntimeEnabledFeatures.h:
2300         (WebCore::RuntimeEnabledFeatures::setDataTransferItemsEnabled):
2301         (WebCore::RuntimeEnabledFeatures::dataTransferItemsEnabled):
2302         * bindings/scripts/CodeGeneratorV8.pm: Do not emit an #include line for DOMString, since it's built-in.
2303         * dom/Clipboard.h:
2304         (WebCore::Clipboard::policy):
2305         * dom/Clipboard.idl:
2306         * dom/DataTransferItem.cpp: Added.
2307         * dom/DataTransferItem.h: Added.
2308         (WebCore::DataTransferItem::~DataTransferItem):
2309         * dom/DataTransferItem.idl: Added.
2310         * dom/DataTransferItems.h: Added.
2311         (WebCore::DataTransferItems::~DataTransferItems):
2312         * dom/DataTransferItems.idl: Added.
2313         * dom/StringCallback.cpp: Added.
2314         (WebCore::StringCallback::scheduleCallback):
2315         * dom/StringCallback.h: Added.
2316         (WebCore::StringCallback::~StringCallback):
2317         * dom/StringCallback.idl: Added.
2318         * platform/chromium/ClipboardChromium.cpp:
2319         (WebCore::ClipboardChromium::items):
2320         * platform/chromium/ClipboardChromium.h:
2321         * platform/chromium/DataTransferItemChromium.cpp: Added.
2322         (WebCore::DataTransferItemChromium::create):
2323         (WebCore::DataTransferItemChromium::DataTransferItemChromium):
2324         (WebCore::DataTransferItemChromium::kind):
2325         (WebCore::DataTransferItemChromium::type):
2326         (WebCore::DataTransferItemChromium::getAsString):
2327         * platform/chromium/DataTransferItemChromium.h: Added.
2328         * platform/chromium/DataTransferItemsChromium.cpp: Added.
2329         (WebCore::DataTransferItemsChromium::create):
2330         (WebCore::DataTransferItemsChromium::DataTransferItemsChromium):
2331         (WebCore::DataTransferItemsChromium::length):
2332         (WebCore::DataTransferItemsChromium::item):
2333         (WebCore::DataTransferItemsChromium::deleteItem):
2334         (WebCore::DataTransferItemsChromium::clear):
2335         (WebCore::DataTransferItemsChromium::add):
2336         * platform/chromium/DataTransferItemsChromium.h: Added.
2337
2338 2011-03-07  Ryosuke Niwa  <rniwa@webkit.org>
2339
2340         Reviewed by Darin Adler.
2341
2342         selectionHasStyle and selectionStartHasStyle should use EditingStyle
2343         https://bugs.webkit.org/show_bug.cgi?id=55902
2344
2345         Deployed EditingStyle in selectionHasStyle and selectionStartHasStyle.
2346         This allowed us to move triStateOfStyle from Editor.cpp to EditingStyle.cpp.
2347
2348         Also changed the argument lists of selectionHasStyle and selectionStartHasStyle
2349         to take a property id and a value instead of a CSSMutableStyleDeclaration to cleanup
2350         call sites of these two functions.
2351
2352         * WebCore.exp.in: Updated the signature of selectionHasStyle. No longer exports
2353         selectionStartHasStyle because it's not called anywhere outside of WebCore.
2354         * WebCore.order: Ditto.
2355         * editing/EditingStyle.cpp:
2356         (WebCore::EditingStyle::EditingStyle): Added a new constructor that takes a property id
2357         and a property value.
2358         (WebCore::EditingStyle::triStateOfStyle): Moved from Editor.cpp.
2359         * editing/EditingStyle.h:
2360         (WebCore::EditingStyle::create): Added.
2361         * editing/Editor.cpp:
2362         (WebCore::Editor::selectionStartHasStyle): Takes a property id and a value instead of
2363         a CSSStyleDeclaration.
2364         (WebCore::Editor::selectionHasStyle): Ditto.
2365         * editing/Editor.h: Updated the signatures of selectionStartHasStyle and selectionHasStyle.
2366         * editing/EditorCommand.cpp:
2367         (WebCore::executeToggleStyle): Calls selectionStartHasStyle and selectionHasStyle.
2368         (WebCore::stateStyle): Ditto.
2369         * page/ContextMenuController.cpp:
2370         (WebCore::ContextMenuController::checkOrEnableIfNeeded): Ditto.
2371
2372 2011-03-07  Alexey Proskuryakov  <ap@apple.com>
2373
2374         Reviewed by Darin Adler.
2375
2376         REGRESSION (HTML5 tree builder): Text selection in a large text document is extremely slow
2377         https://bugs.webkit.org/show_bug.cgi?id=55898
2378
2379         <rdar://problem/9095839> REGRESSION: Mail hangs with a certain large mail message when
2380         linkifying e-mail addresses in in -[DOMCharacterData setData:]
2381
2382         Changes render tree of fast/text/large-text-composed-char.html, but not image results.
2383
2384         * dom/CharacterData.cpp: (WebCore::CharacterData::parserAppendData):
2385         Changed parserAppendData() to accept a maximum length, and moved code from Text::createWithLengthLimit().
2386
2387         * dom/CharacterData.h: Moved a constant for maximum length from Text.h.
2388
2389         * dom/Text.cpp: (WebCore::Text::createWithLengthLimit):
2390         * dom/Text.h:
2391         This function was unused in ToT. Moved code around to share with CharacterData.
2392
2393         * html/parser/HTMLConstructionSite.cpp: (WebCore::HTMLConstructionSite::insertTextNode):
2394         Chnaged to split large text nodes while parsing again.
2395
2396 2011-03-07  Alice Boxhall  <aboxhall@chromium.org>
2397
2398         Reviewed by Adam Barth.
2399
2400         Fix platform/image-encoders/JPEGImageEncoder.cpp empty_output_buffer() behaviour
2401         https://bugs.webkit.org/show_bug.cgi?id=54522
2402
2403         Fix jpegEmptyOutputBuffer() by ignoring free_in_buffer value as required.
2404
2405         No new tests, as this code is not yet used in WebKit. Once this code is used to implement canvas.toDataUrl(), the canvas tests will exercise it.
2406
2407         * platform/image-encoders/JPEGImageEncoder.cpp:
2408         (WebCore::jpegEmptyOutputBuffer):
2409
2410 2011-03-07  Sergey Glazunov  <serg.glazunov@gmail.com>
2411
2412         Reviewed by Eric Seidel.
2413
2414         Add the missing insertedIntoDocument() call in SVGVKernElement and SVGHKernElement
2415         https://bugs.webkit.org/show_bug.cgi?id=55896
2416
2417         Test: svg/dom/vkern-element-crash.html
2418
2419         * svg/SVGHKernElement.cpp:
2420         (WebCore::SVGHKernElement::insertedIntoDocument):
2421         * svg/SVGVKernElement.cpp:
2422         (WebCore::SVGVKernElement::insertedIntoDocument):
2423
2424 2011-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2425
2426         Unreviewed, rolling out r80514.
2427         http://trac.webkit.org/changeset/80514
2428         https://bugs.webkit.org/show_bug.cgi?id=55915
2429
2430         Caused assertion failures (Requested by ukai on #webkit).
2431
2432         * platform/graphics/skia/GraphicsContextSkia.cpp:
2433         (WebCore::GraphicsContext::setPlatformShadow):
2434         * platform/graphics/skia/ImageSkia.cpp:
2435         (WebCore::paintSkBitmap):
2436
2437 2011-03-07  Cosmin Truta  <ctruta@chromium.org>
2438
2439         Reviewed by Adam Barth.
2440
2441         SVG <image> referenced by <use> is displayed incorrectly
2442         https://bugs.webkit.org/show_bug.cgi?id=55750
2443
2444         The result of sourceURI must use the URL of the enclosing document as base.
2445         Otherwise, the base may sometimes be empty, and, as a consequence,
2446         the intermediate KURL object may be invalid.
2447
2448         Test: svg/custom/use-image-in-g.svg
2449
2450         * svg/SVGImageLoader.cpp:
2451         (WebCore::SVGImageLoader::sourceURI):
2452
2453 2011-03-07  Helder Correia  <helder@sencha.com>
2454
2455         Reviewed by Simon Fraser.
2456
2457         Shadow is not shown when using strokeRect with a gradient strokeStyle
2458         https://bugs.webkit.org/show_bug.cgi?id=52509
2459
2460         This happens in CG and is related to bug 51869, this time to be fixed
2461         in GraphicsContext::strokeRect(const FloatRect& r, float lineWidth).
2462         We need to draw the gradient clipped to the stroke on a CGLayer first,
2463         and then draw the layer on the GraphicsContext.
2464
2465         Tests: fast/canvas/canvas-strokeRect-gradient-shadow.html
2466                svg/css/rect-gradient-stroke-shadow.svg
2467
2468         * platform/graphics/cg/GraphicsContextCG.cpp:
2469         (WebCore::GraphicsContext::strokeRect):
2470
2471 2011-03-07  Justin Novosad  <junov@chromium.org>
2472
2473         Reviewed by Kenneth Russell.
2474
2475         Fix for blurs behind bitmap images in Chromium, and boosting
2476         shadow blur quality 
2477         Bug URLs:
2478                 https://bugs.webkit.org/show_bug.cgi?id=55410
2479                 https://bugs.webkit.org/show_bug.cgi?id=55506
2480
2481         No new tests. Covered by existing layout tests. 
2482
2483         * platform/graphics/skia/GraphicsContextSkia.cpp:
2484         (WebCore::GraphicsContext::setPlatformShadow): Turn on high quality shadows and fix shadow color
2485         * platform/graphics/skia/ImageSkia.cpp:
2486         (WebCore::paintSkBitmap): Propagate the draw looper from context to painter
2487
2488 2011-03-07  Andreas Kling  <kling@webkit.org>
2489
2490         Unreviewed Mac build fix after r80508.
2491
2492         * WebCore.exp.in:
2493
2494 2011-03-07  Enrica Casucci  <enrica@apple.com>
2495
2496         Unreviewed build fix.
2497
2498         Rolling back  http://trac.webkit.org/changeset/80497 due to the
2499         32-bit build failures.
2500
2501         * WebCore.xcodeproj/project.pbxproj:
2502         * platform/mac/HTMLConverter.h: Removed.
2503         * platform/mac/HTMLConverter.mm: Removed.
2504         * platform/mac/PasteboardMac.mm:
2505         (WebCore::Pasteboard::writeSelection):
2506
2507 2011-03-07  Andreas Kling  <kling@webkit.org>
2508
2509         Reviewed by Benjamin Poulain.
2510
2511         FrameView::setBaseBackgroundColor: Pass Color argument as const-reference.
2512
2513         * page/FrameView.cpp:
2514         (WebCore::FrameView::setBaseBackgroundColor):
2515         * page/FrameView.h:
2516
2517 2011-03-07  Adam Barth  <abarth@webkit.org>
2518
2519         Reviewed by Dimitri Glazkov.
2520
2521         REGRESSION(r78147): Crash on http://gnarf.net/jquery/test/
2522         https://bugs.webkit.org/show_bug.cgi?id=55894
2523
2524         The m_frame can disappear out from under us, and there's no point in
2525         checking whether the load is complete in a non-existant frame.
2526
2527         Test: fast/parser/document-write-into-initial-document.html
2528
2529         * dom/Document.cpp:
2530         (WebCore::Document::explicitClose):
2531
2532 2011-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2533
2534         Unreviewed, rolling out r80500.
2535         http://trac.webkit.org/changeset/80500
2536         https://bugs.webkit.org/show_bug.cgi?id=55908
2537
2538         Caused mysterious GYP error (Requested by abarth on #webkit).
2539
2540         * WebCore.gyp/WebCore.gyp:
2541         * WebCore.gypi:
2542
2543 2011-03-07  Adam Barth  <abarth@webkit.org>
2544
2545         Fix Chromium Mac build.  This header should only be included when the
2546         feature is enabled.
2547
2548         * platform/cf/RunLoopTimerCF.cpp:
2549
2550 2011-03-07  Adam Barth  <abarth@webkit.org>
2551
2552         Reviewed by Dimitri Glazkov.
2553
2554         Add WML files to WebCore.gypi
2555         https://bugs.webkit.org/show_bug.cgi?id=55905
2556
2557         * WebCore.gyp/WebCore.gyp:
2558         * WebCore.gypi:
2559
2560 2011-03-07  Adrienne Walker  <enne@google.com>
2561
2562         Reviewed by James Robinson.
2563
2564         [chromium] Add missing include to #define Skia parameter
2565         https://bugs.webkit.org/show_bug.cgi?id=55885
2566
2567         * platform/graphics/chromium/ShaderChromium.h:
2568
2569 2011-03-07  Chris Fleizach  <cfleizach@apple.com>
2570
2571         Reviewed by Beth Dakin.
2572
2573         AX: WK1 needs to use ScrollView attachment for AXScrollArea, WK2 does not
2574         https://bugs.webkit.org/show_bug.cgi?id=55706
2575
2576         * WebCore.exp.in:
2577         * accessibility/AXObjectCache.cpp:
2578         (WebCore::AXObjectCache::rootObjectForFrame):
2579         * accessibility/AXObjectCache.h:
2580         * accessibility/AccessibilityScrollView.cpp:
2581         (WebCore::AccessibilityScrollView::isAttachment):
2582         (WebCore::AccessibilityScrollView::widgetForAttachmentView):
2583         * accessibility/AccessibilityScrollView.h:
2584         (WebCore::AccessibilityScrollView::firstChild):
2585         * accessibility/mac/AccessibilityObjectWrapper.mm:
2586         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
2587
2588 2011-03-07  Enrica Casucci  <enrica@apple.com>
2589
2590         Reviewed by Darin Adler.
2591         
2592         REGRESSION: Copied content loses formatting on paste to external apps.
2593         https://bugs.webkit.org/show_bug.cgi?id=47615
2594         <rdar://problem/9001214>
2595
2596         This is a resubmission of a patch that was landed a while ago then rolled
2597         back because of a build failure on SnowLeopard and Leopard.
2598         
2599         This patch adds a way for WebKit2 to create NSAttributedStrings from
2600         a DOM range without using the AppKit api initWithDOMRange that internally
2601         needs to access the WebView. The NSAttributedString is needed to create
2602         RTF formats in the pasteboard.
2603         This is to be considered a first step, since in the future we want to have
2604         an implementation based on the TextIterator.
2605
2606         * WebCore.xcodeproj/project.pbxproj: Added new file.
2607         * platform/mac/HTMLConverter.h: Added.
2608         * platform/mac/HTMLConverter.mm: Added.
2609         * platform/mac/PasteboardMac.mm:
2610         (WebCore::Pasteboard::writeSelection): We now use WebHTMLConverter
2611         class for WebKit2 to create the NSAttributedString from the DOM range.
2612
2613 2011-03-07  Adam Barth  <abarth@webkit.org>
2614
2615         Reviewed by Dimitri Glazkov.
2616
2617         Add some missing platform files to WebCore.gypi
2618         https://bugs.webkit.org/show_bug.cgi?id=55897
2619
2620         There are a bunch more, but this is a start.
2621
2622         * WebCore.gyp/WebCore.gyp:
2623         * WebCore.gypi:
2624
2625 2011-03-07  Steve Block  <steveblock@google.com>
2626
2627         Reviewed by Jeremy Orlow.
2628
2629         Rename JNIBridgeV8.cpp/h to JavaFieldV8.cpp/h
2630         https://bugs.webkit.org/show_bug.cgi?id=55879
2631
2632         No new tests, refactoring only.
2633
2634         * Android.v8bindings.mk:
2635         * WebCore.gypi:
2636         * bridge/jni/v8/JavaClassV8.cpp:
2637         * bridge/jni/v8/JavaClassV8.h:
2638         * bridge/jni/v8/JavaFieldV8.cpp: Renamed from Source/WebCore/bridge/jni/v8/JNIBridgeV8.cpp.
2639         (JavaField::JavaField):
2640         * bridge/jni/v8/JavaFieldV8.h: Renamed from Source/WebCore/bridge/jni/v8/JNIBridgeV8.h.
2641         (JSC::Bindings::JavaField::name):
2642         (JSC::Bindings::JavaField::type):
2643         (JSC::Bindings::JavaField::getJNIType):
2644         * bridge/jni/v8/JavaInstanceV8.cpp:
2645         * bridge/jni/v8/JavaNPObjectV8.cpp:
2646
2647 2011-03-07  Daniel Cheng  <dcheng@chromium.org>
2648
2649         Reviewed by Tony Chang.
2650
2651         Add plumbing for paste support to ChromiumDataObject::types()
2652         https://bugs.webkit.org/show_bug.cgi?id=55792
2653
2654         This is a preliminary patch to support event.dataTransfer.items. This
2655         adds plumbing to support retrieving the types in a paste event. It also
2656         moves the check for files in a drag/paste up to ClipboardChromium, since
2657         internal code needs to be able to differentiate between actual files in
2658         a drag and someone that simply decided to use "Files" as a custom type
2659         string.
2660
2661         Test: editing/pasteboard/onpaste-text-html-types.html
2662
2663         * platform/chromium/ChromiumDataObject.cpp:
2664         (WebCore::ChromiumDataObject::types):
2665         (WebCore::ChromiumDataObject::containsFilenames):
2666         * platform/chromium/ChromiumDataObject.h:
2667         * platform/chromium/ClipboardChromium.cpp:
2668         (WebCore::ClipboardChromium::types):
2669         * platform/chromium/ClipboardMimeTypes.cpp:
2670         * platform/chromium/ClipboardMimeTypes.h:
2671
2672 2011-03-07  Takayoshi Kochi  <kochi@chromium.org>
2673
2674         Reviewed by Tony Chang.
2675
2676         [chromium] Use preferred locale information when choosing fallback
2677         font using fontconfig on Linux platform.
2678         http://bugs.webkit.org/show_bug.cgi?id=55453
2679
2680         No new tests, as it depends on ICU and locale setting, so it will be
2681         covered by Chromium side.
2682
2683         * platform/chromium/PlatformBridge.h:
2684         * platform/graphics/chromium/FontCacheLinux.cpp:
2685
2686 2011-03-07  Adam Barth  <abarth@webkit.org>
2687
2688         Reviewed by Eric Seidel.
2689
2690         Add gobject, cpp, and objc bindings to WebCore.gypi
2691         https://bugs.webkit.org/show_bug.cgi?id=55892
2692
2693         These are also excluded from the Chromium build but needed for various
2694         other ports.
2695
2696         * WebCore.gyp/WebCore.gyp:
2697         * WebCore.gypi:
2698
2699 2011-03-07  Sergey Glazunov  <serg.glazunov@gmail.com>
2700
2701         Reviewed by Dimitri Glazkov.
2702
2703         Node::checkAddChild and Node::checkReplaceChild shouldn't change the owner document of a node
2704         https://bugs.webkit.org/show_bug.cgi?id=55803
2705
2706         Test: fast/dom/dom-method-document-change.html
2707
2708         * dom/ContainerNode.cpp:
2709         (WebCore::ContainerNode::insertBefore):
2710         (WebCore::ContainerNode::replaceChild):
2711         (WebCore::ContainerNode::appendChild):
2712         * dom/Node.cpp:
2713         (WebCore::Node::checkReplaceChild):
2714         (WebCore::Node::checkAddChild):
2715         * dom/Node.h:
2716
2717 2011-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2718
2719         Unreviewed, rolling out r80484.
2720         http://trac.webkit.org/changeset/80484
2721         https://bugs.webkit.org/show_bug.cgi?id=55891
2722
2723         requires Chromium DEPS roll (Requested by dcheng on #webkit).
2724
2725         * platform/chromium/ChromiumDataObject.cpp:
2726         (WebCore::ChromiumDataObject::types):
2727         * platform/chromium/ChromiumDataObject.h:
2728         (WebCore::ChromiumDataObject::containsFilenames):
2729         * platform/chromium/ClipboardChromium.cpp:
2730         (WebCore::ClipboardChromium::types):
2731         * platform/chromium/ClipboardMimeTypes.cpp:
2732         * platform/chromium/ClipboardMimeTypes.h:
2733
2734 2011-03-07  Adam Barth  <abarth@webkit.org>
2735
2736         Reviewed by Dimitri Glazkov.
2737
2738         Add missing bindings/js files to WebCore.gypi
2739         https://bugs.webkit.org/show_bug.cgi?id=55888
2740
2741         These files are excluded from the Chromium build but needed for the Mac
2742         build.
2743
2744         * WebCore.gypi:
2745
2746 2011-03-07  Daniel Cheng  <dcheng@chromium.org>
2747
2748         Reviewed by Tony Chang.
2749
2750         Add plumbing for paste support to ChromiumDataObject::types()
2751         https://bugs.webkit.org/show_bug.cgi?id=55792
2752
2753         This is a preliminary patch to support event.dataTransfer.items. This
2754         adds plumbing to support retrieving the types in a paste event. It also
2755         moves the check for files in a drag/paste up to ClipboardChromium, since
2756         internal code needs to be able to differentiate between actual files in
2757         a drag and someone that simply decided to use "Files" as a custom type
2758         string.
2759
2760         Test: editing/pasteboard/onpaste-text-html-types.html
2761
2762         * platform/chromium/ChromiumDataObject.cpp:
2763         (WebCore::ChromiumDataObject::types):
2764         (WebCore::ChromiumDataObject::containsFilenames):
2765         * platform/chromium/ChromiumDataObject.h:
2766         * platform/chromium/ClipboardChromium.cpp:
2767         (WebCore::ClipboardChromium::types):
2768         * platform/chromium/ClipboardMimeTypes.cpp:
2769         * platform/chromium/ClipboardMimeTypes.h:
2770
2771 2011-03-07  Joseph Pecoraro  <joepeck@webkit.org>
2772
2773         Reviewed by Kenneth Rohde Christiansen.
2774
2775         Viewport Warning/Error Messages Are Now Inaccurate
2776         https://bugs.webkit.org/show_bug.cgi?id=53707
2777
2778         Correct and improve the error messages for viewport parsing.
2779
2780         Tests: fast/viewport/viewport-warnings-1.html
2781                fast/viewport/viewport-warnings-2.html
2782                fast/viewport/viewport-warnings-3.html
2783                fast/viewport/viewport-warnings-4.html
2784                fast/viewport/viewport-warnings-5.html
2785                fast/viewport/viewport-warnings-6.html
2786
2787         * dom/ViewportArguments.cpp:
2788         (WebCore::numericPrefix):
2789         (WebCore::findSizeValue): remove incorrect device-width / height tips.
2790         (WebCore::setViewportFeature): report a warning for an unrecognized key.
2791         (WebCore::viewportErrorMessageTemplate): added template for unrecognized key.
2792         (WebCore::viewportErrorMessageLevel): classify an unrecognized key is an error.
2793         * dom/ViewportArguments.h: removed no longer used warnings.
2794
2795 2011-03-07  James Robinson  <jamesr@chromium.org>
2796
2797         Reviewed by Kenneth Russell.
2798
2799         [chromium] Separate the update and draw portions of LayerRendererChromium's drawLayers function
2800         https://bugs.webkit.org/show_bug.cgi?id=54047
2801
2802         This splits up LayerRendererChromium::drawLayers() into two phases,
2803         one that updates layers and one that actually draws them.  Most of the
2804         patch is moving the bodies of drawLayers() and updateLayersRecursive()
2805         into smaller helper functions.
2806
2807         The main entry point is renamed updateAndDrawLayers(), but otherwise
2808         has the same signature as drawLayers() did.  Internally it does the
2809         following:
2810
2811         1.) Updates the root layer's contents
2812         2.) Updates the root layer's scrollbars
2813         3.) Updates the RenderSurface tree and the contents of all child
2814         layers
2815         4.) Draws the root layer and root layer scrollbars
2816         5.) Draws all child layers using the previously updated
2817         CCLayerImpl/RenderSurface data.
2818
2819         A few things still need to be done after this patch to complete the separation
2820         of the update and draw step, but they can happen in later patches:
2821         *) The root layer and root layer scrollbars contents should be
2822         uploaded to textures at draw time, not update time.
2823         *) The RenderSurface tree should be updated at draw time, not update
2824         time.
2825
2826         Covered by the compositing/ tests.
2827
2828         * platform/graphics/chromium/LayerRendererChromium.cpp:
2829         (WebCore::LayerRendererChromium::LayerRendererChromium):
2830         (WebCore::LayerRendererChromium::updateRootLayerContents):
2831         (WebCore::LayerRendererChromium::updateRootLayerScrollbars):
2832         (WebCore::LayerRendererChromium::drawRootLayer):
2833         (WebCore::LayerRendererChromium::updateAndDrawLayers):
2834         (WebCore::LayerRendererChromium::updateLayers):
2835         (WebCore::LayerRendererChromium::drawLayers):
2836         (WebCore::LayerRendererChromium::getFramebufferPixels):
2837         (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
2838         (WebCore::LayerRendererChromium::updateContentsRecursive):
2839         (WebCore::LayerRendererChromium::drawLayer):
2840         * platform/graphics/chromium/LayerRendererChromium.h:
2841         (WebCore::LayerRendererChromium::visibleRectSize):
2842         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
2843         (WebCore::RenderSurfaceChromium::drawSurface):
2844         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2845         * platform/graphics/chromium/cc/CCLayerImpl.h:
2846
2847 2011-03-07  Adam Barth  <abarth@webkit.org>
2848
2849         Reviewed by Eric Seidel.
2850
2851         Sort WebCore.gypi
2852         https://bugs.webkit.org/show_bug.cgi?id=55887
2853
2854         These files should be in order.  This is preparation for adding in the
2855         missing files.
2856
2857         * WebCore.gypi:
2858
2859 2011-03-07  Csaba Osztrogon√°c  <ossy@webkit.org>
2860
2861         Unreviewed buildfix after r80478.
2862
2863         * dom/Document.cpp: Add suggested parentheses to make GCC happy.
2864         (WebCore::Document::didReceiveTask):
2865
2866 2011-03-07  Yong Li  <yoli@rim.com>
2867
2868         Reviewed by Darin Adler.
2869
2870         Defer ScriptExecutionContext::Task's in Document when page loading is deferred.
2871         Schedule them with timer when page loading is resumed. The tasks will be performed
2872         in the original order. This fixes the problem that database callbacks could be missed
2873         when page loading was deferred.
2874         https://bugs.webkit.org/show_bug.cgi?id=49401
2875
2876         Manual test added: manual-tests/database-callback-deferred.html.
2877
2878         * dom/Document.cpp:
2879         (WebCore::Document::Document):
2880         (WebCore::Document::~Document):
2881         (WebCore::Document::didReceiveTask):
2882         (WebCore::Document::postTask):
2883         (WebCore::Document::pendingTasksTimerFired):
2884         (WebCore::Document::willDeferLoading):
2885         (WebCore::Document::didResumeLoading):
2886         * dom/Document.h:
2887         * manual-tests/database-callback-deferred.html: Added.
2888         * page/PageGroupLoadDeferrer.cpp:
2889         (WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
2890         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
2891
2892 2011-03-07  Antti Koivisto  <antti@apple.com>
2893
2894         Reviewed by Sam Weinig.
2895
2896         Use HashMaps for caching primitive values
2897         https://bugs.webkit.org/show_bug.cgi?id=55873
2898         
2899         Most documents use only small subset of cacheable primitive values. By replacing
2900         fixed size cache arrays with HashMaps we can reduce the constant memory usage while also
2901         expanding the range of cacheable values.
2902
2903         * css/CSSPrimitiveValueCache.cpp:
2904         (WebCore::CSSPrimitiveValueCache::CSSPrimitiveValueCache):
2905         (WebCore::CSSPrimitiveValueCache::createIdentifierValue):
2906         (WebCore::CSSPrimitiveValueCache::createColorValue):
2907         (WebCore::CSSPrimitiveValueCache::createValue):
2908         * css/CSSPrimitiveValueCache.h:
2909
2910 2011-03-07  Steve Block  <steveblock@google.com>
2911
2912         Reviewed by Jeremy Orlow.
2913
2914         Split JNIBridgeJSC.cpp/h into JavaArrayJSC.cpp/h and JavaFieldJSC.cpp/h
2915         https://bugs.webkit.org/show_bug.cgi?id=55881
2916
2917         No new tests, refactoring only.
2918
2919         * Android.jscbindings.mk:
2920         * GNUmakefile.am:
2921         * WebCore.xcodeproj/project.pbxproj:
2922         * bridge/jni/jsc/JNIBridgeJSC.cpp: Removed.
2923         * bridge/jni/jsc/JNIBridgeJSC.h: Removed.
2924         * bridge/jni/jsc/JNIUtilityPrivate.cpp:
2925         * bridge/jni/jsc/JavaClassJSC.cpp:
2926         * bridge/jni/jsc/JavaClassJSC.h:
2927         * bridge/jni/jsc/JavaInstanceJSC.cpp:
2928
2929 2011-03-07  Sam Weinig  <sam@webkit.org>
2930
2931         Reviewed by Anders Carlsson.
2932
2933         Replace WebKit2's decidePolicyForMIMEType with decidePolicyForResponse
2934         https://bugs.webkit.org/show_bug.cgi?id=55827
2935
2936         * loader/EmptyClients.h:
2937         (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForResponse):
2938         * loader/FrameLoaderClient.h:
2939         * loader/MainResourceLoader.cpp:
2940         (WebCore::MainResourceLoader::didReceiveResponse):
2941         * loader/PolicyChecker.cpp:
2942         (WebCore::PolicyChecker::checkContentPolicy):
2943         * loader/PolicyChecker.h:
2944         Rename FrameLoaderClient::dispatchDecidePolicyForMIMEType to dispatchDecidePolicyForResponse
2945         and pass the entire response, instead of just the MIMEType.
2946
2947 2011-03-07  Eric Carlson  <eric.carlson@apple.com>
2948
2949         Reviewed by Darin Adler.
2950
2951         Add API to enumerate/delete files downloaded for <audio> and <video>
2952         https://bugs.webkit.org/show_bug.cgi?id=55267
2953         <rdar://problem/9049280>
2954
2955         No new tests, this is just more plumbing.
2956
2957         * html/HTMLMediaElement.cpp:
2958         (WebCore::HTMLMediaElement::getSitesInMediaCache): Make static, call MediaPlayer static method.
2959         (WebCore::HTMLMediaElement::clearMediaCache): Ditto.
2960         (WebCore::HTMLMediaElement::clearMediaCacheForSite): Ditto.
2961         * html/HTMLMediaElement.h:
2962
2963         * platform/graphics/MediaPlayer.cpp:
2964         (WebCore::MediaPlayerFactory::MediaPlayerFactory): Add new media engine factory functions.
2965         (WebCore::addMediaEngine): Ditto.
2966         (WebCore::MediaPlayer::getSitesInMediaCache): Call static method on all installed media engines.
2967         (WebCore::MediaPlayer::clearMediaCache): Ditto.
2968         (WebCore::MediaPlayer::clearMediaCacheForSite): Ditto.
2969         * platform/graphics/MediaPlayer.h:
2970
2971         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2972         (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine): Update for MediaEngineRegistrar change.
2973
2974         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2975         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Ditto.
2976
2977         * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
2978         (WebCore::MediaPlayerPrivatePhonon::registerMediaEngine): Ditto.
2979
2980         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
2981         (WebCore::MediaPlayerPrivateQt::registerMediaEngine): Ditto.
2982
2983         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2984         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::registerMediaEngine): Ditto.
2985
2986         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
2987         (WebCore::MediaPlayerPrivate::registerMediaEngine): Ditto.
2988
2989 2011-03-07  Steve Block  <steveblock@google.com>
2990
2991         Reviewed by Jeremy Orlow.
2992
2993         Split JNIBridge.cpp/h into JavaString.h and JavaMethod.cpp/h
2994         https://bugs.webkit.org/show_bug.cgi?id=55774
2995
2996         No new tests, refactoring only.
2997
2998         * Android.jscbindings.mk:
2999         * Android.v8bindings.mk:
3000         * GNUmakefile.am:
3001         * WebCore.gypi:
3002         * WebCore.xcodeproj/project.pbxproj:
3003         * bridge/jni/JavaMethod.cpp:
3004         (JavaMethod::JavaMethod):
3005         (JavaMethod::~JavaMethod):
3006         (appendClassName):
3007         (JavaMethod::signature):
3008         (JavaMethod::JNIReturnType):
3009         (JavaMethod::methodID):
3010         * bridge/jni/JavaMethod.h:
3011         (JSC::Bindings::JavaMethod::name):
3012         (JSC::Bindings::JavaMethod::returnType):
3013         (JSC::Bindings::JavaMethod::parameterAt):
3014         (JSC::Bindings::JavaMethod::numParameters):
3015         (JSC::Bindings::JavaMethod::isStatic):
3016         * bridge/jni/JavaString.h:
3017         (JSC::Bindings::JavaString::JavaString):
3018         (JSC::Bindings::JavaString::utf8):
3019         (JSC::Bindings::JavaString::length):
3020         (JSC::Bindings::JavaString::impl):
3021         * bridge/jni/jni_jsobject.mm:
3022         * bridge/jni/jsc/JNIBridgeJSC.h:
3023         * bridge/jni/v8/JNIBridgeV8.h:
3024         * bridge/jni/v8/JavaClassV8.cpp:
3025         * bridge/jni/v8/JavaClassV8.h:
3026         * bridge/jni/v8/JavaInstanceV8.cpp:
3027
3028 2011-03-07  Jeremy Orlow  <jorlow@chromium.org>
3029
3030         Reviewed by Steve Block.
3031
3032         Add source to IDBCursor, objectStore to IDBIndex, and remove storeName
3033         https://bugs.webkit.org/show_bug.cgi?id=55812
3034
3035         This brings us in line with what's in the spec:
3036         http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html
3037
3038         * storage/IDBCursor.cpp:
3039         (WebCore::IDBCursor::create):
3040         (WebCore::IDBCursor::IDBCursor):
3041         (WebCore::IDBCursor::source):
3042         * storage/IDBCursor.h:
3043         * storage/IDBCursor.idl:
3044         * storage/IDBCursorWithValue.cpp:
3045         (WebCore::IDBCursorWithValue::create):
3046         (WebCore::IDBCursorWithValue::IDBCursorWithValue):
3047         * storage/IDBCursorWithValue.h:
3048         * storage/IDBIndex.cpp:
3049         (WebCore::IDBIndex::IDBIndex):
3050         * storage/IDBIndex.h:
3051         (WebCore::IDBIndex::create):
3052         (WebCore::IDBIndex::objectStore):
3053         * storage/IDBIndex.idl:
3054         * storage/IDBObjectStore.cpp:
3055         (WebCore::IDBObjectStore::createIndex):
3056         (WebCore::IDBObjectStore::index):
3057         * storage/IDBRequest.cpp:
3058         (WebCore::IDBRequest::onSuccess):
3059
3060 2011-03-07  Chris Fleizach  <cfleizach@apple.com>
3061
3062         Reviewed by Beth Dakin.
3063
3064         AX: kAXCellForColumnAndRowParameterizedAttribute doesn't work ARIA grids with colspans
3065         https://bugs.webkit.org/show_bug.cgi?id=55735
3066
3067         The ARIA grid implementation needed to verify the row/column range of a cell instead of 
3068         assuming a 1-1 mapping between children and row/column.
3069
3070         Test: platform/mac/accessibility/aria-table-with-colspan-cells.html
3071
3072         * accessibility/AccessibilityARIAGrid.cpp:
3073         (WebCore::AccessibilityARIAGrid::cellForColumnAndRow):
3074
3075 2011-03-07  Andrei Popescu  <andreip@google.com>
3076
3077         Reviewed by Steve Block.
3078
3079         IDBRequest::onSuccess(IDBObjectStore*) should be removed as it is unused.
3080         IDBObjectStore objects used to be created asynchronously, so we needed
3081         this method to be invoked, with the new object store as the parameter,
3082         whenever the creation succeeded. The spec has changed so that IDBObjectStore
3083         objects are created synchronously, so this method is no longer needed.
3084         https://bugs.webkit.org/show_bug.cgi?id=55777
3085
3086         No new tests, just refactoring.
3087
3088         * storage/IDBCallbacks.h:
3089         * storage/IDBRequest.cpp:
3090         * storage/IDBRequest.h:
3091
3092 2011-03-04  Steve Block  <steveblock@google.com>
3093
3094         Reviewed by Jeremy Orlow.
3095
3096         JavaParameter should be removed
3097         https://bugs.webkit.org/show_bug.cgi?id=55772
3098
3099         No new tests, refactoring only.
3100
3101         * bridge/jni/JNIBridge.cpp:
3102         (JavaMethod::JavaMethod):
3103         (JavaMethod::~JavaMethod):
3104         (JavaMethod::signature):
3105         * bridge/jni/JNIBridge.h:
3106         (JSC::Bindings::JavaMethod::parameterAt):
3107         (JSC::Bindings::JavaMethod::numParameters):
3108         * bridge/jni/JNIUtility.h:
3109         * bridge/jni/jsc/JavaInstanceJSC.cpp:
3110         (JavaInstance::invokeMethod):
3111         * bridge/jni/v8/JNIUtilityPrivate.cpp:
3112         (JSC::Bindings::convertNPVariantToJValue):
3113         * bridge/jni/v8/JNIUtilityPrivate.h:
3114         * bridge/jni/v8/JavaInstanceV8.cpp:
3115         (JavaInstance::invokeMethod):
3116
3117 2011-03-07  Antti Koivisto  <antti@apple.com>
3118
3119         Reviewed by Oliver Hunt.
3120
3121         REGRESSION (r79574): fast/dom/global-constructors.html failing on Windows 7 Release (Tests) bots 
3122         https://bugs.webkit.org/show_bug.cgi?id=55166
3123         <rdar://problem/9050430>
3124         
3125         Make CSS primitive value cache per-document.
3126         
3127         Test: http/tests/security/cross-origin-css-primitive.html
3128
3129         * Android.mk:
3130         * CMakeLists.txt:
3131         * GNUmakefile.am:
3132         * WebCore.gypi:
3133         * WebCore.pro:
3134         * WebCore.vcproj/WebCore.vcproj:
3135         * WebCore.xcodeproj/project.pbxproj:
3136         * css/CSSComputedStyleDeclaration.cpp:
3137         (WebCore::valueForNinePieceImage):
3138         (WebCore::zoomAdjustedPixelValue):
3139         (WebCore::zoomAdjustedNumberValue):
3140         (WebCore::zoomAdjustedPixelValueForLength):
3141         (WebCore::valueForReflection):
3142         (WebCore::getPositionOffsetValue):
3143         (WebCore::CSSComputedStyleDeclaration::currentColorOrValidColor):
3144         (WebCore::getBorderRadiusCornerValue):
3145         (WebCore::computedTransform):
3146         (WebCore::getDelayValue):
3147         (WebCore::getDurationValue):
3148         (WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword):
3149         (WebCore::CSSComputedStyleDeclaration::valueForShadow):
3150         (WebCore::valueForFamily):
3151         (WebCore::renderTextDecorationFlagsToCSSValue):
3152         (WebCore::fillRepeatToCSSValue):
3153         (WebCore::fillSizeToCSSValue):
3154         (WebCore::contentToCSSValue):
3155         (WebCore::counterToCSSValue):
3156         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3157         * css/CSSParser.cpp:
3158         (WebCore::CSSParser::parseSheet):
3159         (WebCore::CSSParser::parseRule):
3160         (WebCore::CSSParser::parseKeyframeRule):
3161         (WebCore::CSSParser::parseValue):
3162         (WebCore::CSSParser::parseColor):
3163         (WebCore::CSSParser::parseSelector):
3164         (WebCore::CSSParser::parseDeclaration):
3165         (WebCore::CSSParser::setStyleSheet):
3166         (WebCore::CSSParser::parseWCSSInputProperty):
3167         (WebCore::parseBackgroundClip):
3168         (WebCore::CSSParser::parseFillShorthand):
3169         (WebCore::CSSParser::parsePage):
3170         (WebCore::CSSParser::parseSizeParameter):
3171         (WebCore::CSSParser::parseContent):
3172         (WebCore::CSSParser::parseAttr):
3173         (WebCore::CSSParser::parseBackgroundColor):
3174         (WebCore::CSSParser::parseFillPositionXY):
3175         (WebCore::CSSParser::parseFillPosition):
3176         (WebCore::CSSParser::parseFillRepeat):
3177         (WebCore::CSSParser::parseFillSize):
3178         (WebCore::CSSParser::parseFillProperty):
3179         (WebCore::CSSParser::parseAnimationDelay):
3180         (WebCore::CSSParser::parseAnimationDirection):
3181         (WebCore::CSSParser::parseAnimationDuration):
3182         (WebCore::CSSParser::parseAnimationFillMode):
3183         (WebCore::CSSParser::parseAnimationIterationCount):
3184         (WebCore::CSSParser::parseAnimationName):
3185         (WebCore::CSSParser::parseAnimationPlayState):
3186         (WebCore::CSSParser::parseAnimationProperty):
3187         (WebCore::CSSParser::parseTransformOriginShorthand):
3188         (WebCore::CSSParser::parseAnimationTimingFunction):
3189         (WebCore::CSSParser::parseDashboardRegions):
3190         (WebCore::CSSParser::parseCounterContent):
3191         (WebCore::CSSParser::parseShape):
3192         (WebCore::CSSParser::parseFont):
3193         (WebCore::CSSParser::parseFontFamily):
3194         (WebCore::CSSParser::parseFontStyle):
3195         (WebCore::CSSParser::parseFontVariant):
3196         (WebCore::CSSParser::parseFontWeight):
3197         (WebCore::ShadowParseContext::ShadowParseContext):
3198         (WebCore::ShadowParseContext::commitLength):
3199         (WebCore::ShadowParseContext::commitStyle):
3200         (WebCore::CSSParser::parseShadow):
3201         (WebCore::CSSParser::parseReflect):
3202         (WebCore::BorderImageParseContext::BorderImageParseContext):
3203         (WebCore::BorderImageParseContext::commitNumber):
3204         (WebCore::BorderImageParseContext::commitBorderImage):
3205         (WebCore::CSSParser::parseBorderImage):
3206         (WebCore::CSSParser::parseBorderRadius):
3207         (WebCore::CSSParser::parseCounter):
3208         (WebCore::parseDeprecatedGradientPoint):
3209         (WebCore::parseDeprecatedGradientColorStop):
3210         (WebCore::CSSParser::parseDeprecatedGradient):
3211         (WebCore::valueFromSideKeyword):
3212         (WebCore::parseGradientColorOrKeyword):
3213         (WebCore::CSSParser::parseLinearGradient):
3214         (WebCore::CSSParser::parseRadialGradient):
3215         (WebCore::CSSParser::parseGradientColorStops):
3216         (WebCore::CSSParser::parseTransform):
3217         (WebCore::CSSParser::parseTransformOrigin):
3218         (WebCore::CSSParser::parseTextEmphasisStyle):
3219         * css/CSSParser.h:
3220         (WebCore::CSSParser::primitiveValueCache):
3221         * css/CSSPrimitiveValue.cpp:
3222         * css/CSSPrimitiveValue.h:
3223         (WebCore::CSSPrimitiveValue::createIdentifier):
3224         (WebCore::CSSPrimitiveValue::createColor):
3225         (WebCore::CSSPrimitiveValue::create):
3226         * css/CSSPrimitiveValueCache.cpp: Added.
3227         (WebCore::CSSPrimitiveValueCache::CSSPrimitiveValueCache):
3228         (WebCore::CSSPrimitiveValueCache::~CSSPrimitiveValueCache):
3229         (WebCore::CSSPrimitiveValueCache::createIdentifierValue):
3230         (WebCore::CSSPrimitiveValueCache::createColorValue):
3231         (WebCore::CSSPrimitiveValueCache::createValue):
3232         * css/CSSPrimitiveValueCache.h: Added.
3233         (WebCore::CSSPrimitiveValueCache::create):
3234         (WebCore::CSSPrimitiveValueCache::createValue):
3235         * dom/Document.cpp:
3236         (WebCore::Document::cssPrimitiveValueCache):
3237         * dom/Document.h:
3238
3239 2011-03-06  Adam Barth  <abarth@webkit.org>
3240
3241         Reviewed by Eric Seidel.
3242
3243         Filter sources in WebCore GYP build for Mac
3244         https://bugs.webkit.org/show_bug.cgi?id=55857
3245
3246         This patch removes a large number of files that do not build as part of
3247         the Mac build.  I'm not fully sold on this method of
3248         including/excluding files, but it's the "gyp way" so we should probably
3249         try it first.
3250
3251         This patch also sets xcode_list_excluded_files to 0, which removes the
3252         excluded files from the Xcode project file, which is necessary in order
3253         to prevent the header map feature from including the wrong header file.
3254
3255         * gyp/WebCore.gyp:
3256
3257 2011-03-07  Ryuan Choi  <ryuan.choi@samsung.com>
3258
3259         Unreviewed EFL build fix.
3260
3261         [EFL] Build break on Debug build.
3262         https://bugs.webkit.org/show_bug.cgi?id=55858
3263
3264         * platform/efl/RenderThemeEfl.cpp:
3265         (WebCore::RenderThemeEfl::themePartCacheEntrySurfaceCreate):
3266
3267 2011-03-06  Adam Barth  <abarth@webkit.org>
3268
3269         Reviewed by Eric Seidel.
3270
3271         Add webcore_derived_source_files to WebCore.gypi
3272         https://bugs.webkit.org/show_bug.cgi?id=55856
3273
3274         This is the list of files generated by the Mac port.  It's possible
3275         other ports generate a different list of files.
3276
3277         * WebCore.gypi:
3278         * gyp/WebCore.gyp:
3279
3280 2011-03-06  Naoki Takano  <takano.naoki@gmail.com>
3281
3282         Reviewed by Kent Tamura.
3283
3284         Input type=number spin buttons remain invisible but functional after div changed from hidden to visible.
3285         https://bugs.webkit.org/show_bug.cgi?id=55839
3286         http://crbug.com/73866
3287         http://crbug.com/62527
3288
3289         We also need style change for m_innerSpinButton not only for m_outerSpinBuggon when styleDidChange() is called.
3290
3291         Test: fast/forms/input-appearance-spinbutton-visibility.html
3292
3293         * rendering/RenderTextControlSingleLine.cpp:
3294         (WebCore::RenderTextControlSingleLine::styleDidChange):
3295
3296 2011-03-06  Naoki Takano  <takano.naoki@gmail.com>
3297
3298         Reviewed by Kent Tamura.
3299
3300         [Chromium] Autocomplete suggestion extends out of window (and onto second monitor)
3301         https://bugs.webkit.org/show_bug.cgi?id=54795
3302
3303         Implement width clip logic according to browser screen width and popup window width. This fix is enough for Win and Mac, but there is a problem in Linux. Because WebScreenInfoFactory::screenInfo() can get only merged screen size, not the screen size where the browser exists.
3304
3305         Test: manual-tests/popup-width-restriction-within-screen.html
3306
3307         * manual-tests/popup-width-restriction-within-screen.html: Added.
3308         * platform/chromium/PopupMenuChromium.cpp:
3309         (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Implement the width clip logic according to screen width.
3310
3311 2011-03-06  Yuta Kitamura  <yutak@chromium.org>
3312
3313         Reviewed by Kent Tamura.
3314
3315         Add SHA-1 for new WebSocket protocol
3316         https://bugs.webkit.org/show_bug.cgi?id=55039
3317
3318         * ForwardingHeaders/wtf/SHA1.h: Added.
3319
3320 2011-03-06  Eric Carlson  <eric.carlson@apple.com>
3321
3322         Reviewed by Antti Koivisto.
3323
3324         QuickTime based media engines should respect private browsing mode
3325         https://bugs.webkit.org/show_bug.cgi?id=55848
3326
3327         No new tests, it is only possible to test this by manually deleting and monitoring the
3328         the Quicktime caches.
3329
3330         * html/HTMLMediaElement.cpp:
3331         (WebCore::HTMLMediaElement::privateBrowsingStateDidChange): Add logging.
3332
3333         * platform/graphics/MediaPlayer.cpp:
3334         (WebCore::MediaPlayer::MediaPlayer): Initialize m_privateBrowsing.
3335         (WebCore::MediaPlayer::loadWithNextMediaEngine): Set privacy mode on new media engine.
3336         (WebCore::MediaPlayer::setPrivateBrowsingMode): Stash setting in m_privateBrowsing.
3337         * platform/graphics/MediaPlayer.h:
3338         * platform/graphics/MediaPlayerPrivate.h:
3339         (WebCore::MediaPlayerPrivateInterface::setPrivateBrowsingMode):
3340
3341         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3342         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3343         (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit): Initialize m_privateBrowsing.
3344         (WebCore::MediaPlayerPrivateQTKit::createQTMovie): Pass private browsing attribute when
3345             creating new movie.
3346         (WebCore::MediaPlayerPrivateQTKit::setPrivateBrowsingMode): New, store privacy setting in
3347             m_privateBrowsing and set movie attribute.
3348
3349         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
3350         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::MediaPlayerPrivateQuickTimeVisualContext):
3351             Initialize m_privateBrowsing.
3352         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setPrivateBrowsingMode): New, store 
3353             privacy setting in m_privateBrowsing and call QTMovie.
3354         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.h:
3355
3356         * platform/graphics/win/QTMovie.cpp:
3357         (QTMoviePrivate::QTMoviePrivate): Initialize m_privateBrowsing.
3358         (QTMovie::load):Pass private browsing property when creating new movie.
3359         (QTMovie::setPrivateBrowsingMode):  New, store privacy setting in m_privateBrowsing and 
3360             set movie property.
3361         * platform/graphics/win/QTMovie.h:
3362
3363 2011-03-06  Daniel Bates  <dbates@rim.com>
3364
3365         Reviewed by Darin Adler.
3366
3367         style.borderSpacing always returns empty string
3368         https://bugs.webkit.org/show_bug.cgi?id=54816
3369
3370         Teach CSSMutableStyleDeclaration::getPropertyValue() how to reconstitute
3371         the value for border-spacing from the value of the WebKit internal CSS
3372         property -webkit-border-horizontal-spacing and -webkit-border-vertical-spacing.
3373
3374         The CSS property border-spacing describes the horizontal and vertical border
3375         spacing for an HTML Table element. Notice, WebKit internally represents the value
3376         of this property as two properties: -webkit-border-horizontal-spacing and
3377         -webkit-border-vertical-spacing, for the horizontal and vertical border spacing,
3378         respectively. And WebKit doesn't know to reconstitute these internal properties.
3379         Therefore style.borderSpacing always returns the empty string.
3380
3381         Test: fast/css/table-border-spacing.html
3382
3383         * css/CSSMutableStyleDeclaration.cpp:
3384         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
3385         (WebCore::CSSMutableStyleDeclaration::borderSpacingValue): Added.
3386         * css/CSSMutableStyleDeclaration.h:
3387
3388 2011-03-06  Dan Bernstein  <mitz@apple.com>
3389
3390         Reviewed by Oliver Hunt.
3391
3392         <rdar://problem/9093327> Implement -hyphenate-limit-{before,after}
3393         https://bugs.webkit.org/show_bug.cgi?id=55850
3394
3395         Tests: fast/css/parsing-hyphenate-limit.html
3396                fast/text/hyphenate-limit-before-after.html
3397
3398         * css/CSSComputedStyleDeclaration.cpp:
3399         (WebCore::computedProperties) Updated this array with the new properties and some old properties
3400         that it was missing.
3401         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added
3402         CSSPropertyWebkitHyphenateLimit{Before,After}.
3403
3404         * css/CSSParser.cpp:
3405         (WebCore::CSSParser::parseValue): Parse -webkit-hyphenate-limit-{before,after}, allowing
3406         'auto' and non-negative integers.
3407
3408         * css/CSSPropertyNames.in: Added -webkit-hyphenate-limit-{before,after}.
3409
3410         * css/CSSStyleSelector.cpp:
3411         (WebCore::CSSStyleSelector::applyProperty): Handle CSSPropertyWebkitHyphenateLimit{Before,After}.
3412
3413         * rendering/RenderBlockLineLayout.cpp:
3414         (WebCore::tryHyphenating): Added minimum prefix and suffix length parameters and checks to only
3415         allow hyphenation if the prefix and the suffix are sufficiently long.
3416         (WebCore::RenderBlock::findNextLineBreak): Pass the limits to tryHyphenating().
3417
3418         * rendering/style/RenderStyle.cpp:
3419         (WebCore::RenderStyle::diff): A difference in hyphenation limits is a layout difference.
3420
3421         * rendering/style/RenderStyle.h:
3422         (WebCore::InheritedFlags::hyphenationLimitBefore): Added.
3423         (WebCore::InheritedFlags::hyphenationLimitAfter): Added.
3424         (WebCore::InheritedFlags::setHyphenationLimitBefore): Added.
3425         (WebCore::InheritedFlags::setHyphenationLimitAfter): Added.
3426         (WebCore::InheritedFlags::initialHyphenationLimitBefore): Added. Returns -1, which is the
3427         representation of 'auto'.
3428         (WebCore::InheritedFlags::initialHyphenationLimitAfter): Ditto.
3429
3430         * rendering/style/StyleRareInheritedData.cpp:
3431         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Initialize hyphenation limits.
3432         (WebCore::StyleRareInheritedData::operator==): Compare hyphenation limits.
3433         * rendering/style/StyleRareInheritedData.h:
3434
3435 2011-03-06  Jessie Berlin  <jberlin@apple.com>
3436
3437         Reviewed by Sam Weinig.
3438
3439         WebKit2: Use CFNetwork Sessions API.
3440         https://bugs.webkit.org/show_bug.cgi?id=55435.
3441
3442         When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
3443         Private Browsing Storage Session.
3444
3445         * WebCore.exp.in:
3446         Add the new WKSI functions.
3447         * platform/mac/WebCoreSystemInterface.h:
3448         Ditto.
3449         * platform/mac/WebCoreSystemInterface.mm:
3450         Ditto.
3451
3452         * platform/mac/CookieJar.mm:
3453         (WebCore::cookies):
3454         If USE(CFURLSTORAGESESSIONS) and there is a Private Browsing Cookie Storage, call into WKSI.
3455         Otherwise, behave the same as before.
3456         (WebCore::cookieRequestHeaderFieldValue):
3457         Ditto.
3458         (WebCore::setCookies):
3459         Ditto.
3460         (WebCore::cookiesEnabled):
3461         Ditto
3462         (WebCore::getRawCookies):
3463         Ditto.
3464         (WebCore::deleteCookie):
3465         Ditto.
3466
3467         * platform/network/CookieStorage.h:
3468         * platform/network/cf/CookieStorageCFNet.cpp:
3469         (WebCore::privateBrowsingCookieStorage):
3470         Keep track of the Private Browsing Cookie Storage in a locally defined static inside a
3471         function instead of at the global scope.
3472         (WebCore::currentCookieStorage):
3473         Use privateBrowsingCookieStorage.
3474         (WebCore::setCurrentCookieStorage):
3475         Ditto.
3476         (WebCore::setCookieStoragePrivateBrowsingEnabled):
3477         If USE(CFURLSTORAGESESSIONS), send the Private Browsing Storage Session to
3478         wkCreatePrivateInMemoryHTTPCookieStorage.
3479         * platform/network/mac/CookieStorageMac.mm:
3480         (WebCore::privateBrowsingCookieStorage):
3481         Keep track of the Private Browsing Cookie Storage.
3482         (WebCore::setCookieStoragePrivateBrowsingEnabled):
3483         If USE(CFURLSTORAGESESSIONS), then set or clear privateBrowsingCookieStorage().
3484         Added a FIXME to observe changes to the Private Browsing Cookie Storage when it is defined.
3485
3486         * platform/network/mac/ResourceHandleMac.mm:
3487         (WebCore::shouldRelaxThirdPartyCookiePolicy):
3488         Refactor the logic to determine whether or not to relax the third party cookie policy here.
3489         If USE(CFURLSTORAGESESSIONS), then get the information from the privateBrowsingCookieStorage.
3490         (WebCore::ResourceHandle::createNSURLConnection):
3491         Use shouldRelaxThirdPartyCookiePolicy.
3492         (WebCore::ResourceHandle::loadResourceSynchronously):
3493         Ditto.
3494
3495 2011-03-05  Sheriff Bot  <webkit.review.bot@gmail.com>
3496
3497         Unreviewed, rolling out r80428.
3498         http://trac.webkit.org/changeset/80428
3499         https://bugs.webkit.org/show_bug.cgi?id=55833
3500
3501         Broke SnowLeopard (Requested by xan_ on #webkit).
3502