Layout Test inspector/debugger/dom-breakpoints.html fails on chromium linux debug...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-12-07  Adam Klein  <adamk@chromium.org>
2
3         Layout Test inspector/debugger/dom-breakpoints.html fails on chromium linux debug with ENABLE(MUTATION_OBSERVERS)
4         https://bugs.webkit.org/show_bug.cgi?id=73919
5
6         Reviewed by Ojan Vafai.
7
8         Use StyleAttributeMutationScope to manage DOM breakpoints for style property changes.
9
10         Instead of calling InspectorInstrumentation::didInvalidateStyleAttr()
11         directly in setNeedsStyleRecalc, set a bool in the current
12         StyleAttributeMutationScope, and delay the call until the scope's
13         counter runs down to zero. This keeps the inspector JS from re-entering
14         CSSMutableStyleDeclaration until all StyleAttributeMutationScope work is done.
15
16         Also fix a small bug in StyleAttributeMutationScope, where
17         s_shouldDeliver wasn't getting reset properly to false.
18
19         * css/CSSMutableStyleDeclaration.cpp:
20         (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
21
22 2011-12-07  Ken Buchanan <kenrb@chromium.org>
23
24         Crash from multicol spans with layers
25         https://bugs.webkit.org/show_bug.cgi?id=68030
26
27         Reviewed by David Hyatt.
28
29         The layer tree diverges from the render tree when a span is being split
30         between columns. This patch causes the layer tree to be updated when necessary.
31
32         * rendering/RenderBlock.cpp:
33         (WebCore::RenderBlock::splitFlow)
34         (WebCore::RenderBlock::splitBlocks)
35
36 2011-12-07  Alexey Proskuryakov  <ap@apple.com>
37
38         Handling of !important in inline style sets is broken
39         https://bugs.webkit.org/show_bug.cgi?id=73941
40
41         Reviewed by Dave Hyatt.
42
43         This behavior was introduced in bug 8223 to match IE and Firefox. But it doesn't appear that we're matching
44         any browser today, and CSSOM spec agrees with them.
45
46         * WebCore.exp.in: Don't export CSSStyleDeclaration::setProperty(), no one is using it.
47
48         * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::putDelegate): Use regular
49         setProperty(), not the incorrect version that's being removed. Properties set via IDL attributes are never
50         important.
51
52         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp: (WebCore::V8CSSStyleDeclaration::namedPropertySetter):
53         Made the same fix for v8. Why did v8 bindings authors copy/paste the code?!
54
55         * css/CSSStyleDeclaration.cpp:
56         * css/CSSStyleDeclaration.h:
57         Removed a version of setProperty() that attempted to parse the value and extract !important from it.
58
59         * html/ImageDocument.cpp:
60         (WebCore::ImageDocument::resizeImageToFit):
61         (WebCore::ImageDocument::restoreImageSize):
62         (WebCore::ImageDocument::windowSizeChanged):
63         * page/DragController.cpp:
64         (WebCore::DragController::concludeEditDrag):
65         We never needed to use this version of setProperty() here, it was just unnecessarily slower.
66
67 2011-12-07  Xianzhu Wang  <wangxianzhu@chromium.org>
68
69         In FontCacheAndroid.cpp should keep the pointer valid returned from CString::data()
70         https://bugs.webkit.org/show_bug.cgi?id=73849
71
72         The changed code has been covered by many existing layout tests.
73
74         Reviewed by Adam Barth.
75
76         * platform/graphics/chromium/FontCacheAndroid.cpp:
77         (WebCore::FontCache::createFontPlatformData):
78
79 2011-12-07  Xiaomei Ji  <xji@chromium.org>
80
81         Turn on move caret by word visually for Windows platform.
82         https://bugs.webkit.org/show_bug.cgi?id=59652
83
84         Reviewed by Ryosuke Niwa.
85
86         We already support (arrow key) moving cursor by character in visual order.
87         This patch implements (ctrl/alt-arrow) moving cursor by word in visual order (in Windows).
88         It matches Firefox's default behavior.
89
90         Without this patch, ctrl(alt for mac)-arrow key or
91         selection.modify("move", "left"/"right", "word") moves cursor by word in logical order. 
92
93         IE implements moving cursor by logical order for both arrow key and ctrl-arrow key.
94         Firefox implements moving cursor by visual order for both operations.
95         From Chromium bug report, native speakers would like moving cursor by visual order since it
96         is more intuitive.
97
98         The patch is only enabled for Windows (by EditingBehavior) because current implementation
99         matches Windows' native behavior.
100         For exmaple, if the logical text is "abc def hij", the cursor positions are
101         "|abc |def |hij|" no matter pressing ctrl-left-arrow or ctrl-right-arrow.
102
103         Mac and Linux's native behavior is slightly different. In which, when pressing
104         ctrl-left-arrow, the cursor positions are "|abc |def |hij|". When pressing ctrl-right-arrow,
105         the cursor positions are "|abc| def| hij|". We will implement it next.
106
107         Test: editing/selection/move-left-right-by-word-mac.html
108
109         * editing/EditingBehavior.h:
110         (WebCore::EditingBehavior::shouldMoveLeftRightByWordInVisualOrder):
111         * editing/FrameSelection.cpp: Remove experimental enum WebKitVisualWordGranularity.
112         (WebCore::FrameSelection::modifyExtendingRight):
113         (WebCore::FrameSelection::modifyExtendingForward):
114         (WebCore::FrameSelection::modifyMovingRight):
115         (WebCore::FrameSelection::modifyMovingForward):
116         (WebCore::FrameSelection::modifyExtendingLeft):
117         (WebCore::FrameSelection::modifyExtendingBackward):
118         (WebCore::FrameSelection::modifyMovingLeft):
119         (WebCore::FrameSelection::modifyMovingBackward):
120         * editing/TextGranularity.h: Remove experimental enum WebKitVisualWordGranularity.
121         * editing/VisibleSelection.cpp: Remove experimental enum WebKitVisualWordGranularity.
122         (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
123         * page/DOMSelection.cpp: Remove experimental experimental flag -webkit-visual-word.
124         (WebCore::DOMSelection::modify):
125
126 2011-12-07  Jonathan Backer  <backer@chromium.org>
127
128         [chromium] Plumb damage from WebExternalTextureLayer and WebPluginContainer to CCDamageTracker
129         https://bugs.webkit.org/show_bug.cgi?id=73485
130
131         Reviewed by Darin Fisher.
132
133         * platform/graphics/chromium/PluginLayerChromium.cpp:
134         (WebCore::PluginLayerChromium::updateCompositorResources):
135         (WebCore::PluginLayerChromium::invalidateRect):
136         * platform/graphics/chromium/PluginLayerChromium.h:
137
138 2011-12-07  Mary Wu  <mary.wu@torchmobile.com.cn>
139
140         Upstream 5 files into WebCore/platform/blackberry
141         https://bugs.webkit.org/show_bug.cgi?id=73632
142
143         Reviewed by Rob Buis.
144
145         Initial upstream, no new tests.
146
147         * PlatformBlackBerry.cmake: Remove two empty files from build list.
148         * platform/blackberry/PopupMenuBlackBerry.cpp: Added.
149         (WebCore::PopupMenuBlackBerry::PopupMenuBlackBerry):
150         (WebCore::PopupMenuBlackBerry::~PopupMenuBlackBerry):
151         (WebCore::PopupMenuBlackBerry::show):
152         (WebCore::PopupMenuBlackBerry::hide):
153         (WebCore::PopupMenuBlackBerry::updateFromElement):
154         (WebCore::PopupMenuBlackBerry::disconnectClient):
155         * platform/blackberry/PopupMenuBlackBerry.h: Added.
156         (WebCore::PopupMenuBlackBerry::client):
157         * platform/blackberry/ScrollbarThemeBlackBerry.cpp: Added.
158         (WebCore::ScrollbarTheme::nativeTheme):
159         * platform/blackberry/SearchPopupMenuBlackBerry.cpp: Added.
160         (WebCore::SearchPopupMenuBlackBerry::SearchPopupMenuBlackBerry):
161         (WebCore::SearchPopupMenuBlackBerry::popupMenu):
162         (WebCore::SearchPopupMenuBlackBerry::enabled):
163         (WebCore::SearchPopupMenuBlackBerry::saveRecentSearches):
164         (WebCore::SearchPopupMenuBlackBerry::loadRecentSearches):
165         * platform/blackberry/SearchPopupMenuBlackBerry.h: Added.
166
167 2011-12-07  Dan Bernstein  <mitz@apple.com>
168
169         Fixed the definition of BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING from r102246.
170
171         * platform/mac/ThemeMac.mm: Added parentheses.
172
173 2011-12-07  Dan Bernstein  <mitz@apple.com>
174
175         <rdar://problem/10542095> Focus rings are not drawn around push buttons, radio buttons and checkboxes
176
177         Reviewed by Darin Adler.
178
179         Instead of relying on -setShowsFirstResponder: to make -drawWithFrame:inView: draw the focus
180         ring, use -drawFocusRingMaskWithFrame:inView:.
181
182         * platform/mac/ThemeMac.mm:
183         (-[NSCell _web_drawFocusRingWithFrame:inView:]): Added. Sets up the focus ring style and a
184         transparency layer, then uses -drawFocusRingMaskWithFrame:inView: to draw the focus ring.
185         (WebCore::updateStates): Eliminated calls to get and set showsFirstResponder.
186         (WebCore::paintCheckbox): Changed to use -_web_drawFocusRingWithFrame:inView:.
187         (WebCore::paintRadio): Ditto.
188         (WebCore::paintButton): Ditto.
189
190 2011-12-07  Brian Salomon  <bsalomon@google.com>
191
192         [CHROMIUM/SKIA] Handle put[Un/Pre]multipliedImageData conversions in Skia rather than ImageBuffer
193         https://bugs.webkit.org/show_bug.cgi?id=73953
194
195         Reviewed by Stephen White.
196
197         Tested by existing canvas2d layout tests.
198
199         * platform/graphics/skia/ImageBufferSkia.cpp:
200         (WebCore::putImageData):
201         (WebCore::ImageBuffer::putUnmultipliedImageData):
202         (WebCore::ImageBuffer::putPremultipliedImageData):
203
204 2011-12-07  Andreas Kling  <kling@webkit.org>
205
206         Micro-optimize ScrollView::visibleContentRect().
207         <http://webkit.org/b/74001>
208
209         Reviewed by Anders Carlsson.
210
211         Reorder the scrollbar exclusion code to minimize the number of virtual calls
212         to ScrollableArea::verticalScrollbar(), ScrollableArea::horizontalScrollbar()
213         and Scrollbar::isOverlayScrollbar().
214
215         * platform/ScrollView.cpp:
216         (WebCore::ScrollView::visibleContentRect):
217
218 2011-12-07  Andreas Kling  <kling@webkit.org>
219
220         ApplyPropertyBorderImage: Remove unneeded template argument for mapNinePieceImage().
221         <http://webkit.org/b/73998>
222
223         Reviewed by Antti Koivisto.
224
225         Have ApplyPropertyBorderImage call mapNinePieceImage() directly now that it's
226         public (instead of passing it as a template argument.)
227
228         * css/CSSStyleApplyProperty.cpp:
229         (WebCore::ApplyPropertyBorderImage::applyValue):
230         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
231
232 2011-12-07  Jessie Berlin  <jberlin@apple.com>
233
234         Mac build fix after r102235.
235
236         * WebCore.exp.in:
237
238 2011-11-30  Simon Hausmann  <simon.hausmann@nokia.com>
239
240         [Qt] V8 debug build fixes.
241
242         Reviewed by Tor Arne Vestbø.
243
244         * Target.pri: Add missing files to the build.
245         * loader/SubresourceLoader.cpp: Add missing CString.h header file inclusion,
246         that is implicitly included with Chromium builds and only needed in ASSERTS
247         in debug builds.
248         * loader/cache/CachedResource.cpp: Ditto.
249         * page/FrameTree.cpp: Ditto.
250         * platform/graphics/MediaPlayer.cpp: Ditto.
251
252 2011-11-30  Simon Hausmann  <simon.hausmann@nokia.com>
253
254         [Qt] V8 build fixes.
255
256         Reviewed by Tor Arne Vestbø.
257
258         * Target.pri: Don't load(javascriptcore) if we're building with v8.
259
260 2011-12-07  Mary Wu  <mary.wu@torchmobile.com.cn>
261
262         Change function name InitializeLoggingChannelsIfNecessary to follow coding style guideline
263         https://bugs.webkit.org/show_bug.cgi?id=73986
264
265         Reviewed by Kenneth Rohde Christiansen.
266
267         Just function name change, no new tests.
268
269         * platform/Logging.h:
270         * platform/efl/LoggingEfl.cpp:
271         (WebCore::initializeLoggingChannelsIfNecessary):
272         * platform/gtk/LoggingGtk.cpp:
273         (WebCore::initializeLoggingChannelsIfNecessary):
274         * platform/mac/LoggingMac.mm:
275         (WebCore::initializeLoggingChannelsIfNecessary):
276         * platform/qt/LoggingQt.cpp:
277         (WebCore::initializeLoggingChannelsIfNecessary):
278         * platform/win/LoggingWin.cpp:
279         (WebCore::initializeLoggingChannelsIfNecessary):
280         * platform/wx/LoggingWx.cpp:
281         (WebCore::initializeLoggingChannelsIfNecessary):
282
283 2011-12-07  Mihnea Ovidenie  <mihnea@adobe.com>
284
285         [CSSRegions]Add support for background-color in region styling
286         https://bugs.webkit.org/show_bug.cgi?id=71488
287
288         Reviewed by David Hyatt.
289
290         Tests: fast/regions/region-style-block-background-color.html
291                fast/regions/region-style-block-background-color2.html
292                fast/regions/region-style-image-background-color.html
293                fast/regions/region-style-inline-background-color.html
294
295         * WebCore.exp.in:
296         * css/CSSStyleSelector.cpp:
297         (WebCore::RuleData::regionStyleRule):
298         (WebCore::CSSStyleSelector::CSSStyleSelector):
299         (WebCore::CSSStyleSelector::addMatchedDeclaration):
300         (WebCore::CSSStyleSelector::matchRules):
301         (WebCore::CSSStyleSelector::matchAllRules):
302         (WebCore::CSSStyleSelector::initForRegionStyling):
303         (WebCore::CSSStyleSelector::styleForElement):
304         (WebCore::CSSStyleSelector::pseudoStyleForElement):
305         (WebCore::RuleData::RuleData):
306         (WebCore::RuleSet::RuleSet):
307         (WebCore::RuleSet::addToRuleSet):
308         (WebCore::CSSStyleSelector::applyDeclarations):
309         (WebCore::isValidRegionStyleProperty):
310         (WebCore::CSSStyleSelector::applyProperty):
311         * css/CSSStyleSelector.h:
312         (WebCore::CSSStyleSelector::setRegionForStyling):
313         (WebCore::CSSStyleSelector::regionForStyling):
314         (WebCore::CSSStyleSelector::applyPropertyToRegionStyle):
315         * rendering/RenderFlowThread.cpp:
316         (WebCore::RenderFlowThread::clearRenderRegionRangeMap):
317         (WebCore::RenderFlowThread::~RenderFlowThread):
318         (WebCore::RenderFlowThread::layout):
319         (WebCore::RenderFlowThread::clearRenderObjectCustomStyle):
320         (WebCore::RenderFlowThread::setRegionRangeForBox):
321         * rendering/RenderFlowThread.h:
322         * rendering/RenderLayer.cpp:
323         (WebCore::CurrentRenderRegionMaintainer::CurrentRenderRegionMaintainer):
324         (WebCore::CurrentRenderRegionMaintainer::~CurrentRenderRegionMaintainer):
325         (WebCore::RenderLayer::paint):
326         (WebCore::RenderLayer::hitTest):
327         * rendering/RenderObject.cpp:
328         (WebCore::RenderObject::style):
329         * rendering/RenderObject.h:
330         (WebCore::RenderObject::canHaveRegionStyle):
331         * rendering/RenderObjectChildList.cpp:
332         (WebCore::RenderObjectChildList::removeChildNode):
333         * rendering/RenderRegion.cpp:
334         (WebCore::RenderRegion::layout):
335         (WebCore::RenderRegion::renderObjectRegionStyle):
336         (WebCore::RenderRegion::computeStyleInRegion):
337         (WebCore::RenderRegion::clearObjectStyleInRegion):
338         * rendering/RenderRegion.h:
339         * rendering/RenderView.cpp:
340         (WebCore::RenderView::RenderView):
341         * rendering/RenderView.h:
342         (WebCore::RenderView::currentRenderRegion):
343         (WebCore::RenderView::setCurrentRenderRegion):
344
345 2011-12-01  Vsevolod Vlasov  <vsevik@chromium.org>
346
347         Web Inspector: Extract default call stack creation and check for front-end from console.
348         https://bugs.webkit.org/show_bug.cgi?id=73566
349
350         Reviewed by Yury Semikhatsky.
351
352         * bindings/js/ScriptCallStackFactory.cpp:
353         (WebCore::createScriptCallStack):
354         * bindings/js/ScriptCallStackFactory.h:
355         * bindings/scripts/CodeGeneratorJS.pm:
356         (GenerateParametersCheck):
357         * bindings/scripts/CodeGeneratorV8.pm:
358         (GenerateFunctionCallback):
359         * bindings/scripts/test/JS/JSTestObj.cpp:
360         (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException):
361         * bindings/scripts/test/V8/V8TestObj.cpp:
362         (WebCore::TestObjInternal::customArgsAndExceptionCallback):
363         * bindings/v8/ScriptCallStackFactory.cpp:
364         (WebCore::createScriptCallStack):
365         * bindings/v8/ScriptCallStackFactory.h:
366         * inspector/InspectorInstrumentation.cpp:
367         (WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
368         * inspector/InspectorInstrumentation.h:
369         (WebCore::InspectorInstrumentation::hasFrontendForScriptContext):
370         * inspector/WorkerInspectorController.h:
371         (WebCore::WorkerInspectorController::hasFrontend):
372         * page/Console.cpp:
373         * page/Console.h:
374
375 2011-12-07  Shinya Kawanaka  <shinyak@google.com>
376
377         Internals should have a method to reutrn the max sequence number of spellcheck reqeust.
378         https://bugs.webkit.org/show_bug.cgi?id=73511
379
380         Reviewed by Hajime Morita.
381
382         Internal state of SpellChecker should be able to be exposed for testing SpellChecker.
383         This patch will enable us to know asynchronous spellcheck has finished or not.
384
385         Test: editing/spelling/spellcheck-sequencenum.html
386
387         * editing/SpellChecker.cpp:
388         (WebCore::SpellChecker::SpellChecker):
389         (WebCore::SpellChecker::createRequest):
390         (WebCore::SpellChecker::didCheck):
391         * editing/SpellChecker.h:
392         (WebCore::SpellChecker::lastRequestSequence):
393           Interface to take SpellCheck sequence numbers.
394         (WebCore::SpellChecker::lastProcessedSequence): ditto.
395         * testing/Internals.cpp:
396         (WebCore::spellchecker):
397         (WebCore::Internals::lastSpellCheckRequestSequence):
398         (WebCore::Internals::lastSpellCheckProcessedSequence):
399         * testing/Internals.h:
400         * testing/Internals.idl:
401
402 2011-12-07  Ryosuke Niwa  <rniwa@webkit.org>
403
404         TypingCommand duplicates code to obtain the last typing command
405         https://bugs.webkit.org/show_bug.cgi?id=73984
406
407         Reviewed by Kent Tamura.
408
409         Extracted lastTypingCommandIfStillOpenForTyping out of isOpenForMoreTypingCommand
410         and a bunch of TypingCommand static member functions.
411
412         Also made more member functions of TypingCommand private.
413
414         * editing/Editor.cpp:
415         (WebCore::Editor::setComposition):
416         * editing/FrameSelection.cpp:
417         (WebCore::FrameSelection::setSelection):
418         * editing/TypingCommand.cpp:
419         (WebCore::TypingCommand::deleteSelection):
420         (WebCore::TypingCommand::deleteKeyPressed):
421         (WebCore::TypingCommand::forwardDeleteKeyPressed):
422         (WebCore::TypingCommand::insertText):
423         (WebCore::TypingCommand::insertLineBreak):
424         (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
425         (WebCore::TypingCommand::insertParagraphSeparator):
426         (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
427         (WebCore::TypingCommand::closeTyping):
428         * editing/TypingCommand.h:
429         (WebCore::TypingCommand::isOpenForMoreTyping):
430         (WebCore::TypingCommand::closeTyping):
431
432 2011-12-06  Mary Wu  <mary.wu@torchmobile.com.cn>
433
434         upstream BlackBerry porting of KURL/Logging
435         https://bugs.webkit.org/show_bug.cgi?id=73524
436
437         Reviewed by Antonio Gomes.
438
439         * platform/blackberry/KURLBlackBerry.cpp: Added.
440         (WebCore::KURL::fileSystemPath):
441         * platform/blackberry/LoggingBlackBerry.cpp: Added.
442         (WebCore::initializeWithUserDefault):
443         (WebCore::InitializeLoggingChannelsIfNecessary):
444
445 2011-12-06  Leo Yang  <leo.yang@torchmobile.com.cn>
446
447         [BlackBerry] Remove redundant files in PlatformBlackBerry.cmake
448         https://bugs.webkit.org/show_bug.cgi?id=73976
449
450         Reviewed by Antonio Gomes.
451
452         The listing of the following files in PlatformBlackBerry.cmake are redundant. They should be removed.
453         platform/network/blackberry/MultipartResponseDelegate.cpp
454         platform/network/blackberry/NetworkManager.cpp
455         platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp
456         platform/network/blackberry/ResourceErrorBlackBerry.cpp
457         platform/network/blackberry/ResourceRequestBlackBerry.cpp
458
459         * PlatformBlackBerry.cmake:
460
461 2011-12-06  Shinya Kawanaka  <shinyak@google.com>
462
463         Refactoring: Editor::markAllMisspellingsAndBadGrammarInRanges should be refactored.
464         https://bugs.webkit.org/show_bug.cgi?id=73628
465
466         Reviewed by Hajime Morita.
467
468         Extracted a code for adding markers and replacing misspelled words from WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges.
469
470         No new tests. covered by existing tests.
471
472         * editing/Editor.cpp:
473         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
474           Extracted a code for adding markers and replacing missplled words, and moved to markAndReplaceFor.
475         (WebCore::Editor::markAndReplaceFor):
476         * editing/Editor.h:
477
478 2011-12-06  Julien Chaffraix  <jchaffraix@webkit.org>
479
480         Avoid calling calculateRects in RenderLayer::paintLayer when the rectangles are not needed
481         https://bugs.webkit.org/show_bug.cgi?id=73754
482
483         Reviewed by Simon Fraser.
484
485         Performance change, no change in behavior.
486
487         RenderLayer::paintLayer can easily be called a million time when scrolling on a big table with
488         td { overflow: hidden; }. We would spend a lot of time recomputing the rectangles that we never
489         unused for painting as our layer was not self-painting (clipping layer only) and we did not paint
490         some overlay scrollbars.
491
492         * rendering/RenderLayer.cpp:
493         (WebCore::RenderLayer::paintLayer):
494         Simplified and moved the shouldPaint logic earlier in the function. Now the branches
495         are checking the same boolean which makes the logic more obvious. A consequence of
496         filling shouldPaint earlier is that we call |calculateRects| only if there is a chance
497         the rectangles will used. Also cached the result of isSelfPaintingLayer() in a local
498         variable (isSelfPaintingLayer() is fairly expensive due to several virtual calls).
499
500         * rendering/RenderLayerBacking.cpp:
501         (WebCore::RenderLayerBacking::paintIntoLayer):
502         For coherency, applied the same optimizations here too: added an early return instead
503         of conditionaly call |calculateRects| as we don't have to restore any clip.
504
505 2011-12-06  Benjamin Poulain  <benjamin@webkit.org>
506
507         Simplify KURL's checkEncodedString()
508         https://bugs.webkit.org/show_bug.cgi?id=73890
509
510         Reviewed by Andreas Kling.
511
512         The Macro UNUSED_PARAM is not supposed to be used for this case,
513         use ASSERT_UNUSED instead.
514
515         * platform/KURL.cpp:
516         (WebCore::checkEncodedString):
517
518 2011-12-06  Ryosuke Niwa  <rniwa@webkit.org>
519
520         The code to create a NodeListsNodeData is duplicated everywhere
521         https://bugs.webkit.org/show_bug.cgi?id=73961
522
523         Reviewed by Darin Adler.
524
525         Extracted the logic to create NodeListsNodeData as NodeRareData::ensureNodeLists.
526
527         * dom/Document.cpp:
528         (WebCore::Document::getItems):
529         * dom/Node.cpp:
530         (WebCore::Node::childNodes):
531         (WebCore::Node::registerDynamicNodeList):
532         (WebCore::Node::getElementsByTagName):
533         (WebCore::Node::getElementsByTagNameNS):
534         (WebCore::Node::getElementsByName):
535         (WebCore::Node::getElementsByClassName):
536         * dom/NodeRareData.h:
537         (WebCore::NodeRareData::ensureNodeLists):
538         * html/HTMLFormControlElement.cpp:
539         (WebCore::HTMLFormControlElement::labels):
540
541 2011-12-06  Leo Yang  <leo.yang@torchmobile.com.cn>
542
543         Upstream about: feature in WebKit/blackberry/WebCoreSupport/
544         https://bugs.webkit.org/show_bug.cgi?id=73612
545
546         Reviewed by Antonio Gomes.
547
548         * PlatformBlackBerry.cmake: Move platform/network/blackberry/AboutData.{h, cpp}
549                                     to WebKit/blackberry/WebCoreSupport
550
551 2011-12-06  Benjamin Poulain  <bpoulain@apple.com>
552
553         WebKit Mac does not build without CONTEXT MENU
554         https://bugs.webkit.org/show_bug.cgi?id=73962
555
556         Reviewed by Pavel Feldman.
557
558         In the patch r100903, the symbols were exported under ENABLE(CONTEXT_MENUS)
559         because the feature is triggered from the menus.
560
561         The implementation has no dependency on the context menu but is necessary to build
562         when the inspector is enabled.
563         This patch moves the exported symbols from ENABLE(CONTEXT_MENUS) to ENABLE(INSPECTOR).
564
565         * WebCore.exp.in:
566
567 2011-12-06  Adrienne Walker  <enne@google.com>
568
569         [chromium] setNeedsCommit on non-composited host layers should trigger commit
570         https://bugs.webkit.org/show_bug.cgi?id=73711
571
572         Reviewed by James Robinson.
573
574         Pipe non-composited content host syncs to setNeedsCommit.
575
576         Since now the NonCompositedContentHost generates setNeedsCommit, don't
577         call it unnecessarily, e.g. calling setBackgroundColor to the same
578         color each frame should not retrigger more commits.
579
580         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
581         (WebCore::GraphicsLayerChromium::setAnchorPoint):
582         (WebCore::GraphicsLayerChromium::setTransform):
583         (WebCore::GraphicsLayerChromium::setChildrenTransform):
584         (WebCore::GraphicsLayerChromium::setMasksToBounds):
585         (WebCore::GraphicsLayerChromium::setBackgroundColor):
586         (WebCore::GraphicsLayerChromium::clearBackgroundColor):
587         (WebCore::GraphicsLayerChromium::setContentsOpaque):
588         (WebCore::GraphicsLayerChromium::setBackfaceVisibility):
589         (WebCore::GraphicsLayerChromium::setOpacity):
590         * platform/graphics/chromium/LayerChromium.cpp:
591         (WebCore::LayerChromium::setNeedsCommit):
592         (WebCore::LayerChromium::setAnchorPoint):
593         (WebCore::LayerChromium::setAnchorPointZ):
594         (WebCore::LayerChromium::setBackgroundColor):
595         (WebCore::LayerChromium::setMasksToBounds):
596         (WebCore::LayerChromium::setMaskLayer):
597         (WebCore::LayerChromium::setOpacity):
598         (WebCore::LayerChromium::setOpaque):
599         (WebCore::LayerChromium::setPosition):
600         (WebCore::LayerChromium::setSublayerTransform):
601         (WebCore::LayerChromium::setTransform):
602         (WebCore::LayerChromium::setScrollPosition):
603         (WebCore::LayerChromium::setScrollable):
604         (WebCore::LayerChromium::setDoubleSided):
605         * platform/graphics/chromium/LayerChromium.h:
606         (WebCore::LayerChromium::setReplicaLayer):
607         * platform/graphics/chromium/NonCompositedContentHost.cpp:
608         (WebCore::NonCompositedContentHost::notifySyncRequired):
609         * platform/graphics/chromium/NonCompositedContentHost.h:
610
611 2011-12-06  Kenichi Ishibashi  <bashi@chromium.org>
612
613         [Chromium] unknown characters symbol on \n in complex script text (RTL and LTR)
614         https://bugs.webkit.org/show_bug.cgi?id=73806
615
616         Reviewed by Tony Chang.
617
618         Sets fMergeNeutralItems to 1 instead of merging script items based on their tags.
619
620         Tests: platform/chromium/fast/text/international/chromium-complex-text-non-printable-expected.html
621                platform/chromium/fast/text/international/chromium-complex-text-non-printable.html
622
623         * platform/graphics/chromium/UniscribeHelper.cpp:
624         (WebCore::UniscribeHelper::fillRuns): Removed a block which merges script items.
625
626 2011-12-06  Luke Macpherson   <macpherson@chromium.org>
627
628         Implement remaining border-image and webkit-maskbox-image properties in CSSStyleApplyProperty.
629         https://bugs.webkit.org/show_bug.cgi?id=73391
630
631         Reviewed by Hajime Morita.
632
633         No new tests / refacoring only.
634
635         * css/CSSStyleApplyProperty.cpp:
636         (WebCore::ApplyPropertyBorderImageModifier::getValue):
637         (WebCore::ApplyPropertyBorderImageModifier::setValue):
638         (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue):
639         (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue):
640         (WebCore::ApplyPropertyBorderImageModifier::applyValue):
641         (WebCore::ApplyPropertyBorderImageModifier::createHandler):
642         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
643         * css/CSSStyleSelector.cpp:
644         (WebCore::CSSStyleSelector::applyProperty):
645         * css/CSSStyleSelector.h:
646
647 2011-12-06  Pavel Feldman  <pfeldman@google.com>
648
649         Web Inspector: introduce a memory agent stub.
650         https://bugs.webkit.org/show_bug.cgi?id=73930
651
652         Reviewed by Timothy Hatcher.
653
654         We'd like to experiment with the memory stats and hence need a
655         nice home for that. Adding this undocumented agent / domain for now.
656
657         * CMakeLists.txt:
658         * GNUmakefile.list.am:
659         * Target.pri:
660         * WebCore.gypi:
661         * WebCore.vcproj/WebCore.vcproj:
662         * WebCore.xcodeproj/project.pbxproj:
663         * bindings/js/ScriptProfiler.h:
664         (WebCore::ScriptProfiler::nodeCount):
665         * bindings/v8/ScriptProfiler.cpp:
666         (WebCore::ScriptProfiler::nodeCount):
667         * bindings/v8/ScriptProfiler.h:
668         * inspector/Inspector.json:
669         * inspector/InspectorController.cpp:
670         (WebCore::InspectorController::InspectorController):
671         * inspector/InspectorMemoryAgent.cpp: Added.
672         (WebCore::InspectorMemoryAgent::~InspectorMemoryAgent):
673         (WebCore::InspectorMemoryAgent::getNodeCounter):
674         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
675         * inspector/InspectorMemoryAgent.h: Added.
676         (WebCore::InspectorMemoryAgent::create):
677
678 2011-12-06  Julien Chaffraix  <jchaffraix@webkit.org>
679
680         Unreviewed build fix after 102183.
681
682         * rendering/style/RenderStyle.h:
683         (WebCore::InheritedFlags::initialGridTrackValue):
684         Use DEFINE_STATIC_LOCAL to avoid having an exit-time destructor.
685
686 2011-12-06  Julien Chaffraix  <jchaffraix@webkit.org>
687
688         Inline RenderObject::view()
689         https://bugs.webkit.org/show_bug.cgi?id=73733
690
691         Reviewed by Darin Adler.
692
693         Micro-performance optimization, no change in behavior.
694
695         RenderObject::view() is super hot and is taking ~4-5% of the time in some
696         benchmarks as it is called several hundred thousands times. For some reason,
697         the compiler did not inline it even though it is very simple in release builds.
698
699         * WebCore.exp.in: Removed RenderObject::view() as it is inlined now.
700
701         * rendering/RenderObject.cpp: Moved the implementation from here ...
702         * rendering/RenderView.h:
703         (WebCore::RenderObject::view): ... to here to avoid a cyclic
704         dependency between RenderObject and RenderView. Also marked the
705         function as ALWAYS_INLINE.
706
707         * rendering/RenderObject.h:
708         * rendering/svg/RenderSVGResourceContainer.cpp:
709         Added #include "RenderView.h" as the code checks for view() during repaint.
710
711 2011-12-06  Julien Chaffraix  <jchaffraix@webkit.org>
712
713         CSS Grid Layout: Add support for parsing multiple grid-columns or grid-rows
714         https://bugs.webkit.org/show_bug.cgi?id=73272
715
716         Reviewed by Tony Chang.
717
718         Test: fast/css-grid-layout/grid-columns-rows-get-set-multiple.html
719
720         Updated our supported syntax to match the following:
721         <track-list> := [ <track-breadth> ]+ | 'none'
722         <track-breadth> := <length> | <percentage> | 'auto'
723         (the naming loosely matches the specification)
724
725         * css/CSSComputedStyleDeclaration.cpp:
726         (WebCore::valueForGridTrackBreadth): Added function to handle a breadth
727         (extended with 'auto' that the spec puts in <track-minmax>).
728
729         (WebCore::valueForGridTrackList): Create a space seperated list of
730         track breadth or none.
731
732         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Updated
733         to use the new functions.
734
735         * css/CSSParser.cpp:
736         (WebCore::CSSParser::parseGridTrackList): Extended the function to
737         match the new syntax.
738
739         * css/CSSStyleApplyProperty.cpp:
740         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Removed our
741         simple implementation. Replaced by the CSSStyleSelector functions.
742
743         * css/CSSStyleSelector.cpp:
744         (WebCore::createGridTrackBreadth):
745         (WebCore::createGridTrackList):
746         Added those 2 functions to convert the CSSPrimitiveValue to a Vector
747         as expected by RenderStyle.
748
749         (WebCore::CSSStyleSelector::applyProperty): Added our 2 properties
750         now that it is not handled by CSSStyleApplyProperty.
751
752         * rendering/style/RenderStyle.h:
753         (WebCore::InheritedFlags::gridColumns):
754         (WebCore::InheritedFlags::gridRows):
755         (WebCore::InheritedFlags::setGridColumns):
756         (WebCore::InheritedFlags::setGridRows):
757         (WebCore::InheritedFlags::initialGridColumns):
758         (WebCore::InheritedFlags::initialGridRows):
759         Updated the previous methods to take a Vector of Length.
760
761         (WebCore::InheritedFlags::initialGridTrackValue):
762         Needed function to return a Vector with one 'none' Length (the initial
763         value per the specification).
764
765         * rendering/style/StyleGridData.h: Updated to use a Vector.
766
767 2011-12-06  David Reveman  <reveman@chromium.org>
768
769         [Chromium] Implement tile-sized painting using SkPicture.
770         https://bugs.webkit.org/show_bug.cgi?id=71869
771
772         Reviewed by James Robinson.
773
774         Add texture uploader that paints tile-sized chunks using SkPicture
775         recording and playback. Expose setting which allows this texture
776         updater to be enabled.
777
778         No new tests. Covered by existing tests.
779
780         * WebCore.gypi:
781         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: Added.
782         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture):
783         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::prepareRect):
784         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::updateRect):
785         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::create):
786         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::BitmapSkPictureCanvasLayerTextureUpdater):
787         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::~BitmapSkPictureCanvasLayerTextureUpdater):
788         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::createTexture):
789         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::sampledTexelFormat):
790         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::prepareToUpdate):
791         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::paintContentsRect):
792         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::updateTextureRect):
793         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: Added.
794         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::textureUpdater):
795         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::orientation):
796         * platform/graphics/chromium/ContentLayerChromium.cpp:
797         (WebCore::ContentLayerChromium::createTextureUpdater):
798         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
799         (WebCore::CCSettings::CCSettings):
800
801 2011-12-06  Adrienne Walker  <enne@google.com>
802
803         [chromium] Don't crash if tile upload happens without painting first
804         https://bugs.webkit.org/show_bug.cgi?id=73939
805
806         Reviewed by James Robinson.
807
808         Remove at least one place (in ImageLayerChromium) where this could
809         happen.
810
811         Although this shouldn't happen, we should be robust to it in the
812         chance that other code causes it to.
813
814         * platform/graphics/chromium/ImageLayerChromium.cpp:
815         (WebCore::ImageLayerChromium::paintContentsIfDirty):
816         * platform/graphics/chromium/TiledLayerChromium.cpp:
817         (WebCore::TiledLayerChromium::updateCompositorResources):
818
819 2011-12-06  Ruben  <chromium@hybridsource.org>
820
821         Enable web audio by default on non-Mac POSIX platforms
822         https://bugs.webkit.org/show_bug.cgi?id=73491
823
824         Reviewed by Tony Chang.
825
826         No new tests, just changing gyp includes.
827
828         * WebCore.gyp/WebCore.gyp:
829
830 2011-12-06  Benjamin Poulain  <benjamin@webkit.org>
831
832         Put length in its own variable in KURL copyASCII
833         https://bugs.webkit.org/show_bug.cgi?id=73928
834
835         Reviewed by Darin Adler.
836
837         * platform/KURL.cpp:
838         (WebCore::copyASCII):
839
840 2011-12-06  Dana Jansens  <danakj@chromium.org>
841
842         [chromium] Set opaque flag for ImageLayerChromium
843         https://bugs.webkit.org/show_bug.cgi?id=72964
844
845         Reviewed by James Robinson.
846
847         Unit test in tests/ImageLayerChromiumTest.cpp.
848
849         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
850         (WebCore::GraphicsLayerChromium::setContentsToImage):
851         * platform/graphics/chromium/GraphicsLayerChromium.h:
852         (WebCore::GraphicsLayerChromium::contentsLayer):
853         * platform/graphics/chromium/ImageLayerChromium.cpp:
854         (WebCore::ImageLayerChromium::setContents):
855
856 2011-12-06  Alexandre Elias  <aelias@google.com>
857
858         [chromium] Apply sent deltas on finishCommit
859         https://bugs.webkit.org/show_bug.cgi?id=73884
860
861         Reviewed by James Robinson.
862
863         This moves scroll and pageScale "sent" deltas to be applied to
864         the layer at the end of the commit, instead of the beginning.
865
866         This has several advantages, especially for page scale:
867         - When pageScale changes, no longer any need to change the scroll's
868         coordinate space at beginning of commit, which is complex and prone to
869         bugs (this fixes a problem where we were forgetting to modify the
870         scrollPosition before).
871         - No need for non-commit-related code to consider the "sent" values.
872         m_pageScale is now always the content scale factor, and
873         m_pageScaleDelta is the scale to be on the impl-side matrix.
874         - This will make it easy to send arbitrary fake or future delta
875         values for example while pinch zooming out.
876
877         The scroll logic is similarly altered for consistency's sake.  Note that
878         I also moved the tree synchronize to the beginning of finishCommit
879         in order to avoid having to change the pageScale coordinate space of
880         sentScrollDelta in adjustScrollsForPageScaleChange().
881
882         No new tests. (Refactoring of existing code.)
883
884         * platform/graphics/chromium/LayerChromium.cpp:
885         (WebCore::LayerChromium::pushPropertiesTo):
886         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
887         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
888         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
889         (WebCore::CCLayerTreeHostImpl::setPageScaleFactorAndLimits):
890         (WebCore::CCLayerTreeHostImpl::applyPageScaleDeltaToScrollLayer):
891         (WebCore::CCLayerTreeHostImpl::processScrollDeltas):
892
893 2011-12-06  Gavin Barraclough  <barraclough@apple.com>
894
895         https://bugs.webkit.org/show_bug.cgi?id=68328
896         The generator and intrinsic fields in HashTableValue/HashEntry and associated structures and methods are redundant
897
898         Reviewed by Geoff Garen.
899
900         Intrinsic is no longer in the DFG namespace, is always in the
901         hash table. Removed ThunkGenerator.
902
903         * bindings/scripts/CodeGeneratorJS.pm:
904         (GenerateHashTable):
905
906 2011-12-06  Dimitri Glazkov  <dglazkov@chromium.org>
907
908         Unreviewed, rolling out r102091.
909         http://trac.webkit.org/changeset/102091
910         https://bugs.webkit.org/show_bug.cgi?id=73711
911
912         Caused Clang Linux compile failure.
913
914         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
915         (WebCore::GraphicsLayerChromium::setAnchorPoint):
916         (WebCore::GraphicsLayerChromium::setTransform):
917         (WebCore::GraphicsLayerChromium::setChildrenTransform):
918         (WebCore::GraphicsLayerChromium::setMasksToBounds):
919         (WebCore::GraphicsLayerChromium::setBackgroundColor):
920         (WebCore::GraphicsLayerChromium::clearBackgroundColor):
921         (WebCore::GraphicsLayerChromium::setContentsOpaque):
922         (WebCore::GraphicsLayerChromium::setBackfaceVisibility):
923         (WebCore::GraphicsLayerChromium::setOpacity):
924         * platform/graphics/chromium/LayerChromium.cpp:
925         (WebCore::LayerChromium::setNeedsCommit):
926         * platform/graphics/chromium/LayerChromium.h:
927         (WebCore::LayerChromium::setAnchorPoint):
928         (WebCore::LayerChromium::setAnchorPointZ):
929         (WebCore::LayerChromium::setBackgroundColor):
930         (WebCore::LayerChromium::setMasksToBounds):
931         (WebCore::LayerChromium::setMaskLayer):
932         (WebCore::LayerChromium::setOpacity):
933         (WebCore::LayerChromium::setOpaque):
934         (WebCore::LayerChromium::setPosition):
935         (WebCore::LayerChromium::setSublayerTransform):
936         (WebCore::LayerChromium::setTransform):
937         (WebCore::LayerChromium::setScrollPosition):
938         (WebCore::LayerChromium::setScrollable):
939         (WebCore::LayerChromium::setDoubleSided):
940         (WebCore::LayerChromium::setReplicaLayer):
941         * platform/graphics/chromium/NonCompositedContentHost.cpp:
942         (WebCore::NonCompositedContentHost::notifySyncRequired):
943         * platform/graphics/chromium/NonCompositedContentHost.h:
944
945 2011-12-06  Dana Jansens  <danakj@chromium.org>
946
947         [Chromium] Make root layer always opaque
948         https://bugs.webkit.org/show_bug.cgi?id=70564
949
950         Reviewed by James Robinson.
951
952         * platform/graphics/chromium/NonCompositedContentHost.cpp:
953         (WebCore::NonCompositedContentHost::NonCompositedContentHost):
954         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
955         (WebCore::CCTiledLayerImpl::draw):
956
957 2011-12-06  Noel Gordon  <noel.gordon@gmail.com>
958
959         WebPImageDecoder computes image width and height multiple times
960         https://bugs.webkit.org/show_bug.cgi?id=73796
961
962         Reviewed by Adam Barth.
963
964         Once sufficient image data arrives, we can compute the decoded image height
965         and width from the WEBP image header data.
966
967         From then on, the decoded image size is known so there's no need to re-read
968         it from the WEBP image header again.
969
970         No change in behavior, so no new tests.
971
972         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
973         (WebCore::WEBPImageDecoder::decode):
974
975 2011-12-06  Mike Reed  <reed@google.com>
976
977         optimize TransformationMatrix::scale by not calling through to generic multiply
978         https://bugs.webkit.org/show_bug.cgi?id=73830
979
980         Reviewed by Kenneth Russell.
981
982         No new tests. Optimization only, existing tests exercise the code
983
984         * platform/graphics/transforms/TransformationMatrix.cpp:
985         (WebCore::TransformationMatrix::scaleNonUniform):
986         (WebCore::TransformationMatrix::scale3d):
987
988 2011-12-06  Eric Carlson  <eric.carlson@apple.com>
989
990         Revert WebCore track Settings changes made in r101977
991         https://bugs.webkit.org/show_bug.cgi?id=73879
992
993         Reviewed by Sam Weinig.
994
995         No new tests yet, still nothing to test.
996
997         * page/Settings.cpp: Move the preference setters back into the .h file.
998         * page/Settings.h:
999         (WebCore::Settings::setShouldDisplaySubtitles):
1000         (WebCore::Settings::setShouldDisplayCaptions):
1001         (WebCore::Settings::setShouldDisplayTextDescriptions):
1002
1003 2011-12-06  Andreas Kling  <kling@webkit.org>
1004
1005         MediaList: Remove constructor that takes a CSSImportRule*.
1006         <http://webkit.org/b/73833>
1007
1008         Reviewed by Antti Koivisto.
1009
1010         * css/MediaList.h:
1011         * css/MediaList.cpp:
1012
1013             Remove MediaList(CSSImportRule*, ...) constructor.
1014
1015         * css/CSSImportRule.cpp:
1016         (WebCore::CSSImportRule::CSSImportRule):
1017
1018             Have CSSImportRule construct its MediaList by passing the parent
1019             style sheet, which is exactly what the old constructor accomplished.
1020             Also assert that we're always created with a non-null parent sheet.
1021
1022 2011-12-06  Jarred Nicholls  <jarred@sencha.com>
1023
1024         getComputedStyle returns wrong value for margin-*
1025         https://bugs.webkit.org/show_bug.cgi?id=73334
1026
1027         margin-* getComputedStyle values should return the "used" absolute value when there is a renderer
1028         and the specified value is relative (percentage, auto, etc.).
1029         When there is no renderer, the specified value should be returned.
1030         See http://dev.w3.org/csswg/cssom/#resolved-values.
1031
1032         Reviewed by Darin Adler.
1033
1034         Test: fast/css/getComputedStyle/getComputedStyle-resolved-values.html
1035
1036         * css/CSSComputedStyleDeclaration.cpp:
1037         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1038
1039 2011-12-06  Alexey Proskuryakov  <ap@apple.com>
1040
1041         REGRESSION (WebKit2): Kill ring is not cleared when selection changes
1042         https://bugs.webkit.org/show_bug.cgi?id=73888
1043         <rdar://problem/10532310>
1044
1045         Reviewed by Mark Rowe.
1046
1047         Test: editing/pasteboard/emacs-ctrl-k-with-move.html
1048
1049         * editing/Editor.cpp: (WebCore::Editor::respondToChangedSelection): Moved the code to clear
1050         kill ring from Mac WebKit, as it's needed in all Mac ports at least.
1051
1052 2011-12-06  Darin Adler  <darin@apple.com>
1053
1054         Use HashMap<OwnPtr> in CollectionCache
1055         https://bugs.webkit.org/show_bug.cgi?id=73784
1056
1057         Reviewed by Andreas Kling.
1058
1059         * html/CollectionCache.cpp:
1060         (WebCore::CollectionCache::copyCacheMap): Use adoptPtr.
1061         (WebCore::CollectionCache::reset): Removed now-unneeded calls to deleteAllValues.
1062         (WebCore::append): Added. Helper function for appending elements to the maps from
1063         the collection cache.
1064
1065         * html/CollectionCache.h: Changed mapped type in NodeCacheMap to OwnPtr.
1066         Added append function.
1067
1068         * html/HTMLCollection.cpp:
1069         (WebCore::nameShouldBeVisibleInDocumentAll): Added, to factor out common code in
1070         two functions below.
1071         (WebCore::HTMLCollection::checkForNameMatch): Changed to call nameShouldBeVisibleInDocumentAll.
1072         (WebCore::HTMLCollection::updateNameCache): Ditto. Also updated cache code to use the append
1073         function, so it will work with OwnPtr. Also eliminated an unneeded get call before
1074         each hash table add; we do both at once in the new append function.
1075         * html/HTMLFormCollection.cpp:
1076         (WebCore::HTMLFormCollection::updateNameCache): More of the same.
1077
1078 2011-12-06  Yury Semikhatsky  <yurys@chromium.org>
1079
1080         [Chromium] Web Inspector: getFunctionLocation should return scriptId as String not as int
1081         https://bugs.webkit.org/show_bug.cgi?id=73892
1082
1083         Reviewed by Pavel Feldman.
1084
1085         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1086         (WebCore::V8InjectedScriptHost::functionLocationCallback): scriptId should be a string not a number
1087         * inspector/Inspector.json: removed unused parameter
1088
1089 2011-11-21  Balazs Kelemen  <kbalazs@webkit.org>
1090
1091         Enable ParallelJobs by default
1092         https://bugs.webkit.org/show_bug.cgi?id=70032
1093
1094         Reviewed by Zoltan Herczeg.
1095
1096         Covered by existing tests.
1097
1098         According to measurements on Mac and Linux it is a
1099         considerable speedup for SVG on multicore.
1100
1101         Remove the ENABLE(PARALLEL_JOBS) guard. Fix the Windows build
1102         by qualifying ParallelJobs with the WTF namespace (otherwise
1103         MSVC believes it belongs to WebCore which is likely a compiler bug).
1104
1105         * platform/graphics/filters/FEConvolveMatrix.cpp:
1106         (WebCore::FEConvolveMatrix::setInteriorPixelsWorker):
1107         (WebCore::FEConvolveMatrix::platformApplySoftware):
1108         * platform/graphics/filters/FEConvolveMatrix.h:
1109         * platform/graphics/filters/FEGaussianBlur.cpp:
1110         (WebCore::FEGaussianBlur::platformApplyWorker):
1111         (WebCore::FEGaussianBlur::platformApply):
1112         * platform/graphics/filters/FEGaussianBlur.h:
1113         * platform/graphics/filters/FELighting.cpp:
1114         (WebCore::FELighting::platformApplyGenericWorker):
1115         (WebCore::FELighting::platformApplyGeneric):
1116         * platform/graphics/filters/FELighting.h:
1117         * platform/graphics/filters/FEMorphology.cpp:
1118         (WebCore::FEMorphology::platformApplyWorker):
1119         (WebCore::FEMorphology::platformApply):
1120         * platform/graphics/filters/FEMorphology.h:
1121         * platform/graphics/filters/FETurbulence.cpp:
1122         (WebCore::FETurbulence::fillRegionWorker):
1123         (WebCore::FETurbulence::platformApplySoftware):
1124         * platform/graphics/filters/FETurbulence.h:
1125         * platform/graphics/filters/arm/FELightingNEON.cpp:
1126         (WebCore::FELighting::platformApplyNeonWorker):
1127         * platform/graphics/filters/arm/FELightingNEON.h:
1128         (WebCore::FELighting::platformApplyNeon):
1129
1130 2011-12-06  Andreas Kling  <kling@webkit.org>
1131
1132         Unreviewed assertion fix for r102123.
1133
1134         * platform/KURL.cpp:
1135         (WebCore::checkEncodedString):
1136
1137 2011-12-06  Benjamin Poulain  <benjamin@webkit.org>
1138
1139         Simplify KURL's checkEncodedString()
1140         https://bugs.webkit.org/show_bug.cgi?id=73890
1141
1142         Reviewed by Andreas Kling.
1143
1144         The method was reimplementing String::containsOnlyASCII().
1145         Use the method from String and we can remove the #if NDEBUG.
1146
1147         * platform/KURL.cpp:
1148         (WebCore::checkEncodedString):
1149
1150 2011-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1151
1152         Unreviewed, rolling out r102111.
1153         http://trac.webkit.org/changeset/102111
1154         https://bugs.webkit.org/show_bug.cgi?id=73902
1155
1156         Breaks compilation (Requested by vsevik on #webkit).
1157
1158         * editing/Editor.cpp:
1159         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1160         * editing/Editor.h:
1161
1162 2011-12-06  Hajime Morrita  <morrita@chromium.org>
1163
1164         [Refactoring] Accessing Node::m_document should be minimized.
1165         https://bugs.webkit.org/show_bug.cgi?id=73800
1166
1167         Reviewed by Kent Tamura.
1168
1169         No new tests. No behavioral change.
1170
1171         Replaced m_document reference with the document() accessor
1172         or temporaril variables. This is a preparation for using
1173         m_document space to point a shadow root pointer.
1174
1175         * dom/Document.h:
1176         (WebCore::Node::Node):
1177         * dom/Node.cpp:
1178         (WebCore::Node::~Node):
1179
1180 2011-12-06  Shinya Kawanaka  <shinyak@google.com>
1181
1182         https://bugs.webkit.org/show_bug.cgi?id=73889
1183         TextCheckingParagraph::offsetTo should not have a side effect.
1184
1185         Reviewed by Hajime Morita.
1186
1187         Since TextCheckingParagraph::offsetTo had a side effect, its cache often became inconsistent.
1188         This is likely to cause a bug when changing SpellChecker and Editor.
1189
1190         No new tests. Covered by existing tests.
1191
1192         * editing/TextCheckingHelper.cpp:
1193         (WebCore::TextCheckingParagraph::offsetTo):
1194
1195 2011-12-06  Eric Penner  <epenner@google.com>
1196
1197         [chromium] Set texture limits as multiples of viewport size instead of hardcoded values
1198         https://bugs.webkit.org/show_bug.cgi?id=72202
1199
1200         Reviewed by James Robinson.
1201
1202         * platform/graphics/chromium/LayerRendererChromium.cpp: 
1203         (WebCore::LayerRendererChromium::drawLayers): added viewport param
1204         (WebCore::LayerRendererChromium::initializeSharedObjects): ditto 
1205         * platform/graphics/chromium/TextureManager.cpp: 
1206         (WebCore::TextureManager::highLimitBytes): calculated based on viewport
1207         (WebCore::TextureManager::reclaimLimitBytes): ditto
1208         (WebCore::TextureManager::lowLimitBytes): ditto
1209         (WebCore::TextureManager::TextureManager): added viewport param
1210         (WebCore::TextureManager::setMaxMemoryLimitBytes): changed name
1211         (WebCore::TextureManager::setPreferredMemoryLimitBytes): added function
1212         (WebCore::TextureManager::requestTexture): added viewport param
1213         * platform/graphics/chromium/TextureManager.h: ditto
1214         (WebCore::TextureManager::create): ditto
1215         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: ditto
1216         (WebCore::CCLayerTreeHost::initialize): ditto
1217         (WebCore::CCLayerTreeHost::beginCommitOnImplThread): ditto
1218         (WebCore::CCLayerTreeHost::setViewport): ditto
1219         (WebCore::CCLayerTreeHost::setVisible): ditto
1220         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread): ditto
1221
1222 2011-12-06  Huang Dongsung  <luxtella@company100.net>
1223
1224         [TexMap][QT] Draw the borders of media and webgl elements in TexMap.
1225         https://bugs.webkit.org/show_bug.cgi?id=73817
1226
1227         GraphicsContext3D only draws the content of the WebGL canvas, not the additional
1228         CSS such as the borders. TextureMapper should render the content of a
1229         media/webgl layer before drawing the actual canvas.
1230         This makes LayoutTests/compositing/webgl/webgl-reflection.html work.
1231
1232         Reviewed by Noam Rosenthal.
1233
1234         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1235         (WebCore::GraphicsLayerTextureMapper::setContentsNeedsDisplay):
1236         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1237         * platform/graphics/texmap/TextureMapperNode.cpp:
1238         (WebCore::TextureMapperNode::renderContent):
1239         (WebCore::TextureMapperNode::paintSelf):
1240
1241 2011-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1242
1243         Unreviewed, rolling out r102043.
1244         http://trac.webkit.org/changeset/102043
1245         https://bugs.webkit.org/show_bug.cgi?id=73898
1246
1247         Breaks chromium mac-cg compilation. (Requested by vsevik on
1248         #webkit).
1249
1250         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1251         (WebCore::GraphicsLayerChromium::setContentsToImage):
1252         * platform/graphics/chromium/GraphicsLayerChromium.h:
1253         (WebCore::GraphicsLayerChromium::contentsLayer):
1254         * platform/graphics/chromium/ImageLayerChromium.cpp:
1255         (WebCore::ImageLayerChromium::setContents):
1256
1257 2011-12-06  Shinya Kawanaka  <shinyak@google.com>
1258
1259         Refactoring: Editor::markAllMisspellingsAndBadGrammarInRanges should be refactored.
1260         https://bugs.webkit.org/show_bug.cgi?id=73628
1261
1262         Reviewed by Hajime Morita.
1263
1264         Extracted a code for adding markers and replacing misspelled words from WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges.
1265
1266         No new tests. covered by existing tests.
1267
1268         * editing/Editor.cpp:
1269         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1270           Extracted a code for adding markers and replacing missplled words, and moved to markAndReplaceFor.
1271         (WebCore::Editor::markAndReplaceFor):
1272         * editing/Editor.h:
1273
1274 2011-12-05  Alexander Pavlov  <apavlov@chromium.org>
1275
1276         Web Inspector: [Audits] Implement "Stop" button and progress bar instead of spinner.
1277         https://bugs.webkit.org/show_bug.cgi?id=73626
1278
1279         Reviewed by Yury Semikhatsky.
1280
1281         * English.lproj/localizedStrings.js:
1282         * inspector/front-end/AuditLauncherView.js:
1283         (WebInspector.AuditLauncherView):
1284         (WebInspector.AuditLauncherView.prototype._setAuditRunning):
1285         (WebInspector.AuditLauncherView.prototype._launchButtonClicked):
1286         (WebInspector.AuditLauncherView.prototype._createLauncherUI):
1287         (WebInspector.AuditLauncherView.prototype._updateResourceProgress):
1288         (WebInspector.AuditLauncherView.prototype._updateButton):
1289         * inspector/front-end/AuditRules.js:
1290         (WebInspector.AuditRules.GzipRule.prototype.doRun):
1291         (WebInspector.AuditRules.CombineExternalResourcesRule.prototype.doRun):
1292         (WebInspector.AuditRules.MinimizeDnsLookupsRule.prototype.doRun):
1293         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback):
1294         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.documentLoaded):
1295         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback):
1296         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.styleSheetCallback):
1297         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.allStylesCallback):
1298         (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
1299         (WebInspector.AuditRules.CacheControlRule.prototype.doRun):
1300         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
1301         (WebInspector.AuditRules.CssInHeadRule.prototype.doRun):
1302         (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.externalStylesheetsReceived):
1303         (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.inlineStylesReceived):
1304         (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.onDocumentAvailable):
1305         (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun):
1306         (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.cssBeforeInlineReceived):
1307         (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.lateStylesReceived):
1308         (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.onDocumentAvailable):
1309         (WebInspector.AuditRules.CookieRuleBase.prototype.doRun.resultCallback):
1310         (WebInspector.AuditRules.CookieRuleBase.prototype.doRun):
1311         * inspector/front-end/AuditsPanel.js:
1312         (WebInspector.AuditsPanel):
1313         (WebInspector.AuditsPanel.prototype._executeAudit.ruleResultReadyCallback):
1314         (WebInspector.AuditsPanel.prototype._executeAudit):
1315         (WebInspector.AuditsPanel.prototype._auditFinishedCallback):
1316         (WebInspector.AuditsPanel.prototype.terminateAudit):
1317         (WebInspector.AuditCategory.prototype.run):
1318         (WebInspector.AuditRule.prototype.run):
1319         (WebInspector.AuditRule.prototype.doRun):
1320         (WebInspector.AuditProgressMonitor):
1321         (WebInspector.AuditProgressMonitor.prototype.setTotalWork):
1322         (WebInspector.AuditProgressMonitor.prototype.worked):
1323         (WebInspector.AuditProgressMonitor.prototype.get indeterminate):
1324         (WebInspector.AuditProgressMonitor.prototype.done):
1325         (WebInspector.AuditProgressMonitor.prototype.get canceled):
1326         (WebInspector.AuditProgressMonitor.prototype.set canceled):
1327
1328 2011-12-06  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1329
1330         [Qt] [WK2] MiniBrowser assert on startup in debug build after r101713
1331         https://bugs.webkit.org/show_bug.cgi?id=73874
1332
1333         This change partially reverts r101713 restoring original behaviour for
1334         KUrl creation from empty string and fixes asserts in debug build.
1335
1336         Reviewed by Alexey Proskuryakov.
1337
1338         No new tests. Tests from r101713 pass.
1339
1340         * platform/KURL.cpp:
1341         (WebCore::KURL::init):
1342         (WebCore::KURL::parse):
1343         * platform/KURL.h:
1344
1345 2011-12-06  Andreas Kling  <kling@webkit.org>
1346
1347         Use HashMap<OwnPtr> for EventListenerMap's internal map.
1348         <http://webkit.org/b/73761>
1349
1350         Reviewed by Benjamin Poulain.
1351
1352         Changed the value type of EventListenerMap::m_hashMap to OwnPtr<EventListenerVector>.
1353         This means we no longer need to manually delete the vectors when taking them out of
1354         the map, which makes the code a little prettier.
1355
1356         A few tweaks were necessary; release() instead of leakPtr() when switching modes
1357         and adoptPtr()/get() sprinkled as needed.
1358
1359         * dom/EventListenerMap.h:
1360         * dom/EventListenerMap.cpp:
1361         (WebCore::EventListenerMap::clear):
1362         (WebCore::EventListenerMap::add):
1363         (WebCore::EventListenerMap::remove):
1364         (WebCore::EventListenerMap::find):
1365         (WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup):
1366         (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
1367
1368 2011-12-05  Rafael Weinstein  <rafaelw@chromium.org>
1369
1370         [MutationObservers] Support 'attributes' mutation records for element.removeAttribute
1371         https://bugs.webkit.org/show_bug.cgi?id=73880
1372
1373         Reviewed by Ojan Vafai.
1374
1375         * dom/Element.cpp:
1376         (WebCore::enqueueAttributesMutationRecord):
1377         (WebCore::Element::removeAttribute):
1378
1379 2011-12-05  Dana Jansens  <danakj@chromium.org>
1380
1381         Set opaque flag for WebGLLayerChromium
1382         https://bugs.webkit.org/show_bug.cgi?id=73876
1383
1384         Reviewed by James Robinson.
1385
1386         New unit test in tests/WebGLLayerChromiumTest.cpp
1387
1388         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1389         (WebCore::DrawingBuffer::platformLayer):
1390
1391 2011-12-05  Benjamin Poulain  <bpoulain@apple.com>
1392
1393         Upstream the Cursor implementation of iOS
1394         https://bugs.webkit.org/show_bug.cgi?id=73724
1395
1396         Reviewed by David Kilzer.
1397
1398         iOS does not need to support the Cursor of WebKit. For compatibility, Cursor
1399         is implemented as an empty class on the platform.
1400
1401         * Configurations/WebCore.xcconfig:
1402         * WebCore.xcodeproj/project.pbxproj:
1403         * platform/Cursor.h:
1404         (WebCore::Cursor::Cursor):
1405         * platform/ios/CursorIOS.cpp: Added.
1406         (WebCore::cursor):
1407         (WebCore::pointerCursor):
1408         (WebCore::crossCursor):
1409         (WebCore::handCursor):
1410         (WebCore::moveCursor):
1411         (WebCore::iBeamCursor):
1412         (WebCore::waitCursor):
1413         (WebCore::helpCursor):
1414         (WebCore::eastResizeCursor):
1415         (WebCore::northResizeCursor):
1416         (WebCore::northEastResizeCursor):
1417         (WebCore::northWestResizeCursor):
1418         (WebCore::southResizeCursor):
1419         (WebCore::southEastResizeCursor):
1420         (WebCore::southWestResizeCursor):
1421         (WebCore::westResizeCursor):
1422         (WebCore::northSouthResizeCursor):
1423         (WebCore::eastWestResizeCursor):
1424         (WebCore::northEastSouthWestResizeCursor):
1425         (WebCore::northWestSouthEastResizeCursor):
1426         (WebCore::columnResizeCursor):
1427         (WebCore::rowResizeCursor):
1428         (WebCore::middlePanningCursor):
1429         (WebCore::eastPanningCursor):
1430         (WebCore::northPanningCursor):
1431         (WebCore::northEastPanningCursor):
1432         (WebCore::northWestPanningCursor):
1433         (WebCore::southPanningCursor):
1434         (WebCore::southEastPanningCursor):
1435         (WebCore::southWestPanningCursor):
1436         (WebCore::westPanningCursor):
1437         (WebCore::verticalTextCursor):
1438         (WebCore::cellCursor):
1439         (WebCore::contextMenuCursor):
1440         (WebCore::noDropCursor):
1441         (WebCore::notAllowedCursor):
1442         (WebCore::progressCursor):
1443         (WebCore::aliasCursor):
1444         (WebCore::zoomInCursor):
1445         (WebCore::zoomOutCursor):
1446         (WebCore::copyCursor):
1447         (WebCore::noneCursor):
1448         (WebCore::grabCursor):
1449         (WebCore::grabbingCursor):
1450         (WebCore::determineHotSpot):
1451
1452 2011-12-05  Noel Gordon  <noel.gordon@gmail.com>
1453
1454         [GTK] GIF image test crashes on 32- and 64-bit Release
1455         https://bugs.webkit.org/show_bug.cgi?id=73812
1456
1457         Reviewed by Adam Barth.
1458
1459         Call resize() on the image pixel backing store after allocation to see if
1460         that stops the GIF image decoder animation tests crashes on GTK.
1461
1462         No new tests, covered by exiting tests ...
1463           fast/backgrounds/animated-gif-as-background.html
1464           fast/images/dont-crash-with-null-gif-frames.html
1465           fast/images/gif-loop-count.html
1466
1467         * platform/image-decoders/ImageDecoder.cpp:
1468         (WebCore::ImageFrame::setSize):
1469
1470 2011-12-05  Erik Arvidsson  <arv@chromium.org>
1471
1472         Could save a lot of memory in CharacterData by not always storing a String
1473         https://bugs.webkit.org/show_bug.cgi?id=72404
1474
1475         Reviewed by Ojan Vafai.
1476
1477         When a Text node is created by the parser we check if the string is all whitespace
1478         and if so we put it in the AtomicString table so that all future identical whitespace
1479         strings can share the StringImpl.
1480
1481         No new tests. Covered by existing tests.
1482
1483         * html/parser/HTMLConstructionSite.cpp:
1484         (WebCore::HTMLNames::isAllWhitespace):
1485         (WebCore::HTMLConstructionSite::insertTextNode):
1486
1487             If we do not know whether the string is all whitespace this now checks the string
1488             If the string is all whitespace we create an AtomicString for it.
1489
1490         * html/parser/HTMLConstructionSite.h:
1491         * html/parser/HTMLTreeBuilder.cpp:
1492         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::skipLeadingNonWhitespace): We never cared about the return value here.
1493         (WebCore::HTMLTreeBuilder::processCharacterBuffer): Pass WhitespaceMode in the case we know whether the string is all whitespace or not.
1494         (WebCore::HTMLTreeBuilder::defaultForInTableText): Ditto.
1495
1496 2011-12-05  Benjamin Poulain  <benjamin@webkit.org>
1497
1498         Update KURL's copy copyASCII to avoid String::characters()
1499         https://bugs.webkit.org/show_bug.cgi?id=73794
1500
1501         Reviewed by Andreas Kling.
1502
1503         When the String is already on 8 bits, we can simply copy the
1504         data. In the 16 bits case, everything remains the same.
1505
1506         * platform/KURL.cpp:
1507         (WebCore::copyASCII):
1508         (WebCore::appendASCII):
1509         (WebCore::KURL::init):
1510         (WebCore::KURL::parse):
1511         (WebCore::KURL::copyToBuffer):
1512
1513 2011-12-05  Yong Li  <yoli@rim.com>
1514
1515         https://bugs.webkit.org/show_bug.cgi?id=73683
1516         Implement KeyframeValueList::operator=() and KeyframeValueList::swap().
1517
1518         Reviewed by Darin Adler.
1519
1520         No new tests as no functional change.
1521
1522         * platform/graphics/GraphicsLayer.h: 
1523         (WebCore::KeyframeValueList::operator=): Added
1524         (WebCore::KeyframeValueList::swap): Added
1525
1526 2011-12-05  Adrienne Walker  <enne@google.com>
1527
1528         [chromium] setNeedsCommit on non-composited host layers should trigger commit
1529         https://bugs.webkit.org/show_bug.cgi?id=73711
1530
1531         Reviewed by James Robinson.
1532
1533         Pipe non-composited content host syncs to setNeedsCommit.
1534
1535         Since now the NonCompositedContentHost generates setNeedsCommit, don't
1536         call it unnecessarily, e.g. calling setBackgroundColor to the same
1537         color each frame should not retrigger more commits.
1538
1539         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1540         (WebCore::GraphicsLayerChromium::setAnchorPoint):
1541         (WebCore::GraphicsLayerChromium::setTransform):
1542         (WebCore::GraphicsLayerChromium::setChildrenTransform):
1543         (WebCore::GraphicsLayerChromium::setMasksToBounds):
1544         (WebCore::GraphicsLayerChromium::setBackgroundColor):
1545         (WebCore::GraphicsLayerChromium::clearBackgroundColor):
1546         (WebCore::GraphicsLayerChromium::setContentsOpaque):
1547         (WebCore::GraphicsLayerChromium::setBackfaceVisibility):
1548         (WebCore::GraphicsLayerChromium::setOpacity):
1549         * platform/graphics/chromium/LayerChromium.cpp:
1550         (WebCore::LayerChromium::setNeedsCommit):
1551         (WebCore::LayerChromium::setAnchorPoint):
1552         (WebCore::LayerChromium::setAnchorPointZ):
1553         (WebCore::LayerChromium::setBackgroundColor):
1554         (WebCore::LayerChromium::setMasksToBounds):
1555         (WebCore::LayerChromium::setMaskLayer):
1556         (WebCore::LayerChromium::setOpacity):
1557         (WebCore::LayerChromium::setOpaque):
1558         (WebCore::LayerChromium::setPosition):
1559         (WebCore::LayerChromium::setSublayerTransform):
1560         (WebCore::LayerChromium::setTransform):
1561         (WebCore::LayerChromium::setScrollPosition):
1562         (WebCore::LayerChromium::setScrollable):
1563         (WebCore::LayerChromium::setDoubleSided):
1564         * platform/graphics/chromium/LayerChromium.h:
1565         (WebCore::LayerChromium::setReplicaLayer):
1566         * platform/graphics/chromium/NonCompositedContentHost.cpp:
1567         (WebCore::NonCompositedContentHost::notifySyncRequired):
1568         * platform/graphics/chromium/NonCompositedContentHost.h:
1569
1570 2011-12-05  Tony Chang  <tony@chromium.org>
1571
1572         small refactor of RenderFlexibleBox
1573         https://bugs.webkit.org/show_bug.cgi?id=73854
1574
1575         Reviewed by Darin Adler.
1576
1577         No new tests, just a refactor.
1578
1579         * rendering/RenderFlexibleBox.cpp:
1580         (WebCore::RenderFlexibleBox::isLeftToRightFlow): Inline isReverseFlow since it's only used in one place.
1581         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Rename startEdge
1582         to mainAxisOffset.  Rename logicalTop to crossAxisOffset.  Get rid of
1583         logicalLeft local variable since it's confusing.  Move shouldFlipMainAxis
1584         out of the for loop to avoid computing it each iteration.
1585         * rendering/RenderFlexibleBox.h:
1586
1587 2011-12-05  Florin Malita  <fmalita@google.com>
1588
1589         Heap-buffer-overflow in WebCore::HTMLTreeBuilder::processEndTag
1590         https://bugs.webkit.org/show_bug.cgi?id=73765
1591
1592         Reviewed by Adam Barth.
1593
1594         Test: fast/parser/foreign-content-crash.html
1595
1596         Use m_tree.currentNode() instead of m_tree.currentElement() as the top node is not always an Element.
1597
1598         * html/parser/HTMLTreeBuilder.cpp:
1599         (WebCore::HTMLTreeBuilder::processEndTag):
1600
1601 2011-12-05  Stephen White  <senorblanco@chromium.org>
1602
1603         Allow the ImageBuffers used by SVG filters to be accelerated
1604         https://bugs.webkit.org/show_bug.cgi?id=73842
1605
1606         Reviewed by Kenneth Russell.
1607
1608         Regressions covered by existing SVG tests; new functionality to be
1609         tested by the API exposed on Internals.
1610
1611         * page/Settings.cpp:
1612         (WebCore::Settings::Settings):
1613         * page/Settings.h:
1614         (WebCore::Settings::setAcceleratedFiltersEnabled):
1615         (WebCore::Settings::acceleratedFiltersEnabled):
1616         * platform/graphics/filters/FETile.cpp:
1617         (WebCore::FETile::platformApplySoftware):
1618         * platform/graphics/filters/Filter.h:
1619         (WebCore::Filter::Filter):
1620         (WebCore::Filter::renderingMode):
1621         (WebCore::Filter::setRenderingMode):
1622         * platform/graphics/filters/FilterEffect.cpp:
1623         (WebCore::FilterEffect::asImageBuffer):
1624         (WebCore::FilterEffect::createImageBufferResult):
1625         * platform/graphics/skia/ImageBufferSkia.cpp:
1626         (WebCore::ImageBuffer::platformTransformColorSpace):
1627         * rendering/svg/RenderSVGResourceClipper.cpp:
1628         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1629         * rendering/svg/RenderSVGResourceFilter.cpp:
1630         (WebCore::RenderSVGResourceFilter::applyResource):
1631         * rendering/svg/RenderSVGResourceMasker.cpp:
1632         (WebCore::RenderSVGResourceMasker::applyResource):
1633         * rendering/svg/RenderSVGResourcePattern.cpp:
1634         (WebCore::RenderSVGResourcePattern::createTileImage):
1635         * rendering/svg/SVGImageBufferTools.cpp:
1636         (WebCore::SVGImageBufferTools::createImageBuffer):
1637         * rendering/svg/SVGImageBufferTools.h:
1638         * testing/Internals.cpp:
1639         (WebCore::Internals::setAcceleratedFiltersEnabled):
1640         * testing/Internals.h:
1641         * testing/Internals.idl:
1642
1643 2011-12-05  Benjamin Poulain  <bpoulain@apple.com>
1644
1645         Upstream htmlSelectMultipleItems needed for <select multiple> by iOS
1646         https://bugs.webkit.org/show_bug.cgi?id=73734
1647
1648         Reviewed by David Kilzer.
1649
1650         * platform/DefaultLocalizationStrategy.cpp:
1651         (WebCore::DefaultLocalizationStrategy::htmlSelectMultipleItems):
1652         * platform/DefaultLocalizationStrategy.h:
1653
1654 2011-12-05  Darin Adler  <darin@apple.com>
1655
1656         Use HashMap<OwnPtr> in CrossOriginPreflightResultCache
1657         https://bugs.webkit.org/show_bug.cgi?id=73785
1658
1659         Reviewed by Andreas Kling.
1660
1661         * loader/CrossOriginPreflightResultCache.cpp:
1662         (WebCore::CrossOriginPreflightResultCache::appendEntry): Changed code to use set
1663         instead of add, since it wants to replace existing entries. Also removed leakPtr
1664         and removed the FIXME that documented the memory leak now fixed here.
1665         (WebCore::CrossOriginPreflightResultCache::canSkipPreflight): Removed unneeded
1666         std:: prefix here and also unneeded explicit delete call.
1667         (WebCore::CrossOriginPreflightResultCache::empty): Removed unneeded deleteAllValues
1668         call here.
1669
1670         * loader/CrossOriginPreflightResultCache.h: Make mapped value of the
1671         CrossOriginPreflightResultHashMap be OwnPtr instead of raw pointer.
1672
1673 2011-12-05  Darin Adler  <darin@apple.com>
1674
1675         Some small improvements to ContainerNode.h
1676         https://bugs.webkit.org/show_bug.cgi?id=73786
1677
1678         Reviewed by Alexey Proskuryakov.
1679
1680         * dom/ContainerNode.cpp:
1681         (WebCore::ContainerNode::suspendPostAttachCallbacks): Added a FIXME comment about the
1682         peculiar behavior of this function. Somehow the post-attach suspend state is both
1683         global and specific to a certain Page object. That can't be right. If it was truly
1684         global then this would be a static member function. If it was truly per-page, then
1685         the related functions could not be static.
1686
1687         * dom/ContainerNode.h: Removed some unneeded argument names. Moved the hasChildNodes
1688         function up with the other basic getters. Put the other getters, childNodeCount and
1689         childNode, right after the basic getters. Used ASSERT_NO_EXCEPTION in all the basic
1690         mutation functions so they can be used in a cleaner fashion in C++ code where we have
1691         some reason to know an exception won't occur. Grouped all the overrides of functions
1692         from Node into a single paragraph and used the OVERRIDE macro on all of them. Made the
1693         queuePostAttachCallback and postAttachCallbacksAreSuspended functions protected.
1694
1695         * dom/Element.h: Moved the include of ExceptionCodePlaceholder.h into ContainerNode.h.
1696
1697         * dom/Node.cpp:
1698         (WebCore::Node::lazyAttach): Use hasChildNodes instead of firstChild for clarity.
1699         (WebCore::Node::isDescendantOf): Ditto.
1700
1701 2011-12-05  Benjamin Poulain  <benjamin@webkit.org>
1702
1703         Get rid of KURL::KURL(ParsedURLStringTag, const char*);
1704         https://bugs.webkit.org/show_bug.cgi?id=73792
1705
1706         Reviewed by Andreas Kling.
1707
1708         In all cases where the constructor is used, the constructor
1709         taking a String is as effective because the string is valid and converted
1710         to String for m_string.
1711
1712         This patch remove the constructor KURL::KURL(ParsedURLStringTag, const char*)
1713         and change the call sites that were using that constructor to build
1714         empty URLs.
1715
1716         * dom/Document.cpp:
1717         (WebCore::Document::initSecurityContext):
1718         * loader/FrameLoader.cpp:
1719         (WebCore::FrameLoader::init):
1720         * loader/archive/cf/LegacyWebArchive.cpp:
1721         (WebCore::LegacyWebArchive::create):
1722         * page/DOMWindow.cpp:
1723         (WebCore::DOMWindow::createWindow):
1724         * platform/KURL.cpp:
1725         * platform/KURL.h:
1726         * platform/KURLGoogle.cpp:
1727
1728 2011-12-05  Benjamin Poulain  <benjamin@webkit.org>
1729
1730         Remove methods declared but never implemented with GOOGLEURL
1731         https://bugs.webkit.org/show_bug.cgi?id=73795
1732
1733         Reviewed by Adam Barth.
1734
1735         * platform/KURL.h:
1736
1737 2011-12-05  Darin Adler  <darin@apple.com>
1738
1739         Change CSSFontSelector to use HashMap<OwnPtr>
1740         https://bugs.webkit.org/show_bug.cgi?id=73781
1741
1742         Reviewed by Dan Bernstein.
1743
1744         * css/CSSFontSelector.cpp:
1745         (WebCore::CSSFontSelector::~CSSFontSelector): Removed calls to deleteAllValues.
1746         (WebCore::CSSFontSelector::addFontFaceRule): Updated to use OwnPtr instead of raw
1747         pointer for the entry in m_fontFaces and m_locallyInstalledFontFaces.
1748         (WebCore::CSSFontSelector::getFontData): Updated to use OwnPtr instead of raw
1749         pointer for the entry in m_fonts. Also removed an unneeded std:: prefix.
1750
1751         * css/CSSFontSelector.h: Made m_fontFaces, m_locallyInstalledFontFaces, and m_fonts
1752         be HashMap<OwnPtr>.
1753
1754 2011-12-05  Adam Klein  <adamk@chromium.org>
1755
1756         V8RecursionScope should call didLeaveScriptContext when recursionLevel reaches zero
1757         https://bugs.webkit.org/show_bug.cgi?id=73867
1758
1759         Reviewed by Adam Barth.
1760
1761         Moved V8RecursionScope into its own file, and moved
1762         V8Proxy::didLeaveScriptContext into that file, along with a static
1763         recursionLevel accessor, hiding the V8BindingPerIsolateData methods
1764         from V8Proxy.
1765
1766         This will make it easy and less error-prone to use V8RecursionScope
1767         properly. I plan to make use of it in V8LazyEventListener to fix
1768         https://bugs.webkit.org/show_bug.cgi?id=73492.
1769
1770         No new tests, refactoring only.
1771
1772         * Target.pri:
1773         * UseV8.cmake:
1774         * WebCore.gypi:
1775         * bindings/v8/V8Binding.h:
1776         (WebCore::V8BindingPerIsolateData::incrementRecursionLevel): return the new recursion level.
1777         (WebCore::V8BindingPerIsolateData::decrementRecursionLevel): return the new recursion level.
1778         * bindings/v8/V8Proxy.cpp: remove didLeaveScriptContext.
1779         (WebCore::V8Proxy::runScript): remove explicit call to didLeaveScriptContext.
1780         (WebCore::V8Proxy::instrumentedCallFunction): remove explicit call to didLeaveScriptContext.
1781         * bindings/v8/V8Proxy.h: remove didLeaveScriptContext.
1782         * bindings/v8/V8RecursionScope.cpp: Added.
1783         (WebCore::V8RecursionScope::didLeaveScriptContext): copied from V8Proxy.cpp.
1784         * bindings/v8/V8RecursionScope.h: Added.
1785         (WebCore::V8RecursionScope::V8RecursionScope):
1786         (WebCore::V8RecursionScope::~V8RecursionScope):
1787         (WebCore::V8RecursionScope::recursionLevel):
1788
1789 2011-12-05  Benjamin Poulain  <bpoulain@apple.com>
1790
1791         Build fix for SecurityOrigin.cpp when neither BLOB nor FILE_SYSTEM are defined
1792
1793         Reviewed by David Kilzer.
1794
1795         When neither BLOB nor FILE_SYSTEM are defined, the parameter is unused.
1796
1797         * page/SecurityOrigin.cpp:
1798         (WebCore::shouldUseInnerURL):
1799
1800 2011-12-05  Darin Adler  <darin@apple.com>
1801
1802         Change RuleSet to use HashMap<OwnPtr>
1803         https://bugs.webkit.org/show_bug.cgi?id=73783
1804
1805         Reviewed by Andreas Kling.
1806
1807         * css/CSSStyleSelector.cpp: Make RuleSet::AtomRuleMap use OwnPtr for the mapped values.
1808         (WebCore::RuleSet::addToRuleSet): Use add instead of get/set to set up a new entry in the
1809         map or find the old entry in the map.
1810
1811 2011-12-05  Mario Sanchez Prada  <msanchez@igalia.com>
1812
1813         [GTK] Move emissions of AtkDocument signals down to WebCore
1814         https://bugs.webkit.org/show_bug.cgi?id=73750
1815
1816         Reviewed by Chris Fleizach.
1817
1818         Implement the needed infrastructure to allow notifying
1819         accessibility, in a cross-platform way, when a event related to
1820         the load of a document happens. Added a generic method, which will
1821         be called from the FrameLoader, and platform specific versions of
1822         it so every port has a chance to decide what to do with those
1823         notifications.
1824
1825         This patch doesn't include a new test because the one testing this
1826         functionality is the GTK-specific unit test added along with patch
1827         for bug 73746: testWebkitAtkDocumentLoadingEvents.
1828
1829         * accessibility/AXObjectCache.h:
1830         (WebCore::AXObjectCache::frameLoadingEventNotification): New, called
1831         from the FrameLoader to notify accessibility when an event happens.
1832         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification): New,
1833         platform specific function to let ports decide what to do.
1834         * accessibility/AXObjectCache.cpp:
1835         (WebCore::AXObjectCache::frameLoadingEventNotification): New.
1836         * accessibility/chromium/AXObjectCacheChromium.cpp:
1837         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
1838         implementation of the platform specific function for chromium.
1839         * accessibility/gtk/AXObjectCacheAtk.cpp:
1840         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
1841         * accessibility/mac/AXObjectCacheMac.mm:
1842         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
1843         implementation of the platform specific function for the Mac.
1844         * accessibility/win/AXObjectCacheWin.cpp:
1845         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification): Dummy
1846         implementation of the platform specific function for Windows.
1847
1848         * loader/FrameLoader.cpp:
1849         (WebCore::FrameLoader::prepareForLoadStart): Notify accessibility
1850         by calling the new frameLoadingEventNotification() function.
1851         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Ditto.
1852
1853 2011-12-05  Benjamin Poulain  <benjamin@webkit.org>
1854
1855         Update String::containsOnlyASCII() to handle 8 bits strings
1856         https://bugs.webkit.org/show_bug.cgi?id=73799
1857
1858         Reviewed by Darin Adler.
1859
1860         When possible, change the call sites from charactersAreAllASCII()
1861         to the optimized version String::containsOnlyASCII().
1862
1863         * platform/KURL.cpp:
1864         (WebCore::KURL::init):
1865         * platform/cf/BinaryPropertyList.cpp:
1866         (WebCore::BinaryPropertyListPlan::writeStringObject):
1867         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
1868         (WebCore::FontCodepage::if):
1869
1870 2011-12-01  Vangelis Kokkevis  <vangelis@chromium.org>
1871
1872         [chromium] Use ANGLE's texture_usage and texture_storage extensions when allocating compositor textures
1873         https://bugs.webkit.org/show_bug.cgi?id=73621
1874
1875         When the extensions are available, compositor textures are allocated via
1876         glTexStorage2DEXT instead of glTexImage2D to eliminate creation of unnecessary
1877         mip levels on the service side. In addition, the GL_FRAMEBUFFER_ATTACHMENT_ANGLE
1878         is specified for all textures used by RenderSurfaces to eliminate the need for
1879         a system memory bitmap allocation.
1880
1881         Reviewed by Kenneth Russell.
1882
1883         * platform/graphics/chromium/Extensions3DChromium.h:
1884         * platform/graphics/chromium/LayerRendererChromium.cpp:
1885         (WebCore::LayerRendererChromium::initialize):
1886         (WebCore::LayerRendererChromium::initializeSharedObjects):
1887         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
1888         (WebCore::TrackingTextureAllocator::TrackingTextureAllocator):
1889         (WebCore::textureToStorageFormat):
1890         (WebCore::isTextureFormatSupportedForStorage):
1891         (WebCore::TrackingTextureAllocator::createTexture):
1892         * platform/graphics/chromium/TrackingTextureAllocator.h:
1893         (WebCore::TrackingTextureAllocator::setTextureUsageHint):
1894         (WebCore::TrackingTextureAllocator::setUseTextureStorageExt):
1895         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1896         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
1897
1898 2011-12-05  Chris Fleizach  <cfleizach@apple.com>
1899
1900         AX: aria-hidden doesn't work on iframe elements
1901         https://bugs.webkit.org/show_bug.cgi?id=73857
1902
1903         Reviewed by Darin Adler.
1904
1905         Test: platform/mac/accessibility/iframe-aria-hidden.html
1906
1907         * accessibility/AccessibilityRenderObject.cpp:
1908         (WebCore::AccessibilityRenderObject::addAttachmentChildren):
1909         (WebCore::AccessibilityRenderObject::addChildren):
1910         * accessibility/AccessibilityRenderObject.h:
1911         * accessibility/AccessibilityScrollView.cpp:
1912         (WebCore::AccessibilityScrollView::accessibilityIsIgnored):
1913         (WebCore::AccessibilityScrollView::addChildren):
1914         * accessibility/AccessibilityScrollView.h:
1915
1916 2011-12-05  Chris Fleizach  <cfleizach@apple.com>
1917
1918         AX: web search mechanism does not work with frames
1919         https://bugs.webkit.org/show_bug.cgi?id=73836
1920
1921         Reviewed by Beth Dakin.
1922
1923         This allows searching for, and within, frames for elements using the accessibility
1924         search mechanism.
1925
1926         Test: platform/mac/accessibility/search-with-frames.html
1927
1928         * accessibility/AccessibilityObject.cpp:
1929         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
1930         (WebCore::appendAccessibilityObject):
1931         (WebCore::appendChildrenToArray):
1932
1933 2011-12-05  Anders Carlsson  <andersca@apple.com>
1934
1935         Make LayerFlushSchedulerClient::flushLayers indicate whether the flush was successful or not
1936         https://bugs.webkit.org/show_bug.cgi?id=73862
1937
1938         Reviewed by Andy Estes.
1939
1940         Change LayerFlushSchedulerClient::flushLayers to return a boolean. If it returns true, the flush was
1941         successful and the run loop observer will be invalidated.
1942
1943         * platform/graphics/ca/LayerFlushScheduler.h:
1944         * platform/graphics/ca/LayerFlushSchedulerClient.h:
1945         * platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
1946         (WebCore::LayerFlushScheduler::runLoopObserverCallback):
1947
1948 2011-12-05  Dana Jansens  <danakj@chromium.org>
1949
1950         [chromium] Set opaque flag for ImageLayerChromium
1951         https://bugs.webkit.org/show_bug.cgi?id=72964
1952
1953         Reviewed by James Robinson.
1954
1955         New unit test in tests/ImageLayerChromiumTest.cpp.
1956
1957         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1958         (WebCore::GraphicsLayerChromium::setContentsToImage):
1959         * platform/graphics/chromium/GraphicsLayerChromium.h:
1960         (WebCore::GraphicsLayerChromium::contentsLayer):
1961         * platform/graphics/chromium/ImageLayerChromium.cpp:
1962         (WebCore::ImageLayerChromium::setContents):
1963
1964 2011-12-05  Julien Chaffraix  <jchaffraix@webkit.org>
1965
1966         TD width in precentage doesn't work.
1967         https://bugs.webkit.org/show_bug.cgi?id=34758
1968
1969         Reviewed by David Hyatt.
1970
1971         Test: fast/table/colspan-with-all-percent-cells.html
1972
1973         * rendering/AutoTableLayout.cpp:
1974         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
1975         In the case where all our columns have percent lengths, split the colspan
1976         logical width using the percentages from the lengths. This should be properly
1977         handled by the massive 'else' case but it is not and I did not feel like refactor
1978         that due to massive compatibility issues that would arise.
1979
1980 2011-12-05  Chris Fleizach  <cfleizach@apple.com>
1981
1982         platform/mac/accessibility/search-when-element-starts-in-table.html is failing
1983         https://bugs.webkit.org/show_bug.cgi?id=73751
1984
1985         When encountering a table, the rows() and not the cells() should be queried (otherwise
1986         we can end up finding the element we started with).
1987
1988         When searching in reverse, we also need to account for searching elements within the
1989         parent hierarchy. because technically it is "behind" the start element.
1990
1991         Reviewed by Darin Adler.
1992
1993         * accessibility/AccessibilityObject.cpp:
1994         (WebCore::appendChildrenToArray):
1995         (WebCore::AccessibilityObject::objectMatchesSearchCriteriaWithResultLimit):
1996         (WebCore::AccessibilityObject::findMatchingObjects):
1997         * accessibility/AccessibilityObject.h:
1998
1999 2011-12-02  Jer Noble  <jer.noble@apple.com>
2000
2001         <video> elements should disable the system and display sleep when playing on OS X.
2002         https://bugs.webkit.org/show_bug.cgi?id=73730
2003         <rdar://problem/9502155>
2004
2005         Reviewed by Alexey Proskuryakov.
2006
2007         No new tests; platform specific system behavior only.
2008
2009         Create a new DisplaySleepDisabler object when the playback rate becomes non-zero, and destroy
2010         that object when the playback rate drops back to zero.
2011
2012         * html/HTMLMediaElement.cpp:
2013         (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
2014         * html/HTMLMediaElement.h:
2015
2016 2011-12-05  Peter Beverloo  <peter@chromium.org>
2017
2018         [Chromium] Add Android keycodes and build Linux clipboard/filesystem files.
2019         https://bugs.webkit.org/show_bug.cgi?id=73672
2020
2021         Add the KeyCodeConversionAndroid.cpp file, which is a partial re-land
2022         of an older file from the Android port:
2023         http://trac.webkit.org/browser/trunk/WebCore/platform/android/KeyEventAndroid.cpp?rev=56704
2024
2025         Add IconChromiumAndroid.cpp which nullifies the rendering of icons in
2026         file upload boxes, which is not something we want to support now. Also
2027         include ClipboardChromiumLinux.cpp and FileSystemChromiumLinux.cpp
2028         as their functionality can be re-used for Android.
2029
2030         Reviewed by Adam Barth.
2031
2032         * WebCore.gyp/WebCore.gyp:
2033         * WebCore.gypi:
2034         * platform/chromium/KeyCodeConversionAndroid.cpp: Added.
2035         (WebCore::windowsKeyCodeForKeyEvent):
2036         * platform/graphics/chromium/IconChromiumAndroid.cpp: Added.
2037         (WebCore::Icon::Icon):
2038         (WebCore::Icon::~Icon):
2039         (WebCore::Icon::paint):
2040
2041 2011-12-05  Steve Falkenburg  <sfalken@apple.com>
2042
2043         Reviewed by Sam Weinig.
2044
2045         On Windows, filenames not properly preserved when copied into a file list exposed by Event.dataTransfer
2046         https://bugs.webkit.org/show_bug.cgi?id=73841
2047         <rdar://problem/10521879>
2048
2049         No test since repro case involves dropping a file onto the WebView.
2050         
2051         Calling characters() explicitly causes a non-terminated string buffer to get passed back
2052         to the String() constructor that expects a terminated buffer. The characters() call isn't
2053         necessary at all, since we have a String and the method we're calling expects a String.
2054
2055         * platform/win/ClipboardWin.cpp:
2056         (WebCore::ClipboardWin::files): Remove characters() since it doesn't null terminate.
2057
2058 2011-12-05  Timothy Hatcher  <timothy@apple.com>
2059
2060         Keep both InspectorBackend.js and InspectorBackendStub.js in Release builds after
2061         they have been combined into inspector.js.
2062
2063         The InspectorBackend.js file split out of the generated InspectorBackendStub.js
2064         in r101670, and both files are needed to be useful.
2065
2066         https://webkit.org/b/73839
2067
2068         Reviewed by Joseph Pecoraro and Brian Weinstein.
2069
2070         * WebCore.xcodeproj/project.pbxproj: Pass -not -name "InspectorBackend*.js" to find
2071         instead of -not -name InspectorBackendStub.js.
2072
2073 2011-12-05  Mikhail Naganov  <mnaganov@chromium.org>
2074
2075         Web Inspector: [Chromium] Heap profiler should designate weak references.
2076         https://bugs.webkit.org/show_bug.cgi?id=69948
2077
2078         Weak references are now ignored when tracing paths to GC roots.
2079
2080         Reviewed by Yury Semikhatsky.
2081
2082         * inspector/front-end/HeapSnapshot.js:
2083         (WebInspector.HeapSnapshotEdge.prototype.get isWeak):
2084         (WebInspector.HeapSnapshotEdge.prototype.toString):
2085         (WebInspector.HeapSnapshotEdge.prototype.get _hasStringName):
2086         (WebInspector.HeapSnapshotRetainerEdge.prototype.get isWeak):
2087         (WebInspector.HeapSnapshot.prototype._init):
2088         (WebInspector.HeapSnapshotPathFinder.prototype._fillRootChildren):
2089         (WebInspector.HeapSnapshotPathFinder.prototype._skipEdge):
2090
2091 2011-12-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2092
2093         Unreviewed, rolling out r102004.
2094         http://trac.webkit.org/changeset/102004
2095         https://bugs.webkit.org/show_bug.cgi?id=73835
2096
2097         Breaks qt minimal release compilation (Requested by vsevik on
2098         #webkit).
2099
2100         * inspector/CodeGeneratorInspector.py:
2101         (Capitalizer.upper_camel_case_to_lower):
2102         (RawTypes.get):
2103         (RawTypes.String.get_c_param_type):
2104         (RawTypes.Object.get_c_param_type):
2105         (RawTypes.Object):
2106         (ParamType):
2107         (TypeData.__init__):
2108         (TypeData.get_raw_type):
2109         (TypeMap.__init__):
2110         (InspectorFrontend_h):
2111         (InspectorArray):
2112         (InspectorObject):
2113         (String):
2114         (InspectorBackendDispatcher_h):
2115         (Generator.process_command):
2116         * inspector/InspectorValues.h:
2117
2118 2011-12-05  Peter Rybin  <peter.rybin@gmail.com>
2119
2120         Web Inspector: [protocol] generate C++ classes for protocol JSON named types
2121         https://bugs.webkit.org/show_bug.cgi?id=72835
2122
2123         Reviewed by Yury Semikhatsky.
2124
2125         Extends python generator functionality.
2126         Makes constructor in InspectorObject public.
2127
2128         * inspector/CodeGeneratorInspector.py:
2129         * inspector/InspectorValues.h:
2130
2131 2011-12-05  Pavel Podivilov  <podivilov@chromium.org>
2132
2133         Web Inspector: fix fronted compilation.
2134         https://bugs.webkit.org/show_bug.cgi?id=73831
2135
2136         Reviewed by Yury Semikhatsky.
2137
2138         * inspector/front-end/CompilerSourceMapping.js:
2139         (WebInspector.ClosureCompilerSourceMappingPayload):
2140
2141 2011-12-05  Eric Carlson  <eric.carlson@apple.com>
2142
2143         Out-of-band text tracks may only load from same origin as the media element's Document's origin
2144         https://bugs.webkit.org/show_bug.cgi?id=73184
2145
2146         Reviewed by Sam Weinig.
2147
2148         Test: http/tests/security/text-track-crossorigin.html
2149
2150         * html/HTMLTrackElement.cpp:
2151         (WebCore::urlForLogging): Debug-only function for logging urls.
2152         (WebCore::HTMLTrackElement::scheduleLoad): Call canLoadUrl() before passing control off to
2153             the Track.
2154         (WebCore::HTMLTrackElement::canLoadUrl): Don't ask HTMLMediaElement to validate the url, the
2155             requirements for <track> are different from <video>.
2156         (WebCore::HTMLTrackElement::didCompleteLoad): Change bool param to enum.
2157         (WebCore::HTMLTrackElement::mediaElementCrossOriginAttribute): New, return parent 'crossorigin' 
2158             attribute value.
2159         * html/HTMLTrackElement.h:
2160
2161         * html/LoadableTextTrack.cpp:
2162         (WebCore::LoadableTextTrack::scheduleLoad): Add comments from the spec.
2163         (WebCore::LoadableTextTrack::loadTimerFired): Always cancel pending loads. Let the caller know 
2164             if the loader refuses the url immediately.
2165         (WebCore::LoadableTextTrack::cueLoadingStarted): The <track> deals with readyState.
2166         (WebCore::LoadableTextTrack::cueLoadingCompleted): HTMLTrackElement::didCompleteLoad takes
2167             an enum, not a bool.
2168
2169         * loader/TextTrackLoader.cpp:
2170         (WebCore::TextTrackLoader::corsPolicyPreventedLoad): New, log the error and set m_state.
2171         (WebCore::TextTrackLoader::notifyFinished): Check for CORS failure.
2172         (WebCore::TextTrackLoader::load): Take media element cross-origin attribute as a param so we
2173             can make the correct checks.
2174         * loader/TextTrackLoader.h:
2175
2176 2011-12-05  Roland Steiner  <rolandsteiner@chromium.org>
2177
2178         "Raw" pseudo selectors don't match if immediately after a child or descendant combinator
2179         https://bugs.webkit.org/show_bug.cgi?id=72933
2180
2181         Remove shortcut that prevents universal selectors from being created before shadow pseudo-elements.
2182
2183         Reviewed by Antti Koivisto.
2184
2185         * css/CSSParser.cpp:
2186         (WebCore::CSSParser::updateSpecifiersWithElementName):
2187
2188 2011-12-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2189
2190         Unreviewed, rolling out r101983.
2191         http://trac.webkit.org/changeset/101983
2192         https://bugs.webkit.org/show_bug.cgi?id=73827
2193
2194         It broke all tests on GTK and on Qt in debug mode (Requested
2195         by Ossy on #webkit).
2196
2197         * dom/Document.h:
2198         (WebCore::Node::Node):
2199         * dom/Node.cpp:
2200         (WebCore::Node::~Node):
2201         * dom/Node.h:
2202         (WebCore::Node::inDocument):
2203
2204 2011-12-05  Roland Steiner  <rolandsteiner@chromium.org>
2205
2206         <style scoped>: Add 'scoped' attribute
2207         https://bugs.webkit.org/show_bug.cgi?id=67718
2208
2209         Add 'scoped' attribute to IDL and attribute list,
2210         implement and test setting/resetting of the attribute.
2211
2212         Reviewed by Antti Koivisto.
2213
2214         Test: fast/css/style-scoped/basic-attribute.html
2215
2216         * html/HTMLAttributeNames.in:
2217         * html/HTMLStyleElement.cpp:
2218         (WebCore::HTMLStyleElement::scoped):
2219         (WebCore::HTMLStyleElement::setScoped):
2220         (WebCore::HTMLStyleElement::scopingElement):
2221         * html/HTMLStyleElement.h:
2222         * html/HTMLStyleElement.idl:
2223
2224 2011-12-05  Hajime Morrita  <morrita@chromium.org>
2225
2226         [Refactoring] Accessing Node::m_document should be minimized.
2227         https://bugs.webkit.org/show_bug.cgi?id=73800
2228
2229         Reviewed by Kent Tamura.
2230
2231         No new tests. No behavioral change.
2232
2233         Replaced m_document reference with the document() accessor
2234         or temporaril variables. This is a preparation for using
2235         m_document space to point a shadow root pointer.
2236
2237         * dom/Document.h:
2238         (WebCore::Node::Node):
2239         * dom/Node.cpp:
2240         (WebCore::Node::~Node):
2241         * dom/Node.h:
2242         (WebCore::Node::inDocument):
2243
2244 2011-12-05  Shinya Kawanaka  <shinyak@google.com>
2245
2246         Asynchronous SpellChecker should consider multiple requests.
2247         https://bugs.webkit.org/show_bug.cgi?id=72939
2248
2249         Reviewed by Hajime Morita.
2250
2251         Now SpellChecker saves a request when it is processing the previous spellcheck request.
2252         If there is a request having the same root editable element, the older request is replaced by newer request
2253
2254         Test: editing/spelling/spellcheck-queue.html
2255
2256         * editing/SpellChecker.cpp:
2257         (WebCore::SpellChecker::SpellCheckRequest::SpellCheckRequest):
2258           A structure to have spell check request.
2259         (WebCore::SpellChecker::SpellCheckRequest::sequence):
2260         (WebCore::SpellChecker::SpellCheckRequest::range):
2261         (WebCore::SpellChecker::SpellCheckRequest::text):
2262         (WebCore::SpellChecker::SpellCheckRequest::mask):
2263         (WebCore::SpellChecker::SpellCheckRequest::rootEditableElement):
2264         (WebCore::SpellChecker::SpellChecker):
2265         (WebCore::SpellChecker::createRequest):
2266         (WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
2267           When timer is fired, queued request is processed if any.
2268         (WebCore::SpellChecker::canCheckAsynchronously):
2269         (WebCore::SpellChecker::requestCheckingFor):
2270           When the spellchecker is processing another request, the latest request is queued.
2271         (WebCore::SpellChecker::invokeRequest):
2272         (WebCore::SpellChecker::enqueueRequest):
2273           Enqueues a request. If there is an older request whose root editable element is the same as the request,
2274           it will be replaced.
2275         (WebCore::SpellChecker::didCheck):
2276         * editing/SpellChecker.h:
2277
2278 2011-12-05  Eric Carlson  <eric.carlson@apple.com>
2279
2280         WebCore part of: Add WebKit preferences for text track settings
2281         https://bugs.webkit.org/show_bug.cgi?id=73721
2282
2283         Reviewed by John Sullivan.
2284
2285         No new tests yet, still nothing to test.
2286
2287         * page/Settings.cpp:
2288         (WebCore::Settings::setShouldDisplaySubtitles): Move the setters to the .cpp file so they
2289             aren't inlined.
2290         (WebCore::Settings::setShouldDisplayCaptions): Ditto.
2291         (WebCore::Settings::setShouldDisplayTextDescriptions): Ditto.
2292         * page/Settings.h:
2293
2294 2011-12-05  Noel Gordon  <noel.gordon@gmail.com>
2295
2296         ImageDecoder setSize() should check for backing store allocation failure
2297         https://bugs.webkit.org/show_bug.cgi?id=72864
2298
2299         Reviewed by Adam Barth.
2300
2301         The backing store of a decoded image is a Vector<PixelData> on the affected
2302         ports. And Vector<> provides a resize capacity member that returns false if
2303         memory allocation fails.
2304
2305         setSize() should be called once only during an image decode - add an ASSERT
2306         for that. Resize the backing store capacity to the requested image size and
2307         return false if memory allocation fails.
2308
2309         ImageDecoder::isOverSize(width, height) is called to check that the decoded
2310         width and height won't overflow 'width x height x sizeof(PixelData)' before
2311         calls to setSize(). Refer to http://webkit.org/b/48634
2312
2313         No new tests. Covered by fast/images/size-failure.html
2314
2315         * platform/image-decoders/ImageDecoder.cpp:
2316         (WebCore::ImageFrame::setSize):
2317
2318 2011-12-04  Andreas Kling  <kling@webkit.org>
2319
2320         CSSStyleSheet can't be reparented, enforce this at compile time.
2321         <http://webkit.org/b/73793>
2322
2323         Reviewed by Benjamin Poulain.
2324
2325         * css/StyleSheet.h:
2326         (WebCore::StyleSheet::clearOwnerRule):
2327
2328             Changed setParentRule(CSSImportRule*) to clearOwnerRule() to document and
2329             enforce the fact that style sheets should never be reparented after creation.
2330
2331         (WebCore::StyleSheet::ownerRule):
2332
2333             Renamed parentRule() to ownerRule() to match the CSSOM name.
2334
2335         (WebCore::StyleSheet::ownerNode):
2336         (WebCore::StyleSheet::clearOwnerNode):
2337
2338             Also renamed StyleSheet::m_parentNode to m_ownerNode to match its accessors.
2339
2340         * css/CSSStyleSheet.h:
2341
2342             Removed ownerRule() as we now inherit it from StyleSheet.
2343
2344         * bindings/js/JSDOMBinding.h:
2345         (WebCore::root):
2346         * css/CSSImportRule.cpp:
2347         (WebCore::CSSImportRule::~CSSImportRule):
2348         (WebCore::CSSImportRule::setCSSStyleSheet):
2349         * css/StyleSheet.cpp:
2350         (WebCore::StyleSheet::StyleSheet):
2351         (WebCore::StyleSheet::parentStyleSheet):
2352         (WebCore::StyleSheet::baseURL):
2353         * inspector/InspectorStyleSheet.cpp:
2354         (WebCore::fillMediaListChain):
2355
2356             Update call sites to use the new names.
2357
2358 2011-12-04  Andreas Kling  <kling@webkit.org>
2359
2360         border-width: initial and border-color: initial cannot be removed via CSSOM.
2361         <http://webkit.org/b/68551>
2362
2363         Reviewed by Darin Adler.
2364
2365         Test: fast/css/cssom-remove-shorthand-property.html
2366
2367         When asked to remove a shorthand property, we should toss out both the
2368         sub-properties of that shorthand as well as the shorthand itself, should the
2369         declaration contain it. The latter part was missing in our implementation.
2370
2371         * css/CSSMutableStyleDeclaration.h:
2372         * css/CSSMutableStyleDeclaration.cpp:
2373         (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
2374         (WebCore::CSSMutableStyleDeclaration::removeShorthandProperty):
2375
2376             Changed to return true only if something was actually removed.
2377
2378 2011-12-04  Ryosuke Niwa  <rniwa@webkit.org>
2379
2380         HIERARCHY_REQUEST_ERR check in checkAcceptChild should be optimized for newChild without children
2381         https://bugs.webkit.org/show_bug.cgi?id=73737
2382
2383         Reviewed by Darin Adler.
2384
2385         It turned out that 50-70% of nodes inserted by DOM APIs such as insertBefore and appendChild
2386         don't have any descendent nodes. Optimize isDescendantOf which is used by checkAcceptChild for this case.
2387         On a test case attached on the bug, we see a 40% improvement.
2388
2389         Also optimize for cases where either new child or new parent but not both are in document as suggested
2390         by Erik Arvidsson. This appears to happen about 40-70% of the time, and the symmetric difference between
2391         the two cases is about 50% so it's worth implementing both optimizations.
2392
2393         Unfortunately no tests because we still have a O(n) algorithm somewhere.
2394
2395         * dom/Node.cpp:
2396         (WebCore::Node::isDescendantOf):
2397         (WebCore::Node::contains):
2398
2399 2011-12-04  Andreas Kling  <kling@webkit.org>
2400
2401         CSSValuePool: Inline trivial getters.
2402         <http://webkit.org/b/73763>
2403
2404         Reviewed by Anders Carlsson.
2405
2406         * css/CSSValuePool.cpp:
2407         * css/CSSValuePool.h:
2408         (WebCore::CSSValuePool::createInheritedValue): Inlined.
2409         (WebCore::CSSValuePool::createImplicitInitialValue): Ditto.
2410         (WebCore::CSSValuePool::createExplicitInitialValue): Ditto.
2411
2412 2011-12-03  Noel Gordon  <noel.gordon@gmail.com>
2413
2414         Fix WebPImageDecoder decoder leak.
2415         https://bugs.webkit.org/show_bug.cgi?id=73756
2416
2417         Reviewed by Andreas Kling.
2418
2419         Delete the m_decoder member in the destructor if needed with WebPIDelete.
2420
2421         No new tests, it's valgrind territory.
2422
2423         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
2424         (WebCore::WEBPImageDecoder::~WEBPImageDecoder):
2425
2426 2011-12-03  Andreas Kling  <kling@webkit.org>
2427
2428         CSSStyleSheet: Parent rule can only ever be @import, enforce this at compile time.
2429         <http://webkit.org/b/73725>
2430
2431         Reviewed by Darin Adler.
2432
2433         Made StyleSheet::m_parentRule a CSSImportRule* rather than a CSSRule*
2434         and updated getters, setters and constructors accordingly.
2435
2436         There is no change in behavior, this simply enforces the status quo.
2437
2438         * WebCore.xcodeproj/project.pbxproj:
2439         * bindings/js/JSDOMBinding.h:
2440         * bindings/scripts/CodeGeneratorV8.pm:
2441         (AddIncludesForType):
2442         * css/CSSStyleSheet.cpp:
2443         (WebCore::CSSStyleSheet::CSSStyleSheet):
2444         * css/CSSStyleSheet.h:
2445         (WebCore::CSSStyleSheet::create):
2446         (WebCore::CSSStyleSheet::ownerRule):
2447         * css/StyleSheet.cpp:
2448         (WebCore::StyleSheet::StyleSheet):
2449         * css/StyleSheet.h:
2450         (WebCore::StyleSheet::parentRule):
2451         (WebCore::StyleSheet::setParentRule):
2452
2453 2011-12-03  Andreas Kling  <kling@webkit.org>
2454
2455         Unreviewed, revert accidental change from r101932.
2456
2457         * bindings/scripts/CodeGeneratorV8.pm:
2458         (AddIncludesForType):
2459
2460 2011-12-03  Mary Wu  <mary.wu@torchmobile.com.cn>
2461
2462         Upstream 4 files into WebCore/platform/blackberry
2463         https://bugs.webkit.org/show_bug.cgi?id=73614
2464
2465         Reviewed by Eric Seidel.
2466
2467         * platform/blackberry/CursorBlackBerry.cpp: Added.
2468         (WebCore::AllCursors::AllCursors):
2469         (WebCore::getCursor):
2470         (WebCore::Cursor::Cursor):
2471         (WebCore::Cursor::~Cursor):
2472         (WebCore::Cursor::operator=):
2473         (WebCore::aliasCursor):
2474         (WebCore::cellCursor):
2475         (WebCore::columnResizeCursor):
2476         (WebCore::contextMenuCursor):
2477         (WebCore::copyCursor):
2478         (WebCore::crossCursor):
2479         (WebCore::eastResizeCursor):
2480         (WebCore::eastWestResizeCursor):
2481         (WebCore::grabbingCursor):
2482         (WebCore::grabCursor):
2483         (WebCore::handCursor):
2484         (WebCore::helpCursor):
2485         (WebCore::iBeamCursor):
2486         (WebCore::moveCursor):
2487         (WebCore::noDropCursor):
2488         (WebCore::noneCursor):
2489         (WebCore::northEastResizeCursor):
2490         (WebCore::northEastSouthWestResizeCursor):
2491         (WebCore::northResizeCursor):
2492         (WebCore::northSouthResizeCursor):
2493         (WebCore::northWestResizeCursor):
2494         (WebCore::northWestSouthEastResizeCursor):
2495         (WebCore::notAllowedCursor):
2496         (WebCore::pointerCursor):
2497         (WebCore::progressCursor):
2498         (WebCore::rowResizeCursor):
2499         (WebCore::southEastResizeCursor):
2500         (WebCore::southResizeCursor):
2501         (WebCore::southWestResizeCursor):
2502         (WebCore::verticalTextCursor):
2503         (WebCore::waitCursor):
2504         (WebCore::westResizeCursor):
2505         (WebCore::zoomInCursor):
2506         (WebCore::zoomOutCursor):
2507         (WebCore::middlePanningCursor):
2508         (WebCore::eastPanningCursor):
2509         (WebCore::northPanningCursor):
2510         (WebCore::northEastPanningCursor):
2511         (WebCore::northWestPanningCursor):
2512         (WebCore::southPanningCursor):
2513         (WebCore::southEastPanningCursor):
2514         (WebCore::southWestPanningCursor):
2515         (WebCore::westPanningCursor):
2516         * platform/blackberry/DragDataBlackBerry.cpp: Added.
2517         (WebCore::DragData::canSmartReplace):
2518         (WebCore::DragData::containsColor):
2519         (WebCore::DragData::containsCompatibleContent):
2520         (WebCore::DragData::containsFiles):
2521         (WebCore::DragData::containsPlainText):
2522         (WebCore::DragData::containsURL):
2523         (WebCore::DragData::asFilenames):
2524         (WebCore::DragData::asColor):
2525         (WebCore::DragData::asPlainText):
2526         (WebCore::DragData::asURL):
2527         (WebCore::DragData::asFragment):
2528         * platform/blackberry/DragImageBlackBerry.cpp: Added.
2529         (WebCore::createDragImageFromImage):
2530         (WebCore::createDragImageIconForCachedImage):
2531         (WebCore::deleteDragImage):
2532         (WebCore::dissolveDragImageToFraction):
2533         (WebCore::scaleDragImage):
2534         (WebCore::dragImageSize):
2535         * platform/blackberry/EventLoopBlackBerry.cpp: Added.
2536         (WebCore::EventLoop::platformInit):
2537         (WebCore::EventLoop::cycle):
2538
2539 2011-12-03  Andreas Kling  <kling@webkit.org>
2540
2541         Cache CSSInitialValue instances per-document.
2542         <http://webkit.org/b/73745>
2543
2544         Reviewed by Oliver Hunt.
2545
2546         Test: http/tests/security/cross-origin-css-primitive.html
2547
2548         Have CSSValuePool manage the caching of CSSInitialValue objects.
2549
2550         * css/CSSInitialValue.h:
2551         (WebCore::CSSInitialValue::createExplicit):
2552         (WebCore::CSSInitialValue::createImplicit):
2553         (WebCore::CSSInitialValue::CSSInitialValue):
2554         * css/CSSParser.cpp:
2555         (WebCore::CSSParser::parseValue):
2556         (WebCore::CSSParser::parseFillShorthand):
2557         (WebCore::CSSParser::parseAnimationShorthand):
2558         (WebCore::CSSParser::parseTransitionShorthand):
2559         (WebCore::CSSParser::parseShorthand):
2560         * css/CSSValuePool.cpp:
2561         (WebCore::CSSValuePool::CSSValuePool):
2562         (WebCore::CSSValuePool::createImplicitInitialValue):
2563         (WebCore::CSSValuePool::createExplicitInitialValue):
2564         * css/CSSValuePool.h:
2565
2566 2011-12-03  Andreas Kling  <kling@webkit.org>
2567
2568         Keep CSSInheritedValue in the CSS value pool.
2569         <http://webkit.org/b/73747>
2570
2571         Reviewed by Antti Koivisto.
2572
2573         We only need one CSSInheritedValue instance per document, so cache it
2574         in CSSValuePool and have the parser create it through there.
2575
2576         * css/CSSParser.cpp:
2577         (WebCore::CSSParser::parseValue):
2578         * css/CSSValuePool.cpp:
2579         (WebCore::CSSValuePool::CSSValuePool):
2580         (WebCore::CSSValuePool::createInheritedValue):
2581         * css/CSSValuePool.h:
2582
2583 2011-12-03  Andreas Kling  <kling@webkit.org>
2584
2585         Rename CSSPrimitiveValueCache to CSSValuePool.
2586         <http://webkit.org/b/73742>
2587
2588         Reviewed by Antti Koivisto.
2589
2590         CSSPrimitiveValueCache -> CSSValuePool
2591         Document::primitiveValueCache() -> Document::cssValuePool()
2592
2593         This is in preparation for sharing more than just primitive values.
2594
2595         * CMakeLists.txt:
2596         * GNUmakefile.list.am:
2597         * Target.pri:
2598         * WebCore.gypi:
2599         * WebCore.vcproj/WebCore.vcproj:
2600         * WebCore.xcodeproj/project.pbxproj:
2601         * bindings/scripts/CodeGeneratorV8.pm:
2602         (AddIncludesForType):
2603         * css/CSSComputedStyleDeclaration.cpp:
2604         (WebCore::valueForNinePieceImageSlice):
2605         (WebCore::valueForNinePieceImageQuad):
2606         (WebCore::valueForNinePieceImageRepeat):
2607         (WebCore::valueForNinePieceImage):
2608         (WebCore::zoomAdjustedPixelValue):
2609         (WebCore::zoomAdjustedNumberValue):
2610         (WebCore::zoomAdjustedPixelValueForLength):
2611         (WebCore::valueForReflection):
2612         (WebCore::getPositionOffsetValue):
2613         (WebCore::CSSComputedStyleDeclaration::currentColorOrValidColor):
2614         (WebCore::getBorderRadiusCornerValue):
2615         (WebCore::computedTransform):
2616         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
2617         (WebCore::valueForGridTrackList):
2618         (WebCore::getDelayValue):
2619         (WebCore::getDurationValue):
2620         (WebCore::createLineBoxContainValue):
2621         (WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword):
2622         (WebCore::CSSComputedStyleDeclaration::valueForShadow):
2623         (WebCore::valueForFamily):
2624         (WebCore::renderTextDecorationFlagsToCSSValue):
2625         (WebCore::fillRepeatToCSSValue):
2626         (WebCore::fillSizeToCSSValue):
2627         (WebCore::contentToCSSValue):
2628         (WebCore::counterToCSSValue):
2629         (WebCore::fontFamilyFromStyle):
2630         (WebCore::lineHeightFromStyle):
2631         (WebCore::fontSizeFromStyle):
2632         (WebCore::fontStyleFromStyle):
2633         (WebCore::fontVariantFromStyle):
2634         (WebCore::fontWeightFromStyle):
2635         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2636         * css/CSSParser.cpp:
2637         (WebCore::parseColorValue):
2638         (WebCore::parseSimpleLengthValue):
2639         (WebCore::CSSParser::setStyleSheet):
2640         (WebCore::CSSParser::createPrimitiveNumericValue):
2641         (WebCore::CSSParser::createPrimitiveStringValue):
2642         (WebCore::CSSParser::parseValidPrimitive):
2643         (WebCore::CSSParser::parseValue):
2644         (WebCore::parseBackgroundClip):
2645         (WebCore::CSSParser::parseFillShorthand):
2646         (WebCore::CSSParser::parsePage):
2647         (WebCore::CSSParser::parseSizeParameter):
2648         (WebCore::CSSParser::parseContent):
2649         (WebCore::CSSParser::parseAttr):
2650         (WebCore::CSSParser::parseBackgroundColor):
2651         (WebCore::CSSParser::parseFillPositionX):
2652         (WebCore::CSSParser::parseFillPositionY):
2653         (WebCore::CSSParser::parseFillPositionComponent):
2654         (WebCore::CSSParser::parseFillPosition):
2655         (WebCore::CSSParser::parseFillRepeat):
2656         (WebCore::CSSParser::parseFillSize):
2657         (WebCore::CSSParser::parseFillProperty):
2658         (WebCore::CSSParser::parseAnimationDirection):
2659         (WebCore::CSSParser::parseAnimationFillMode):
2660         (WebCore::CSSParser::parseAnimationIterationCount):
2661         (WebCore::CSSParser::parseAnimationName):
2662         (WebCore::CSSParser::parseAnimationPlayState):
2663         (WebCore::CSSParser::parseAnimationProperty):
2664         (WebCore::CSSParser::parseAnimationTimingFunction):
2665         (WebCore::CSSParser::parseGridTrackList):
2666         (WebCore::CSSParser::parseDashboardRegions):
2667         (WebCore::CSSParser::parseCounterContent):
2668         (WebCore::CSSParser::parseShape):
2669         (WebCore::CSSParser::parseWrapShape):
2670         (WebCore::CSSParser::parseFont):
2671         (WebCore::CSSParser::parseFontFamily):
2672         (WebCore::CSSParser::parseFontStyle):
2673         (WebCore::CSSParser::parseFontVariant):
2674         (WebCore::CSSParser::parseFontWeight):
2675         (WebCore::CSSParser::parseColor):
2676         (WebCore::ShadowParseContext::ShadowParseContext):
2677         (WebCore::ShadowParseContext::commitLength):
2678         (WebCore::ShadowParseContext::commitStyle):
2679         (WebCore::CSSParser::parseShadow):
2680         (WebCore::CSSParser::parseReflect):
2681         (WebCore::CSSParser::parseFlex):
2682         (WebCore::BorderImageParseContext::BorderImageParseContext):
2683         (WebCore::CSSParser::parseBorderImage):
2684         (WebCore::CSSParser::parseBorderImageRepeat):
2685         (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext):
2686         (WebCore::BorderImageSliceParseContext::commitNumber):
2687         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
2688         (WebCore::CSSParser::parseBorderImageSlice):
2689         (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext):
2690         (WebCore::BorderImageQuadParseContext::commitNumber):
2691         (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
2692         (WebCore::CSSParser::parseBorderImageQuad):
2693         (WebCore::CSSParser::parseBorderRadius):
2694         (WebCore::CSSParser::parseAspectRatio):
2695         (WebCore::CSSParser::parseCounter):
2696         (WebCore::parseDeprecatedGradientPoint):
2697         (WebCore::parseDeprecatedGradientColorStop):
2698         (WebCore::CSSParser::parseDeprecatedGradient):
2699         (WebCore::valueFromSideKeyword):
2700         (WebCore::parseGradientColorOrKeyword):
2701         (WebCore::CSSParser::parseLinearGradient):
2702         (WebCore::CSSParser::parseRadialGradient):
2703         (WebCore::CSSParser::parseCrossfade):
2704         (WebCore::CSSParser::parseCustomFilter):
2705         (WebCore::CSSParser::parseFilter):
2706         (WebCore::CSSParser::parseFlowThread):
2707         (WebCore::CSSParser::parseRegionThread):
2708         (WebCore::CSSParser::parseTextEmphasisStyle):
2709         (WebCore::CSSParser::parseFontFeatureSettings):
2710         * css/CSSParser.h:
2711         (WebCore::CSSParser::cssValuePool):
2712         * css/CSSValuePool.cpp: Renamed from Source/WebCore/css/CSSPrimitiveValueCache.cpp.
2713         (WebCore::CSSValuePool::CSSValuePool):
2714         (WebCore::CSSValuePool::~CSSValuePool):
2715         (WebCore::CSSValuePool::createIdentifierValue):
2716         (WebCore::CSSValuePool::createColorValue):
2717         (WebCore::CSSValuePool::createValue):
2718         * css/CSSValuePool.h: Renamed from Source/WebCore/css/CSSPrimitiveValueCache.h.
2719         (WebCore::CSSValuePool::create):
2720         (WebCore::CSSValuePool::createValue):
2721         * css/mediaControlsGtk.css:
2722         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
2723         * dom/Document.cpp:
2724         (WebCore::Document::cssValuePool):
2725         * dom/Document.h:
2726
2727 2011-12-03  Andreas Kling  <kling@webkit.org>
2728
2729         Shrink CSSValueList.
2730         <http://webkit.org/b/73732>
2731
2732         Reviewed by Antti Koivisto.
2733
2734         Packed CSSValueList::m_isSpaceSeparated into the CSSValue bit field
2735         and renamed it to m_isSpaceSeparatedValue, shrinking CSSValueList
2736         by one CPU word.
2737
2738         Also renamed CSSValue::m_isImplicit to m_isImplicitInitialValue
2739         for good measure.
2740
2741         * css/CSSInitialValue.h:
2742         (WebCore::CSSInitialValue::CSSInitialValue):
2743         * css/CSSValue.h:
2744         (WebCore::CSSValue::isImplicitInitialValue):
2745         (WebCore::CSSValue::CSSValue):
2746         * css/CSSValueList.cpp:
2747         (WebCore::CSSValueList::CSSValueList):
2748         (WebCore::CSSValueList::copy):
2749         (WebCore::CSSValueList::customCssText):
2750         * css/CSSValueList.h:
2751         (WebCore::CSSValueList::isSpaceSeparated):
2752
2753 2011-12-02  Philippe Normand  <pnormand@igalia.com>
2754
2755         [GStreamer] Fullscreen controller support for the new WebKit Fullscreen API
2756         https://bugs.webkit.org/show_bug.cgi?id=66968
2757
2758         Reviewed by Martin Robinson.
2759
2760         * GNUmakefile.am: Don't use the Quicktime fullscreen CSS anymore,
2761         it wasn't suited for GTK in the first place anyway.
2762         * platform/gtk/RenderThemeGtk.cpp:
2763         (WebCore::RenderThemeGtk::extraFullScreenStyleSheet): Simply reuse
2764         GTK CSS.
2765
2766 2011-12-03  Alejandro G. Castro  <alex@igalia.com>
2767
2768         [GTK] TextureMapperNode should not use Qt types and functions
2769         https://bugs.webkit.org/show_bug.cgi?id=73713
2770
2771         Replace qreal with double and qMin with std::min.
2772
2773         Reviewed by Noam Rosenthal.
2774
2775         * platform/graphics/texmap/TextureMapperNode.cpp:
2776         (WebCore::solveCubicBezierFunction):
2777         (WebCore::solveStepsFunction):
2778
2779 2011-12-03  Dan Winship  <danw@gnome.org>
2780
2781         [GTK] Remove lots of code that is now unnecessary after
2782         SoupRequestHTTP API changes.
2783         https://bugs.webkit.org/show_bug.cgi?id=71611
2784
2785         Reviewed by Martin Robinson.
2786
2787         No new tests; behavior is unchanged
2788
2789         * platform/network/ResourceHandleInternal.h:
2790         (WebCore::ResourceHandleInternal::ResourceHandleInternal): remove
2791         no-longer-needed fields.
2792         * platform/network/soup/ResourceHandleSoup.cpp:
2793         (WebCore::finishedCallback): remove this, and m_finished, which
2794         we no longer need to explicitly track
2795         (WebCore::statusWillBeHandledBySoup):
2796         (WebCore::soupErrorShouldCauseLoadFailure): No longer needed;
2797         SoupRequestHTTP's logic is now aligned with WebKit's.
2798         (WebCore::gotChunkCallback): remove gotChunkCallback, which
2799         is no longer needed
2800         (WebCore::startHTTPRequest):
2801         (WebCore::sendRequestCallback):
2802         (WebCore::gotHeadersCallback):
2803         (WebCore::contentSniffedCallback): merge the code from
2804         gotHeadersCallback and contentSniffedCallback into
2805         sendRequestCallback
2806         * platform/network/soup/ResourceResponseSoup.cpp:
2807         (WebCore::ResourceResponse::updateFromSoupMessage): move the
2808         sniffing override logic here
2809
2810 2011-12-03  Sheriff Bot  <webkit.review.bot@gmail.com>
2811
2812         Unreviewed, rolling out r101904.
2813         http://trac.webkit.org/changeset/101904
2814         https://bugs.webkit.org/show_bug.cgi?id=73739
2815
2816         It broke zillions of tests on all bot (Requested by
2817         Ossy_weekend on #webkit).
2818
2819         * bindings/js/JSDOMWindowCustom.cpp:
2820         (WebCore::handlePostMessage):
2821
2822 2011-12-02  Kentaro Hara  <haraken@chromium.org>
2823
2824         [Refactoring] Use join(", ", @arguments) to build a method argument string in CodeGenerator*.pm
2825         https://bugs.webkit.org/show_bug.cgi?id=73651
2826
2827         Reviewed by Darin Adler.
2828
2829         The code in CodeGenerator*.pm to build a method argument string is really dirty
2830         and error-prone. It is building an argument string incrementally judging whether
2831         ", " is necessary or not, like this:
2832
2833             my $method = ... ? "func(" : "func(a";
2834             if (...) {
2835                 $method .= $method =~ /\($/ ? "b" : ", b";
2836             }
2837             $method .= ")";
2838
2839         Alternatively, we can refactor the code as follows:
2840
2841             my $funcName = "func";
2842             my @arguments;
2843             push(@arguments, "a") if (...);
2844             push(@arguments, "b") if (...);
2845             my $method = $funcName . "(" . join(", ", @arguments) . ")";
2846
2847         This patch just refactors the code, and generated .h and .cpp files should be
2848         exactly the same as the current .h and .cpp files.
2849
2850         Tests: bindings/scripts/test/*
2851
2852         * bindings/scripts/CodeGenerator.pm:
2853         (GetterExpression):
2854         (SetterExpression):
2855         * bindings/scripts/CodeGeneratorCPP.pm:
2856         (GenerateImplementation):
2857         * bindings/scripts/CodeGeneratorGObject.pm:
2858         ():
2859         * bindings/scripts/CodeGeneratorJS.pm:
2860         (GenerateImplementation):
2861         * bindings/scripts/CodeGeneratorObjC.pm:
2862         (GenerateImplementation):
2863         * bindings/scripts/CodeGeneratorV8.pm:
2864         (GenerateNormalAttrGetter):
2865         (GenerateNormalAttrSetter):
2866
2867 2011-12-02  David Levin  <levin@chromium.org>
2868
2869         Rename WTF class from TemporarilyChange to TemporaryChange.
2870         https://bugs.webkit.org/show_bug.cgi?id=73479
2871
2872         Reviewed by Eric Seidel.
2873
2874         * ForwardingHeaders/wtf/TemporarilyChange.h: Removed.
2875         * ForwardingHeaders/wtf/TemporaryChange.h: Added.
2876         * page/FrameView.cpp:
2877         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
2878         (WebCore::FrameView::layout):
2879         (WebCore::FrameView::setScrollPosition):
2880         (WebCore::FrameView::autoSizeIfEnabled):
2881
2882 2011-12-02  Armand Navabi  <armand.navabi@gmail.com>
2883
2884         ASSERT fails in updateState ACTION_DRAW case
2885         https://bugs.webkit.org/show_bug.cgi?id=73351
2886
2887         Reviewed by James Robinson.
2888
2889         Changed ASSERT in CCSchedulerStateMachine to include ( || !m_visible) as discussed in bug 
2890         report. m_commitState is set to COMMIT_STATE_WAITING_FOR_FIRST_DRAW if m_needsCommit or
2891         !m_visible, so in ACTION_DRAW the assert should have both conditions.
2892
2893         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
2894         (WebCore::CCSchedulerStateMachine::updateState):
2895
2896 2011-12-02  Shawn Singh  <shawnsingh@chromium.org>
2897
2898         [chromium] Scissor rect optimization for chromium compositor
2899         https://bugs.webkit.org/show_bug.cgi?id=67341
2900
2901         Reviewed by James Robinson.
2902
2903         Mostly covered by damage tracker tests. Currently this relies on
2904         manually running layout tests, because this patch requires partial
2905         swaps that are not supported by DumpRenderTree. The feature
2906         automatically disables if partial swap is not supported.
2907
2908         * platform/graphics/chromium/LayerRendererChromium.cpp:
2909         (WebCore::LayerRendererChromium::initialize):
2910         (WebCore::LayerRendererChromium::trackDamageForAllSurfaces):
2911         (WebCore::LayerRendererChromium::drawLayersOntoRenderSurfaces):
2912         (WebCore::LayerRendererChromium::drawLayersInternal):
2913         (WebCore::LayerRendererChromium::swapBuffers):
2914         (WebCore::LayerRendererChromium::drawLayer):
2915         * platform/graphics/chromium/LayerRendererChromium.h:
2916         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2917         (WebCore::CCSettings::CCSettings):
2918         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
2919         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2920         (WebCore::CCRenderSurface::draw):
2921         * platform/graphics/chromium/cc/CCRenderSurface.h:
2922
2923 2011-12-02  Dmitry Lomov  <dslomov@google.com>
2924
2925         https://bugs.webkit.org/show_bug.cgi?id=73691
2926         [JSC] Implement correct order of window.postMessage arguments.
2927
2928         Reviewed by Geoffrey Garen.
2929
2930         * bindings/js/JSDOMWindowCustom.cpp:
2931         (WebCore::handlePostMessage):
2932
2933 2011-12-02  Stephen Chenney  <schenney@chromium.org>
2934
2935         REGRESSION (r91125): Polyline tool in google docs is broken
2936         https://bugs.webkit.org/show_bug.cgi?id=65796
2937
2938         Reviewed by Darin Adler.
2939
2940         Work around a bug in CoreGraphics, that caused incorrect bounds for paths
2941         consisting only of move-to elements. This causes problems in SVG, when the enormous
2942         bounds prevented the drawing of things behind.
2943
2944         Tests: svg/custom/path-moveto-only-rendering.svg
2945                svg/custom/subpaths-moveto-only-rendering.svg
2946
2947         * platform/graphics/cg/PathCG.cpp:
2948         (WebCore::PathIsEmptyOrSingleMoveTester::PathIsEmptyOrSingleMoveTester): Class to
2949         test for isEmpty accoridng ot the same rules as other platforms.
2950         (WebCore::PathIsEmptyOrSingleMoveTester::isEmpty): Query the result
2951         (WebCore::PathIsEmptyOrSingleMoveTester::testPathElement): Path iterator method
2952         (WebCore::PathHasOnlyMoveToTester::PathHasOnlyMoveToTester): Class to test whether a
2953         path contains only move-to elements, and hence should have null bounds.
2954         (WebCore::PathHasOnlyMoveToTester::hasOnlyMoveTo): Query the result
2955         (WebCore::PathHasOnlyMoveToTester::testPathElement): Path iterator method.
2956         (WebCore::Path::boundingRect): Modified to check for move-to only paths
2957         (WebCore::Path::fastBoundingRect): Modified to check for move-to only paths
2958         (WebCore::Path::isEmpty): Now uses the method that matches other platforms.
2959         (WebCore::Path::hasCurrentPoint): Now uses CGPathIsEmpty directly
2960         (WebCore::Path::transform) : Now uses CGPathIsEmpty directly
2961
2962 2011-12-02  Mihnea Ovidenie  <mihnea@adobe.com>
2963
2964         [CSSRegions]More renaming for region style rules.
2965         https://bugs.webkit.org/show_bug.cgi?id=73526
2966
2967         Reviewed by Eric Seidel.
2968
2969         Rename isRegionStyleRule() -> isRegionRule()
2970         WEBKIT_REGION_STYLE_RULE -> WEBKIT_REGION_RULE.
2971
2972         * bindings/objc/DOMCSS.mm:
2973         (kitClass):
2974         * bindings/v8/custom/V8CSSRuleCustom.cpp:
2975         (WebCore::toV8):
2976         * css/CSSGrammar.y:
2977         * css/CSSParser.cpp:
2978         (WebCore::CSSParser::createRegionRule):
2979         * css/CSSParser.h:
2980         * css/CSSRule.cpp:
2981         (WebCore::CSSRule::cssText):
2982         (WebCore::CSSRule::destroy):
2983         * css/CSSRule.h:
2984         (WebCore::CSSRule::isRegionRule):
2985         * css/CSSRule.idl:
2986         * css/CSSStyleSelector.cpp:
2987         (WebCore::CSSStyleSelector::addRegionRule):
2988         (WebCore::RuleSet::addRulesFromSheet):
2989         * css/CSSStyleSelector.h:
2990         * css/WebKitCSSRegionRule.cpp:
2991         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
2992         * css/tokenizer.flex:
2993
2994 2011-12-02  Tom Sepez  <tsepez@chromium.org>
2995
2996         XSSAuditor includes more terminating characters when truncating
2997         attribute values.
2998         https://bugs.webkit.org/show_bug.cgi?id=73684
2999
3000         Reviewed by Daniel Bates.
3001
3002         * html/parser/XSSAuditor.cpp:
3003         (WebCore::isTerminatingCharacter):
3004         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
3005
3006 2011-12-02  Tony Chang  <tony@chromium.org>
3007
3008         Need to implement flex-flow: column-reverse
3009         https://bugs.webkit.org/show_bug.cgi?id=73504
3010
3011         Reviewed by David Hyatt.
3012
3013         We can't just change the direction of the FlexOrderIterator because we want the overflow to be
3014         on the top. We can't just position them in the reverse location since we don't know where the
3015         bottom edge is until we've layed out the flex items. So we do an extra pass, but it should be
3016         fast since we're not laying out, just moving.
3017
3018         * rendering/RenderFlexibleBox.cpp:
3019         (WebCore::RenderFlexibleBox::flowAwareBorderEnd):
3020         (WebCore::RenderFlexibleBox::flowAwarePaddingEnd):
3021         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
3022         (WebCore::RenderFlexibleBox::layoutColumnReverse): Do an extra pass to reposition flexitems in the reverse order.
3023         * rendering/RenderFlexibleBox.h:
3024
3025 2011-12-02  Stephen Chenney  <schenney@chromium.org>
3026
3027         Divide by zero for zero-length arcs
3028         https://bugs.webkit.org/show_bug.cgi?id=73021
3029
3030         Reviewed by Nikolas Zimmermann.
3031
3032         A zero-length path produces divide by zero, resulting in nothing being
3033         drawn. This change modifies the behavior to produce a zero-length line
3034         which will generate correct linecaps.
3035
3036         Test: svg/stroke/zero-length-arc-linecaps-rendering.svg
3037
3038         * svg/SVGPathParser.cpp:
3039         (WebCore::SVGPathParser::parseArcToSegment): Catch the case of
3040         zero-length arcs and convert them to lines (the same as would happen
3041         for zero arc radii).
3042
3043 2011-12-02  James Wei <james.wei@intel.com> & Xingnan Wang <xingnan.wang@intel.com>
3044
3045         -Implement the SSE optimization for vsmul and vadd.
3046         https://bugs.webkit.org/show_bug.cgi?id=73182
3047
3048         Reviewed by Kenneth Russell.
3049
3050         * platform/audio/VectorMath.cpp:
3051         (WebCore:VectorMath):
3052
3053 2011-12-02  David Grogan  <dgrogan@chromium.org>
3054
3055         Grant workers experimental access to IndexedDB.
3056         https://bugs.webkit.org/show_bug.cgi?id=73609
3057
3058         Reviewed by Nate Chapin.
3059
3060         No new tests - there will be chromium ui tests that depend on
3061         webkit.org/b/73297.
3062
3063         * storage/IDBFactory.cpp:
3064         (WebCore::IDBFactory::open): Call new function,
3065         IDBFactoryBackendInterface::openFromWorker.
3066         * storage/IDBFactoryBackendImpl.cpp:
3067         (WebCore::IDBFactoryBackendImpl::open):
3068         (WebCore::IDBFactoryBackendImpl::openFromWorker):
3069         (WebCore::IDBFactoryBackendImpl::openInternal):
3070         * storage/IDBFactoryBackendImpl.h:
3071         * storage/IDBFactoryBackendInterface.h:
3072         * workers/WorkerContext.cpp:
3073         (WebCore::WorkerContext::webkitIndexedDB): Stores
3074         IDBFactoryBackendInterface, implemented by IDBFactoryBackendProxy in
3075         chromium, in the WorkerContext.  For the Document case it is stored in
3076         the PageGroup.  Storing it in the WorkerContext causes more memory
3077         churn, but that should be trivial.  I don't know of any better
3078         alternatives.
3079         * workers/WorkerContext.h:
3080         * workers/WorkerContext.idl:
3081
3082 2011-12-02  Aaron Colwell  <acolwell@chromium.org>
3083
3084         Fix mixed content handling for video in Chromium by having
3085         CachedResourceLoader & SubresourceLoader use the 
3086         ResourceRequest::TargetType when determining if a RawResource can
3087         be requested.
3088         https://bugs.webkit.org/show_bug.cgi?id=72178
3089
3090         Reviewed by Adam Barth.
3091
3092         Tests: http/tests/security/mixedContent/insecure-video-in-iframe.html
3093                http/tests/security/mixedContent/insecure-video-in-main-frame.html
3094                http/tests/security/mixedContent/redirect-http-to-https-video-in-main-frame.html
3095                http/tests/security/mixedContent/redirect-https-to-http-video-in-main-frame.html
3096
3097         * loader/SubresourceLoader.cpp:
3098         (WebCore::SubresourceLoader::willSendRequest):
3099         * loader/cache/CachedRawResource.cpp:
3100         (WebCore::CachedRawResource::CachedRawResource):
3101         * loader/cache/CachedRawResource.h:
3102         * loader/cache/CachedResource.cpp:
3103         (WebCore::defaultPriorityForResourceType):
3104         (WebCore::cachedResourceTypeToTargetType):
3105         (WebCore::CachedResource::targetTypeToCachedResourceType):
3106         * loader/cache/CachedResource.h:
3107         * loader/cache/CachedResourceLoader.cpp:
3108         (WebCore::createResource):
3109         (WebCore::CachedResourceLoader::checkInsecureContent):
3110         (WebCore::CachedResourceLoader::canRequest):
3111         (WebCore::CachedResourceLoader::requestResource):
3112
3113 2011-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
3114
3115         Unreviewed, rolling out r101731.
3116         http://trac.webkit.org/changeset/101731
3117         https://bugs.webkit.org/show_bug.cgi?id=73706
3118
3119         Broke copy and paste in chromium. (Requested by dcheng on #webkit).
3120
3121         * editing/SpellChecker.cpp:
3122         (WebCore::SpellChecker::SpellChecker):
3123         (WebCore::SpellChecker::initRequest):
3124         (WebCore::SpellChecker::clearRequest):
3125         (WebCore::SpellChecker::canCheckAsynchronously):
3126         (WebCore::SpellChecker::isBusy):
3127         (WebCore::SpellChecker::isValid):
3128         (WebCore::SpellChecker::requestCheckingFor):
3129         (WebCore::SpellChecker::doRequestCheckingFor):
3130         (WebCore::SpellChecker::didCheck):
3131         * editing/SpellChecker.h:
3132
3133 2011-12-02  Fady Samuel  <fsamuel@chromium.org>
3134
3135         When page scaling is in use position:fixed has incorrect results
3136         https://bugs.webkit.org/show_bug.cgi?id=68617
3137
3138         Reviewed by Simon Fraser.
3139
3140         Add the option for position:fixed elements to be fixed to the frame
3141         instead of the layout rectangle of the document.
3142
3143         Tests: fast/repaint/fixed-in-page-scale.html
3144                fast/repaint/fixed-right-bottom-in-page-scale.html
3145                fast/repaint/fixed-right-in-page-scale.html
3146
3147         * WebCore.exp.in:
3148         * page/FrameView.cpp:
3149         (WebCore::FrameView::reset):
3150         (WebCore::FrameView::scrollXForFixedPosition):
3151         (WebCore::FrameView::scrollYForFixedPosition):
3152           If position:fixed elements are relative to the frame, disregard the
3153           drag factor.
3154         (WebCore::FrameView::setShouldLayoutFixedElementsRelativeToFrame):
3155         * page/FrameView.h:
3156         (WebCore::FrameView::shouldLayoutFixedElementsRelativeToFrame):
3157         * rendering/RenderBox.cpp:
3158         (WebCore::RenderBox::shouldLayoutFixedElementRelativeToFrame):
3159         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
3160         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
3161           If position:fixed elements are relative to the frame, their container
3162           is the frame instead of the layout rect of the document. 
3163           This allows proper positioning of these elements to the right and
3164           bottom.
3165         * rendering/RenderBox.h:
3166         * testing/Internals.cpp:
3167         (WebCore::Internals::setShouldLayoutFixedElementsRelativeToFrame):
3168         * testing/Internals.h:
3169         * testing/Internals.idl:
3170           Allow enabling and disabling the new behavior in layout tests.
3171
3172 2011-12-02  Benjamin Poulain  <bpoulain@apple.com>
3173
3174         Build fix for SubresourceLoader when building with Core Foundation
3175         https://bugs.webkit.org/show_bug.cgi?id=73709
3176
3177         Reviewed by David Kilzer.
3178
3179         The patch r100311 removed SubresourceClient and merged it in SubresourceLoader.
3180         Consequently, m_client does not exist anymore and there is no need to do the check
3181         before invoking didReceiveData().
3182
3183         * loader/cf/SubresourceLoaderCF.cpp:
3184         (WebCore::SubresourceLoader::didReceiveDataArray):
3185
3186 2011-12-02  Andreas Kling  <kling@webkit.org>
3187
3188         StyledElement: Simplify addCSSColor().
3189         <http://webkit.org/b/73703>
3190
3191         Reviewed by Darin Adler.
3192
3193         The Color(const String&) constructor handles both named and 3/6-digit
3194         hex colors, so there's no need to handle those separately here.
3195         Also tweaked some comments and minor things.
3196
3197         * dom/StyledElement.cpp:
3198         (WebCore::StyledElement::addCSSColor):
3199
3200 2011-12-02  Benjamin Poulain  <bpoulain@apple.com>
3201
3202         Update platform/iphone to platform/ios
3203         https://bugs.webkit.org/show_bug.cgi?id=73708
3204
3205         Reviewed by Darin Adler.
3206
3207         The platform is now best known as iOS, update the platform layer accordingly.
3208
3209         * Configurations/WebCore.xcconfig:
3210         * WebCore.gypi:
3211         * WebCore.xcodeproj/project.pbxproj:
3212         * platform/cocoa/KeyEventCocoa.mm:
3213         * platform/ios/KeyEventCodesIOS.h: Renamed from Source/WebCore/platform/iphone/KeyEventCodesIPhone.h.
3214         * platform/ios/KeyEventIOS.mm: Renamed from Source/WebCore/platform/iphone/KeyEventIPhone.mm.
3215         (WebCore::keyIdentifierForKeyEvent):
3216         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3217         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
3218         (WebCore::PlatformKeyboardEvent::currentCapsLockState):
3219         (WebCore::PlatformKeyboardEvent::getCurrentModifierState):
3220
3221 2011-12-02  Jonathan Backer  <backer@chromium.org>
3222
3223         [chromium] Eliminate unnecessary state on previous CL
3224         https://bugs.webkit.org/show_bug.cgi?id=73661
3225
3226         Reviewed by Kenneth Russell.
3227
3228         * platform/graphics/chromium/LayerRendererChromium.cpp:
3229         (WebCore::LayerRendererChromium::initialize):
3230         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3231         (WebCore::CCLayerTreeHost::initialize):
3232         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
3233         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3234         (WebCore::CCSettings::CCSettings):
3235         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
3236
3237 2011-12-02  Dan Bernstein  <mitz@apple.com>
3238
3239         <rdar://problem/10520670> REGRESSION (r91738): didFinishLoad is called before custom fonts have finished loading
3240         https://bugs.webkit.org/show_bug.cgi?id=73688
3241
3242         Reviewed by Darin Adler.
3243
3244         The problem was that after CSSFontFaceSource::getFontData() had scheduled a 0-delay timer to
3245         begin loading the font, but before that timer fired, the subresource loader appeared to have
3246         had no resources waiting to be loaded, and therefore didFinishLoad could be called. This change
3247         reworks the fix for <http://webkit.org/b/65123> so that while the load is still started on a
3248         0-delay timer, the subresource loader’s request count is incremented immediately, preventing
3249         it from hitting 0 while the font load is scheduled to begin. The delayed load mechanism is
3250         moved from CSSFontFaceSource into CSSFontSelector in order to safely handle the possibility of
3251         the latter being decommissioned while waiting for font loading to begin.
3252
3253         * css/CSSFontFaceSource.cpp:
3254         (WebCore::CSSFontFaceSource::CSSFontFaceSource): Removed initializer for m_loadStartTimer.
3255         (WebCore::CSSFontFaceSource::~CSSFontFaceSource): Removed stopping of m_loadStartTimer.
3256         (WebCore::CSSFontFaceSource::getFontData): Replaced code to schedule loading on a timer with
3257         a call to CSSFontSelector::beginLoadingFontSoon.
3258         * css/CSSFontFaceSource.h: Removed m_loadStartTimer and m_fontSelector member variables.
3259         * css/CSSFontSelector.cpp:
3260         (WebCore::CSSFontSelector::CSSFontSelector): Added initialized for m_beginLoadingTimer.
3261         (WebCore::CSSFontSelector::~CSSFontSelector): Added call to clearDocument(), to deal with
3262         anything remaining in m_fontsToBeginLoading at this time.
3263         (WebCore::CSSFontSelector::clearDocument): Now stops m_beginLoadingTimer and balances
3264         incrementRequestCount() calls for anything remaining in m_fontsToBeginLoading.
3265         (WebCore::CSSFontSelector::beginLoadingFontSoon): Added. Schedules the actual call to
3266         CachedFont::beginLoadingIfNeeded on a 0-delay timer, and meanwhile increments the request count
3267         on the CachedResourceLoader, which ensures that didFinishLoad will not be called while waiting
3268         for the timer to fire.
3269         (WebCore::CSSFontSelector::beginLoadTimerFired): Added. Actually calls
3270         CachedFont::beginLoadIfNeeded and balances the incrementRequestCount() made when the timer was
3271         scheduled.
3272         * css/CSSFontSelector.h:
3273
3274 2011-12-02  David Tseng  <dtseng@google.com>
3275
3276         Send an AXCheckedStateChanged notification when the aria-checked attribute changes.
3277         https://bugs.webkit.org/show_bug.cgi?id=72754
3278
3279         Reviewed by Chris Fleizach.
3280
3281         Test: accessibility/aria-checkbox-sends-notification.html
3282
3283         * accessibility/AXObjectCache.cpp:
3284         (WebCore::AXObjectCache::checkedStateChanged):
3285         * accessibility/AXObjectCache.h:
3286         * dom/Element.cpp:
3287         (WebCore::Element::updateAfterAttributeChanged):
3288         * html/HTMLInputElement.cpp:
3289         (WebCore::HTMLInputElement::setChecked):
3290
3291 2011-12-02  Grace Kloba  <klobag@chromium.org>
3292
3293         [chromium] Recycle tile-sized textures during commit to prevent reallocations
3294         https://bugs.webkit.org/show_bug.cgi?id=70645
3295
3296         Reviewed by James Robinson.
3297
3298         Currently texture request is capped by the high limit while we reclaim the
3299         textures in each commit. This triggers new tiles always allocated when scrolling.
3300         The proposal is to recycle the texture during request if the total used memory
3301         is about to exceed the reclaim limit.
3302
3303         * platform/graphics/chromium/ManagedTexture.cpp:
3304         (WebCore::ManagedTexture::reserve):
3305         * platform/graphics/chromium/TextureManager.cpp:
3306         (WebCore::TextureManager::setMemoryLimitBytes):
3307         (WebCore::TextureManager::replaceTexture):
3308         (WebCore::TextureManager::requestTexture):
3309         * platform/graphics/chromium/TextureManager.h:
3310
3311 2011-12-02  Kent Tamura  <tkent@chromium.org>
3312
3313         [Chromium] Show placeholder even if the element is focused
3314         https://bugs.webkit.org/show_bug.cgi?id=73629
3315
3316         Reviewed by Hajime Morita.
3317
3318         No new tests. Need to update some existing placeholder tests.
3319
3320         * rendering/RenderThemeChromiumMac.h: Add shouldShowPlaceholderWhenFocused().
3321         * rendering/RenderThemeChromiumMac.mm:
3322         (WebCore::RenderThemeChromiumMac::shouldShowPlaceholderWhenFocused):
3323         Returns true.
3324         * rendering/RenderThemeChromiumSkia.cpp:
3325         (WebCore::RenderThemeChromiumSkia::shouldShowPlaceholderWhenFocused): ditto.
3326         * rendering/RenderThemeChromiumSkia.h: Add shouldShowPlaceholderWhenFocused().
3327
3328 2011-12-02  Kent Tamura  <tkent@chromium.org>
3329
3330         [Lion][Windows] Both of placeholder and input text are shown in <input type=number>
3331         https://bugs.webkit.org/show_bug.cgi?id=73615
3332
3333         Reviewed by Joseph Pecoraro.
3334
3335         Placeholder visibility was checked by HTMLInputElement::value
3336         emptiness. It should be innerTextValue emptiness because it is
3337         possible that a number field has empty HTMLInputElement::value and
3338         non-empty innerTextValue.
3339
3340         Tests: fast/forms/number/number-placeholder-with-unacceptable-value.html
3341
3342         * html/HTMLInputElement.cpp:
3343         (WebCore::HTMLInputElement::updateInnerTextValue):
3344         We should update placeholder visiblity when the innerTextValue is updated.
3345         (WebCore::HTMLInputElement::subtreeHasChanged): ditto.
3346         (WebCore::HTMLInputElement::setSuggestedValue):
3347         We don't need to call updatePlaceholderVisibility() because updateInnerTextValue() calls it.
3348         (WebCore::HTMLInputElement::setValueFromRenderer):
3349         We don't need to call updatePlaceholderVisibility() because subtreeHasChanged() calls it.
3350         * html/HTMLInputElement.h: Checks innerTextValue emptiness.
3351         * html/TextFieldInputType.cpp:
3352         (WebCore::TextFieldInputType::setValue):
3353         We don't need to call updatePlaceholderVisibility() because updateInnerTextValue() calls it.
3354
3355 2011-12-01  Alok Priyadarshi  <alokp@chromium.org>
3356
3357         [chromium] CCLayerQuad does not return FloatQuad in correct order
3358         https://bugs.webkit.org/show_bug.cgi?id=73247
3359
3360         Reviewed by James Robinson.
3361
3362         Returned the FloatQuad coordinates in correct order.
3363         
3364         Covered by new unit tests in CCLayerQuadTest.cpp.
3365
3366         * platform/graphics/chromium/cc/CCLayerQuad.cpp:
3367         (WebCore::CCLayerQuad::floatQuad):
3368
3369 2011-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
3370
3371         Unreviewed, rolling out r101833.
3372         http://trac.webkit.org/changeset/101833
3373         https://bugs.webkit.org/show_bug.cgi?id=73678
3374
3375         test_expectations file invalid: run Tools/Scripts/new-run-
3376         webkit-tests --lint-test-files (Requested by scheib on
3377         #webkit).
3378
3379         * platform/graphics/chromium/cc/CCLayerQuad.cpp:
3380         (WebCore::CCLayerQuad::floatQuad):
3381
3382 2011-12-02  Alok Priyadarshi  <alokp@chromium.org>
3383
3384         [chromium] CCLayerQuad does not return FloatQuad in correct orientation
3385         https://bugs.webkit.org/show_bug.cgi?id=73247
3386
3387         Reviewed by James Robinson.
3388
3389         Returned the FloatQuad coordinates in correct order.
3390         
3391         Covered by new unit tests in CCLayerQuadTest.cpp.
3392
3393         * platform/graphics/chromium/cc/CCLayerQuad.cpp:
3394         (WebCore::CCLayerQuad::floatQuad):
3395
3396 2011-12-01  Dmitry Lomov  <dslomov@google.com>
3397
3398         https://bugs.webkit.org/show_bug.cgi?id=73589
3399         [V8][Chromium] Adjust postMessage to the latest "implementation-ready" spec.
3400         - postMessage should support transfer of MessagePorts
3401         - the order of arguments to Window::postMessage and Window::webkitPostMessage should be (msg, targetOrigin [, transfer])
3402
3403         Reviewed by David Levin.
3404
3405         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3406         (WebCore::handlePostMessageCallback):
3407         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
3408         (WebCore::handlePostMessageCallback):
3409         * bindings/v8/custom/V8MessagePortCustom.cpp:
3410         (WebCore::handlePostMessageCallback):
3411         * bindings/v8/custom/V8WorkerCustom.cpp:
3412         (WebCore::handlePostMessageCallback):
3413
3414 2011-12-02  Enrica Casucci  <enrica@apple.com>
3415
3416         https://bugs.webkit.org/show_bug.cgi?id=73497
3417         This is a followup to the patch submitted for the bug above.
3418         Tha patch was landed in r101575 and I missed to make one of the changes
3419         suggested by the reviewer that had pointed out that the code was still
3420         making use of the deprecatedNode method.
3421
3422         Unreviewed.
3423
3424         * editing/DeleteSelectionCommand.cpp:
3425         (WebCore::DeleteSelectionCommand::removeRedundantBlocks): Changed deprecatedNode to containerNode.
3426
3427 2011-12-02  Tom Sepez  <tsepez@chromium.org>
3428
3429         Content-security-policy script-src not enforced on workers.
3430         https://bugs.webkit.org/show_bug.cgi?id=73240
3431
3432         Reviewed by Adam Barth.
3433
3434         Add a CSP check in AbstractWorker.cpp as part of resolving URL.
3435         
3436         Test: http/tests/security/contentSecurityPolicy/worker-script-src.html
3437
3438         * workers/AbstractWorker.cpp:
3439         (WebCore::AbstractWorker::resolveURL):
3440
3441 2011-12-02  Daniel Cheng  <dcheng@chromium.org>
3442
3443         [chromium] Add plumbing for supporting custom MIME types in DataTransfer.
3444         https://bugs.webkit.org/show_bug.cgi?id=73594
3445
3446         Reviewed by David Levin.
3447
3448         Tests: editing/pasteboard/clipboard-customData.html
3449                fast/events/drag-customData.html
3450
3451         * platform/chromium/ChromiumDataObject.cpp:
3452         (WebCore::ChromiumDataObject::types):
3453         (WebCore::ChromiumDataObject::getData):
3454         (WebCore::ChromiumDataObject::setData):
3455         * platform/chromium/ChromiumDataObject.h:
3456         (WebCore::ChromiumDataObject::customData):
3457         * platform/chromium/PlatformSupport.h:
3458
3459 2011-12-02  Darin Adler  <darin@apple.com>
3460
3461         [Mac] Form stream data structures still not threadsafe
3462         https://bugs.webkit.org/show_bug.cgi?id=73674
3463
3464         Reviewed by Anders Carlsson.
3465
3466         * platform/network/mac/FormDataStreamMac.mm:
3467         (WebCore::streamFieldsMapMutex): Added. 
3468         (WebCore::associateStreamWithResourceHandle): Use streamFieldsMapMutex.
3469         (WebCore::formCreate): Ditto.
3470         (WebCore::formFinalize): Ditto.
3471         (WebCore::httpBodyFromStream): Ditto.
3472
3473 2011-12-02  Joshua Bell  <jsbell@chromium.org>
3474
3475         IndexedDB: Rename "multientry" to "multiEntry" per spec change
3476         https://bugs.webkit.org/show_bug.cgi?id=73578
3477
3478         Reviewed by Darin Fisher.
3479
3480         * storage/IDBIndex.h:
3481         (WebCore::IDBIndex::multiEntry):
3482         * storage/IDBIndex.idl:
3483         * storage/IDBIndexBackendImpl.cpp:
3484         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
3485         * storage/IDBIndexBackendImpl.h:
3486         (WebCore::IDBIndexBackendImpl::create):
3487         (WebCore::IDBIndexBackendImpl::multiEntry):
3488         * storage/IDBIndexBackendInterface.h:
3489         * storage/IDBLevelDBBackingStore.cpp:
3490         (WebCore::IDBLevelDBBackingStore::getIndexes):
3491         (WebCore::IDBLevelDBBackingStore::createIndex):
3492         * storage/IDBLevelDBCoding.cpp:
3493         * storage/IDBObjectStore.cpp:
3494         (WebCore::IDBObjectStore::createIndex):
3495         * storage/IDBObjectStoreBackendImpl.cpp:
3496         (WebCore::IDBObjectStoreBackendImpl::putInternal):
3497         (WebCore::IDBObjectStoreBackendImpl::createIndex):
3498         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
3499         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
3500         * storage/IDBObjectStoreBackendImpl.h:
3501         * storage/IDBObjectStoreBackendInterface.h:
3502
3503 2011-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
3504
3505         Unreviewed, rolling out r101805.
3506         http://trac.webkit.org/changeset/101805
3507         https://bugs.webkit.org/show_bug.cgi?id=73670
3508